Federal income tax
We apply the 2026 IRS marginal tax brackets bracket-by-bracket on taxable income (AGI minus the standard or itemized deduction). The bracket table lives in src/lib/tax/years/2026.ts and is the single source of truth — no calculator hardcodes a rate.
Formula: federalTax = sum(min(remaining, bracketWidth) × bracketRate) for each bracket up to taxable income.
State income tax
We use each state's published average effective rate on wage income for 2026. Where a state publishes a full bracket schedule (CA, NY, IL, NJ, OR, MN, MA), we apply the schedule. Otherwise the effective rate is applied to taxable income. The values live in src/lib/tax/states.ts with a per-state details file in state-details.ts.
FICA
Social Security 6.2% on wages up to the 2026 wage base ($184,500) plus Medicare 1.45% on all wages. The 0.9% additional Medicare surtax applies above $200,000 single / $250,000 MFJ.
Self-employment tax
Net SE earnings × 92.35% × 15.3% (12.4% SS up to the wage base + 2.9% Medicare unlimited). Half is deductible above the line. Additional Medicare applies above the same wage thresholds.
Capital gains
- Short-term: taxed as ordinary income via the federal bracket function.
- Long-term: 0% / 15% / 20% applied at the 2026 thresholds on top of other taxable income.
- NIIT: 3.8% surtax on net investment income above $200k single / $250k MFJ MAGI.
- State: applied at each state's published LTCG rate (often equal to the income rate).
Property tax
Assessed value × the state's effective property tax rate. Local rates vary widely; the calculator estimate is a state average and not a substitute for the county assessor's bill.
Retirement contributions
Pre-tax 401(k) / Traditional IRA contributions reduce AGI. We use 2026 IRS limits ($24,500 401(k); $7,500 IRA) when validating inputs. Roth contributions do not reduce current-year taxable income.
Assumptions & limitations
- Single state of residence for the full year. Part-year residency is not modeled.
- Itemized deductions are not auto-detected — supply them where the calculator allows.
- State refundable credits (e.g., state EITC matches) are not auto-applied.
- AMT is not separately computed; it rarely binds in 2026 for typical W-2 income.
- City/local income taxes (NYC, Yonkers, certain OH/PA/MD jurisdictions) are not included by default.
Where the data lives
All tax-year-specific values live under src/lib/tax/years/ (one file per year). Annual updates require changing data files only — no calculator code changes.
See also: Data sources, Editorial policy, Tax year updates.