How Federal Income Tax Is Calculated: The Six-Step Waterfall
By the Stoia team · September 7, 2026 · 5 min read
Two coworkers earn the same $80,000. One gets a $1,200 refund in March; the other writes a $900 check in April. Neither of them was taxed at a different rate, and neither did anything clever. They landed at different points on the same six-step waterfall, and once you can see the steps, both outcomes stop looking like luck and start looking like arithmetic.
The waterfall at a glance
Every federal return, whatever software produced it, runs the same sequence:
- Add up gross income.
- Subtract adjustments to reach adjusted gross income (AGI).
- Subtract the standard or itemized deduction to reach taxable income.
- Run taxable income through the brackets to get tax before credits.
- Subtract credits to get total tax.
- Compare total tax to what you already paid in; the difference is your refund or balance due.
The example below uses deliberately round, invented numbers so the mechanics stay visible. The real deduction amounts and bracket thresholds change every year; the federal income tax calculator carries the current ones and runs this whole chain on your own figures.
Step 1: Gross income
Gross income is everything the tax code counts: wages, tips, interest, dividends, side-gig income, capital gains, unemployment benefits, most retirement withdrawals. Just as important is what never enters the waterfall at all. Pre-tax payroll deductions such as 401(k) deferrals, health premiums, and HSA contributions are removed before your wages are even reported, which is why box 1 of a W-2 is usually smaller than the salary you negotiated.
Our filer earns $80,000, defers $5,000 into a 401(k), and pays $1,500 in pre-tax health premiums, so reported wages are $73,500. Add $500 of savings interest and gross income for the return is $74,000.
Step 2: Adjustments, and the number everything keys off
Adjustments (the "above-the-line" deductions) come off next, and you get them whether or not you itemize: a deductible traditional IRA contribution, student loan interest up to an annual cap, HSA contributions made outside payroll, half of self-employment tax, educator expenses. Subtract them and you have adjusted gross income. AGI is the most-referenced number on the return: IRA deductibility, Roth eligibility, the medical-expense floor, and most credit phase-outs are all measured against it, which is why a small adjustment can occasionally unlock something much larger.
Our filer paid $1,000 of student loan interest. AGI: $73,000.
Step 3: The deduction, and taxable income
Now subtract either the standard deduction (a flat amount set by filing status) or your itemized deductions, whichever is larger. What remains is taxable income, the only number the brackets ever see. Two things follow from that. A deduction never saves you its face value; it saves its face value times your marginal rate. And a large enough deduction can push taxable income to zero, at which point further deductions are worth nothing.
For the illustration, call the standard deduction $13,000 (an invented figure; the real one depends on your filing status and the year). Taxable income: $60,000.
Step 4: Brackets, and tax before credits
Brackets are slices, not labels. Each slice of taxable income is taxed at that slice's rate, and reaching a higher bracket only raises the rate on the dollars inside it. To keep the mechanics honest without quoting real thresholds, imagine a toy system with three brackets: 10% on the first $10,000, 20% on the next $30,000, and 30% on everything above $40,000. On $60,000 of taxable income:
- $10,000 at 10% = $1,000
- $30,000 at 20% = $6,000
- $20,000 at 30% = $6,000
Tax before credits: $13,000. Our filer is "in the 30% bracket," yet pays 21.7% of taxable income and about 16% of the original $80,000 salary. That gap between the top slice and the blended average is the whole subject of marginal versus effective rates, and it is why a raise that crosses into the next tax bracket still leaves you ahead.
One footnote: long-term capital gains and qualified dividends do not run through these brackets. They stack on top of ordinary income and get their own, generally lower, rate table, which the capital gains tax calculator handles separately.
Step 5: Credits, and total tax
Credits come off after the tax is computed, dollar for dollar, which makes a $1,000 credit worth $1,000 to everyone regardless of bracket. Nonrefundable credits can take the bill to zero but not below it; refundable credits can go past zero and come back as a payment. The child tax credit, education credits, the saver's credit, and energy credits all live at this step.
Our filer qualifies for a $1,500 nonrefundable credit (again invented). Total tax: $11,500.
Step 6: Payments, and the refund or the bill
Only now does the return look at what you already paid: the withholding in box 2 of your W-2, any quarterly estimated payments, and any refundable credits. If payments exceed total tax, the excess is refunded; if they fall short, you owe the difference. This is the step where the two coworkers diverge. Same $11,500 of tax: the one whose W-4 produced $12,700 of withholding gets $1,200 back, and the one whose W-4 produced $10,600 owes $900. The refund measures the accuracy of the deposit, not the size of the tax.
The whole example on one card
| Step | Amount |
|---|---|
| Salary | $80,000 |
| Minus pre-tax 401(k) and health premiums | −$6,500 |
| Plus savings interest | +$500 |
| Gross income on the return | $74,000 |
| Minus adjustments (student loan interest) | −$1,000 |
| Adjusted gross income | $73,000 |
| Minus standard deduction (illustrative) | −$13,000 |
| Taxable income | $60,000 |
| Tax before credits (toy brackets) | $13,000 |
| Minus credits (illustrative) | −$1,500 |
| Total tax | $11,500 |
| Withholding, coworker A / coworker B | $12,700 / $10,600 |
| Refund / balance due | $1,200 back / $900 owed |
Where withholding fits
Payroll runs a rough version of steps 1 through 5 on every paycheck. It annualizes your pay, applies the standard deduction and the current brackets, folds in whatever your W-4 says about other jobs, dependents, and extra withholding, and sends the resulting slice to the IRS as a deposit. It cannot see your spouse's income, your side business, or the credit you will qualify for in December, which is why the deposit and the bill rarely match to the dollar. The return is the settle-up; the W-4 is the dial. When your refund or bill is consistently large, the fix lives in the dial, not in the return.
Every step above draws on something you already own: a pay stub, an account statement, a receipt for what you gave away. Keeping income, retirement contributions, and interest in one place turns the six steps into a few minutes of reading rather than a search through a year of email.