I am building a payroll system. My problem is if the employee's salary changes twice or thrice in a same month. If the:

1st period is x
2nd period is y

then can I say annual income from 1st period is x*24 since there are 2 splits?

Similarly, will the annual income for second period be y * 24? I can also do (x+y)*12.

I also need to calculate taxes for both of these cases.

What is the best way of doing this?

  • 1
    Tax calculations require knowing the country. – mhoran_psprep Dec 9 '18 at 17:22

If you are producing the actual annual salary, just add up all the amounts paid for the relevant period. It doesn’t matter how many times the salary was changed; just tally up the cash remitted in total.

If you are trying to work out an ‘effective’ figure so you can take out and/or report the appropriate tax for the month, use x+y as the monthly figure and look up the tax tables for that amount. Alternatively, multiply (x+y) by 12 for a rough-and-ready annual figure, especially if you don’t care about some months having more days than others.

In summary, work out the actual sum paid for the relevant period, then either look up the tax table corresponding to that period (this is the preferred solution), or annualise the figure and look up the annual tax tables.

| improve this answer | |
  • 1
    Thank you so much. I will sum the salary paid and calculate tax on the basis of month not on the basis of period. – Rabin Poudyal Dec 9 '18 at 14:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.