Because I am a masochist and want my pay stubs in a spreadsheet format on my computer I am looking into the formulas used to calculate federal income tax. I read over IRS Publication 15 Circular E and got the following:

Single Semi-monthly 2 Exemptions = 2 * 154.17 = 308.34 Gross pay: 1,870

Using 25% of income over 1525 + 197.85 I get 1870 - 308.34 = 1561.66 - 1525 = 36.66 * 25% = 9.165 + 197.85 = 207.015

However, paycheckcity.com and my pay stub both agree that 207.08 is being withheld. Where am I missing 6 cents from?

Using another week where I was on unpaid leave, gross pay of 850 I calculated 50.35 would be withheld, when in actuality 50.42 was withheld, so I was 7 cents off that pay period. Just seems odd that I am getting so close but not exact.

  • At least you recognize that you are in fact a masochist for computing to this level of detail :) Jun 23, 2011 at 21:36
  • 1
    I have mild OCD when it comes to problem solving. I am a computer programmer (recent graduate) and I hate knowing that there is a problem I am close to solving but not quite there. It's like a little fly in the corner of my vision, not doing any harm, but still annoying. Jun 23, 2011 at 21:54
  • This answer about Federal withholding on a pay stub is amazing: money.stackexchange.com/a/149174/11736
    – Ryan
    Feb 9, 2022 at 13:35

3 Answers 3


Found the problem, the actual numbers used are for the annual, not for semi-monthly, so multiplying my gross by 24 and calculating that way, then dividing the final tax by 24 solved the problem.


I've seen Pub E. Have you considered that withholdings may be table-based and not an equation? If you are a spreadsheet person, you'll understand this answer. For others, I'll explain. Instead of withholdings being an equation, as in "take exactly 10% of weekly salary and multiply by 10%" it's more like, "for $100-110, $10, for $111 - 120, $11, etc. That's really the only way to produce a table that doesn't contain every integer from 0 through $5000/wk (or higher). Since withholding isn't an exact science, the 5 cents this question is concerned with, $2.50/yr, isn't of concern. It gets sorted out at tax time.

  • I looked at the table based which has an even 207 and 50 respectively for the examples I gave. The 5 cents isn't really a concern, but just a nuisance. I see that my paycheck and online websites have the same exact values and am bothered that I cannot find the exact values myself. Jun 21, 2011 at 22:03

I'm not aware of the exact formulas, but it appears there is either rounding error or reporting error. For example, the formula they use might be 25.047% or something like that but it's given as 25%, which could cause an error.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .