Tax Calculator
Overview
Federal income tax estimator with two filing statuses. Uses progressive bracket accumulation. State-specific interactive breakdowns use a separate component (IncomeSliderVisualization) on state tax pages.
Formula
Progressive bracket tax (marginal slices):
tax = 0, prev = 0
For each [limit, rate] in brackets:
if income > prev:
tax += (min(income, limit) − prev) × rate
prev = limit
else break
effectiveRate = (tax / income) × 100
takeHome = income − tax
2024 brackets — Single (28:36:src/components/calculators/TaxCalculator.tsx):
| Up to | Rate |
|---|---|
| $11,000 | 10% |
| $44,725 | 12% |
| $95,375 | 22% |
| $182,100 | 24% |
| $231,250 | 32% |
| $578,125 | 35% |
| ∞ | 37% |
Married filing jointly uses doubled/lowest-bracket limits (37:45:src/components/calculators/TaxCalculator.tsx).
State variants (IncomeSliderVisualization)
Used on per-state tax calculator pages for federal + state + FICA breakdown.
Federal (2025 single filer piecewise) — 40:48:src/components/calculators/IncomeSliderVisualization.tsx:
Piecewise linear function with breakpoints at $11,600, $47,150, $100,525, $191,950, $243,725, $609,350.
State tax:
stateTax = income × stateRate
stateRate from STATE_TAX_RATES[stateCode] or optional stateTaxRate prop (top marginal simplified rates).
FICA:
socialSecurity = min(income, 168600) × 0.062
medicare = income × 0.0145
fica = socialSecurity + medicare
Combined:
total = federal + state + fica
effectiveRate = (total / income) × 100
takeHome = income − total
Inputs
TaxCalculator: annual income, filing status (single / married).
IncomeSliderVisualization: income slider $10k–$500k, state code/name, optional override rate.
Calculation steps
TaxCalculator:
- User clicks Calculate.
- Select bracket table by filing status.
- Walk brackets; round tax and take-home.
IncomeSliderVisualization:
- Recompute on income change (live).
- Calculate federal via piecewise function.
- Apply flat state marginal rate.
- Add FICA with SS wage base cap.
Outputs
TaxCalculator: estimated tax, effective rate, take-home.
IncomeSliderVisualization: federal/state/FICA amounts, bar chart, total burden, effective rate, take-home, insight text.
Assumptions
- No deductions, credits, or standard/itemized adjustments in either component.
- State tax = flat top marginal rate × full income (not progressive state brackets).
- TaxCalculator uses 2024 brackets; IncomeSliderVisualization uses 2025 federal breakpoints— they are not aligned.
- FICA only in state visualization; not in base TaxCalculator.
Data sources
- Hardcoded bracket tables in components.
STATE_TAX_RATESmap (51 jurisdictions) inIncomeSliderVisualization.tsx.FORMULA_TAXdisplay string fromFinancialAioContent.
Known limitations
- Base calculator is federal-only and on-demand (button).
- State pages use different federal year and simplified state rates vs.
TaxCalculator. - No payroll withholding, AMT, or self-employment tax.
Files touched
src/components/calculators/TaxCalculator.tsxsrc/components/calculators/IncomeSliderVisualization.tsx- State tax route pages (mount
IncomeSliderVisualization) src/lib/federal-tax-brackets.ts(shared 2026 bracket source)
Fixed in Phase 1.1b (2026-06-13 — commit pending review)
Federal brackets unified in src/lib/federal-tax-brackets.ts using 2026 thresholds from IRS Rev. Proc. 2025-32. Both TaxCalculator.tsx and IncomeSliderVisualization.tsx import calculateFederalTax() from this module.