Program to calculate summation of a series in salary sheet

I am creating salary sheet. I need to create a program that could calculate summation of a series. Dear expert please give me a step by step solution so that I can create a program easily.
