I built the paycheck-by-state calculator on OneCalc and spent more time on edge cases than on the UI. Here's the model, step by step, in case you're building something similar or just want to know what's behind those numbers.
1. Pick a model: annual, not per-check withholding
There are two ways to do this. Employers use IRS Publication 15-T withholding tables, which depend on W-4 entries. The simpler approach is to compute the full-year tax and divide by the number of paychecks (52, 26, 24 or 12). I went with the annual approach because it needs fewer inputs and is easier to explain. The trade-off: your pay stub can differ, so the page says that plainly.
2. Gross pay
Salary is used as-is. Hourly pay is rate x hours per week x 52.
3. Pre-tax deductions don't all behave the same
This is the bug magnet. A traditional 401(k) reduces federal and state income-tax wages but not Social Security or Medicare wages, and it's capped at the $24,500 deferral limit for 2026. Pre-tax health premiums reduce income-tax wages and payroll-tax wages. So you need at least two different "taxable wage" values, not one.
4. Federal income tax
Apply the 2026 brackets and standard deduction from IRS Rev. Proc. 2025-32. There's no federal personal exemption. Small trap: double-check the head of household brackets against the corrected figures.
5. FICA
Social Security is 6.2% of wages up to $184,500. Medicare is 1.45% with no cap. The additional 0.9% Medicare tax has liability thresholds by filing status ($200k single/HoH, $250k MFJ, $125k MFS), but employers start withholding it once wages pass $200k regardless of status. Those are two different rules and it's worth modeling them separately.
6. State tax
Start from wages after pre-tax amounts, subtract the state's standard deduction or exemption, then apply brackets. Some states give a credit instead of a deduction, which reduces tax rather than income, so the data model needs a flag for that. For sources, California uses the Franchise Tax Board's 2026 schedules (plus the 1% Mental Health Services Tax over $1M). Other states come from a dated Tax Foundation workbook, and when a 2026 inflation adjustment hasn't been published, the result notes that the figure is from the prior year.
7. State payroll taxes
Only include what you've checked against the agency. On OneCalc that's California SDI, Washington Paid Family and Medical Leave, and WA Cares. Other programs are named in the notes but not deducted. An honest "not included" beats a guessed number.
8. Rounding
Work in cents (integers), round half up. Round each per-paycheck line, then sum the rounded lines for take-home. Otherwise your lines won't add up to your total, and someone will notice.
What's left out on purpose: local taxes, itemized deductions, dependents and most credits. List these on the page so people know when the estimate won't fit them.
If you want to see it in action, the calculator is at https://onecalc.cc/us/paycheck and the general sourcing rules are at https://onecalc.cc/methodology. Happy to answer questions about any of the edge cases in the comments.
