When I built the paycheck calculator on mytimecardcal.com, the hardest part was not the tax brackets. It was the order of the deductions. Two workers can earn the same gross pay, have the same total deductions, and still take home different amounts — purely because of which deductions come out before tax and which come out after.
What pre-tax actually means
A pre-tax deduction comes out of your pay before the tax calculation runs. That sounds simple, but it has a knock-on effect people miss: it shrinks the number the tax is calculated on. Put $100 into a traditional 401(k) from a $1,000 paycheck and federal withholding is worked out on $900, not $1,000. The deduction saves you tax as well as building savings.
The usual pre-tax items are a traditional 401(k), health insurance premiums paid through a Section 125 cafeteria plan, an HSA contribution, and an FSA contribution. Health premiums under a Section 125 plan are the generous ones: they escape federal income tax and Social Security and Medicare tax too.
The 401(k) is the one that trips people up. A traditional 401(k) contribution escapes federal income tax, but it does not escape Social Security or Medicare. So your taxable wages for income tax and your wages for FICA are two different numbers on the same paycheck, and the calculator has to track them separately. That was the first real bug in my build: I used one taxable-wage figure for everything, and the Social Security line came out wrong whenever a 401(k) was involved.
What post-tax means
A post-tax deduction comes out after every tax has been calculated. Roth 401(k) contributions are the classic example: the money goes in after tax, which is exactly why the withdrawals are tax-free later. Garnishments, union dues, and after-tax savings contributions sit here too. A $50 Roth contribution and a $50 traditional contribution look identical on the deductions list, but the traditional one lowers your tax bill and the Roth one does not.
A worked example
Take a $1,000 weekly paycheck with a $100 traditional 401(k) contribution and a $50 Roth contribution. The order runs like this:
- Gross pay: $1,000
- Pre-tax 401(k): minus $100, leaving $900 of taxable wages
- Federal withholding is calculated on $900, but Social Security and Medicare are calculated on $1,000, because the 401(k) does not escape FICA
- Post-tax Roth: minus $50 from what is left
Step 3 is where most simple calculators quietly get it wrong, and it is where mine did too. The fix was to carry two running wage figures through the calculation — one for income tax, one for FICA — and let each deduction declare which figures it reduces. Once that was in place, the health premium could reduce both, the 401(k) could reduce only the income-tax figure, and the Roth could reduce neither.
The rule I code by
Every deduction has to answer one question before it touches the maths: do you reduce taxable wages, FICA wages, both, or neither? If I cannot answer that for a deduction, it does not go in the calculator. Guessing the order is how a paycheck estimate ends up a few dollars out, and a few dollars out every week is exactly the kind of error that makes someone stop trusting the tool.
That is the whole lesson, really. The amounts on a pay stub matter, but the order they are applied in matters more — and once you model the order properly, the numbers look after themselves.

