Retirement Calculator Logo

Retirement Calculators

Not tax or financial advice — verify with a CPA

Estimate retirement income, taxes, MAGI, withdrawal rate, and needed portfolio size — all in one page.
Best for early retirees, ACA/MAGI planning, part-time work, pensions, Social Security, dividends, and California tax planning.
What do you want to solve for? Choose a calculator or show all 5 together.Each calculator uses your inputs and solves for a different unknown.
Calculator 1 — Spendable Income & Surplus / Shortfall
?
Solves annual surplus or shortfall.
Solves surplus/shortfall
2 Inputs
Income Sources
Portfolio
Includes dividends + share sales combined.
Spending and Deductions
Included in expenses:
Tax Treatment & Planning Assumptions
?
3 Results

Annual Spendable Income ?

After-tax income available to spend.

Annual Surplus / Shortfall

$22,848
Current inputs produce a surplus.

Universal Outputs

$132,000
$167,200
$154,848
$12,904
$12,352
7.38%
$77,200
$37,200
Anatomy of in tax
Payroll Fed Ord. State LTCG/NIIT/surtax

Tax Breakdown

$4,040
$4,475
$3,837
$0
$4,475
NIIT$0
Add'l Medicare$0
Tax Settings Snapshot Click to edit
Federal tax year
State
California
State tax year
SS taxable %
HSA state treatment State HSA non-conforming
High-income state surtax

How the Scenario Manager works

Run a calculator
Go to the Calculator tab, choose a single calculator or the All 5 Calculators Dashboard, enter your numbers, and review the outputs — surplus/shortfall, needed withdrawal rate, needed portfolio size, needed earned income, or max investment income under MAGI.
Save a scenario
Click "+ Save to Scenario Manager" in the active single-calculator view or in an All 5 Calculators Dashboard card. Give it a name like "Base case" or "Retire at 55 — low spending".
Compare scenarios
Each saved scenario appears as a row in the table below. Key outputs — including monthly surplus/shortfall, withdrawal rate, portfolio size, earned income, and max investment income under MAGI — are visible side by side so you can compare what-if cases at a glance.
Load a scenario back
Click Load on any row to instantly restore all of that scenario's inputs into the matching calculator view — no re-typing needed. Then tweak and save a new variation.
🔒
Your data never leaves your device
No account required. No login. Your inputs, scenarios, and settings are saved in your browser's local storage and never transmitted anywhere.
📁
Scenario backup vs full backup
Backup Scenarios downloads only your saved scenarios as a JSON file. Restore Scenarios loads saved scenarios back into the Scenario Manager. Scenario backups do not include Tax Settings, current calculator inputs, MAGI/HSA preferences, theme, or Scenario Manager column layout. Use Backup All Data in Tax Settings for a full transfer to another browser or device.
📊
Export to CSV / Export to Excel explained
Export to CSV downloads raw spreadsheet-friendly data for analysis, sorting, or importing into another tool. Export to Excel creates a formatted .xlsx file with dollar/percent formatting and column widths — best for polished printing or sharing. The browser Print button is intended for quick PDF/print previews of selected columns.
⚠️
Important: browser storage has limits
If you clear your browser's cookies/site data, your saved scenarios will be erased. Use Backup Scenarios to back up scenarios only, or use Backup All Data in Tax Settings to back up scenarios plus calculator inputs, tax defaults, MAGI/HSA preferences, theme, and Scenario Manager column layout.

Scenario Manager

Tip: for the cleanest printed scenario table, export to Excel or CSV and print from your spreadsheet app.
Sort: Filter:
Move column: Choose a visible column, then move it left or right.
← scroll right to see all columns and actions →
💾 Tax Settings changes apply immediately for the current session, but most are not saved automatically for future sessions. Click Save as My Defaults to keep your bracket, deduction, threshold, payroll, and state settings for future sessions on this same device and browser. HSA settings are the one exception — they save automatically when changed.

How Tax Settings works

Edit brackets and rates
Edit federal and state bracket thresholds/rates, deductions, LTCG thresholds, Social Security taxable %, payroll rates, NIIT, Additional Medicare Tax, high-income state surtax, and HSA settings. Changes recalculate the calculators immediately.
Save as My Defaults
After editing Tax Settings, click 💾 Save as My Defaults to persist them in this browser. Otherwise most changes are temporary and may be lost after refresh/browser cleanup.
Back up or restore Tax Settings
Use ⇓ Backup Tax Settings to save only your tax defaults as a JSON file. Use ⇑ Restore Tax Settings to load those defaults on another browser or device. Use Backup All Data for scenarios, inputs, preferences, theme, and Scenario Manager layout too.
Customize for your state
Changing State Name only changes labels. To model another state, update the State Brackets, state standard deduction, exemption credit, SDI rate, HSA state treatment, and any high-income surtax settings. For states with fewer brackets, enter the real brackets in ascending lower-threshold order, then use $0 and 0% for unused rows. If your state has more brackets than this table allows, approximate carefully or revise the code. Then click 💾 Save as My Defaults.
Reset Federal / Reset State / Reset Fed & State — restores built-in IRS and California defaults
Reset Federal restores federal brackets, standard deductions, LTCG thresholds, and payroll rates to built-in IRS values. Reset State restores state brackets and deductions to California defaults. Reset Fed & State resets federal, state, and HSA toggle defaults.
💾
Back up or move your saved settings
Why back up? Your saved calculator data lives only in this browser. Back up before changing computers, switching browsers, clearing website data, or moving between Safari and the iPhone Home Screen version. Backup Tax Settings saves only tax settings. Backup All Data saves everything: calculator inputs, filing status, MAGI/HSA preferences, saved scenarios, Scenario Manager column layout, theme, and saved tax defaults. Use Restore Tax Settings for a tax-settings-only JSON file, or Restore All Data for a full backup file. Save as My Defaults stores current tax settings in this browser. ✕ Clear My Saved Defaults removes saved tax settings so future visits load the built-in federal IRS and California defaults.
⚠️
Your saved defaults are browser-specific
Saved defaults live in this browser's local storage. Clearing browser data will erase them. Use Backup Tax Settings to keep a tax-settings-only backup file, or Backup All Data to move everything to another browser or device.

Tax Settings

Built-in defaults
My browser defaults
Tax settings backup
Full backup
⚙️

federal / state are the page defaults. Edit tax brackets, rates, and assumptions below. Changes apply immediately to all calculators, but save them if you want to keep them for future visits.

For no-tax states, set state brackets to 0%. Also set State SDI Rate to 0% if applicable.
Federal

Federal Brackets (MFJ)

Lower $Rate %

Federal Brackets (Single)

Lower $Rate %
Assumptions — MFJ — Federal
Assumptions — Single — Federal
Assumptions — Both Filing Statuses — Federal & Payroll
Default is . This is the percentage of your Social Security Benefits field included in taxable income. This percentage applies to federal tax only; California and most states exclude Social Security from state taxable income. Social Security taxability thresholds: Use if combined income exceeds (Single) or (MFJ). Use if combined income is roughly (Single) or (MFJ). Use if your income is below (Single) or (MFJ) and you expect no SS to be taxable. Use 100% for conservative modeling or if you intentionally want all Social Security benefits treated as taxable.
Additional Medicare Tax (Form 8959): on wages above the threshold ( Single / MFJ under the federal assumptions shown here). Only applies to earned wages — not investment income (NIIT separately covers that). Set rate to 0% to disable.
State

State Brackets (MFJ)

Lower $Rate %

State Brackets (Single)

Lower $Rate %
Assumptions — MFJ — State
If your state income is high enough, your state may reduce or phase out this exemption credit. The calculator does not automatically model state-specific phaseout worksheets; manually lower this credit, possibly to $0, if your state rules require it.
Assumptions — Single — State
If your state income is high enough, your state may reduce or phase out this exemption credit. The calculator does not automatically model state-specific phaseout worksheets; manually lower this credit, possibly to $0, if your state rules require it.
Assumptions — Both Filing Statuses — State
State Name only changes labels. To actually model another state, edit the State Brackets, state standard deduction, exemption credit, SDI rate, HSA state treatment, and any high-income state surtax settings. No income tax state? Set all state bracket rates to 0%; the lower thresholds do not matter when rates are zero.

State LTCG note: This calculator generally treats long-term capital gains as ordinary income for state tax. Some states tax LTCG differently, including AR, HI, MT, ND, NM, SC, VT, WA, and WI. For those states, state tax may be overstated. See Read Me for details.
Additional state tax on high income, applied to state taxable income above the threshold. California default: Behavioral Health Services Tax / Mental Health Services Tax of above . Set rate to 0% to disable for states without this tax or replace the rate/threshold for another state's high-income surtax.
Affects surplus, not tax — your HSA always reduces federal taxable income and MAGI regardless. No (default): your Expenses don't include the HSA, so it's subtracted as a separate outflow (like a 401(k)). Yes: your Expenses already include it — pick this if you run your HSA as a pay-as-you-go medical account and budgeted those costs in Expenses. When in doubt, leave this on No — if anything it understates surplus slightly, the safer direction to miss.
Most states follow federal tax treatment and allow HSA deductions — set to Yes. California and New Jersey do not recognize HSA deductions at the state level — leave as No (default). When No, the HSA amount reduces federal taxable income but not state taxable income.

Retirement Calculators

I built this free, single-page calculator because retirement spending depends on more than a single withdrawal rate. Income composition, taxes, dividends, taxable brokerage sales, MAGI, ACA subsidies, payroll taxes, state taxes, and withdrawal rates interact, and I could not find a simple tool that brought those pieces together with realistic, composition-aware tax modeling.

It is designed as a one-year snapshot for income and tax planning, answering five related and interdependent retirement-planning questions:

  1. How much surplus or shortfall do I have?
  2. What withdrawal rate do I need?
  3. What portfolio size do I need?
  4. How much earned income do I need?
  5. How much investment income can I take while staying under my MAGI target?

Each calculator uses your inputs and solves for a different unknown. A value that is an input in one calculator may be the unknown that another solves for. For example, Withdrawal Rate is an input in most calculators, but Calculator 2 solves for the needed withdrawal rate.

If this calculator saves you time or helps you think through your own retirement scenarios, feel free to show your support.

✨ What makes this calculator different

Most online retirement calculators either ignore taxes entirely or apply a flat effective rate. Both can produce misleading numbers because real-world tax depends on the composition of your income — not just the total. This calculator is built around that composition.

  • A rare five-way solver — surplus/shortfall, needed withdrawal rate, needed portfolio size, needed earned income, and maximum investment income under an ACA/MAGI target. Many tools answer one or two of these questions, but not all five in one compact interface.
  • Current-year after-tax spendable income focus — useful for early retirees trying to see how taxable brokerage withdrawals, part-time W-2 income, dividends, Social Security benefits, and pension income translate into actual net spending.
  • Composition-aware tax modeling — separates earned wages, Social Security benefits, Pension / Other Ordinary Income, ordinary dividends, qualified dividends, LTCG share-sale residual, ordinary share-sale income, Roth/cash no-tax treatment, and cost basis rather than hiding everything inside a black box.
  • Progressive federal and state brackets — applies bracket math rather than flat tax rates, and stacks qualified dividends and long-term capital gains on top of ordinary income to determine the correct preferential federal LTCG rate.
  • Investment-tax detail — applies cost basis only to the share-sale residual, treats dividends as fully taxable, computes NIIT where applicable, and models high-income state surtax when configured.
  • Payroll-tax detail — computes Social Security, Medicare, Additional Medicare Tax, and state SDI on earned income only, so pension income, Social Security benefits, and portfolio income are not mistakenly treated as wages.
  • ACA/MAGI visibility — a meaningful niche for early retirees balancing dividends, gains, HSA/401(k), Social Security, pension income, and earned income.
  • California-ready but editable — includes California brackets, state treatment of qualified dividends/LTCG as ordinary income, HSA nonconformity, and high-income state surtax assumptions out of the box, while the Tax Settings panel can be edited for another state.
  • No login, local storage only — unlike many modern planners that require accounts, subscription dashboards, or cloud-based data entry.
  • Editable tax settings — users can inspect and adjust brackets, deductions, thresholds, payroll rates, NIIT, Social Security taxable percentage, state credits, and state assumptions, which builds trust for a calculator where tax assumptions are central.

🔢 The five calculators

1) Surplus Calculator
Given my portfolio, income, and spending — do I have extra money each year or a shortfall?
2) Needed Withdrawal Rate
What withdrawal rate would exactly fund my spending?
3) Needed Portfolio Size
How large does my portfolio need to be to support this lifestyle?
4) Needed Earned Income
If I'm still working, how much W-2 income do I need?
5) Max Under MAGI
How much investment income can I take while staying under my MAGI target?

Each calculator answers a different question about the same scenario. Calculator 1 shows where you stand today; 2–4 each adjust a single input to exactly cover your spending; 5 finds the most you can withdraw before hitting your MAGI target. On the All 5 Calculators Dashboard a single Shared Inputs panel drives all five at once — every card uses the same inputs, replacing only the one field it solves for. For independent inputs, open a calculator’s single view.

🧮 Understanding the Dashboard

The five calculators each answer a different retirement question, but they all describe the same financial situation — your portfolio, your income, your spending. The All 5 Calculators Dashboard puts all five side by side so you can see every answer for that one scenario at the same time.

On the left is the Shared Inputs panel. Type your numbers there once — filing status, portfolio value, expenses, dividends, and so on — and all five cards update together. You are not filling out five separate forms; you are describing one scenario, and each card responds to it.

Each card solves for one field, replacing what you typed
This is the key to reading the dashboard. Calculator 2 solves for your withdrawal rate, so it crosses out the withdrawal rate in the shared panel and shows the rate you would actually need. Calculator 3 solves for portfolio value and shows how large your portfolio needs to be. Calculator 4 solves for earned income. Calculator 1 keeps every field as you typed it — it shows where you stand today. Hover over any card to highlight the inputs it uses.

Dashboard vs. a single calculator: Use the dashboard when you want all five answers for one consistent scenario at a glance. Open a calculator’s single view when you want to give that one calculator its own independent inputs without affecting the others.

▶ How to use

  1. Click the Calculator tab
  2. Choose your filing status — MFJ or Single. Each single calculator has its own editable filing status; on the All 5 Calculators Dashboard, the Shared Inputs panel sets one filing status that applies to all five calculators.
  3. Enter your inputs — sample values are pre-loaded as a realistic example
  4. In Calculator 1, click Set WD rate = dividends only, no share sales if you want to model spending dividends without selling shares.
  5. Read the primary result box at the top of each calculator result panel
  6. Save scenarios using the + Save to Scenario Manager button in the active single-calculator view or dashboard card
  7. To customize for a different state, edit the Tax Settings tab. Changing the State Name alone only changes labels; you must also update the state brackets and assumptions.
  8. To track ACA health-insurance planning, enter your chosen MAGI Target in the calculator inputs, such as the applicable FPL-based limit for your household size. Each calculator then shows whether MAGI is over or under target.
  9. Your calculator inputs are saved automatically and reloaded on your next visit. To start fresh, use Reset calculator to sample data or Clear calculator to zero in a single-calculator view. In the dashboard view, use Reset dashboard calculators to sample data or Clear dashboard calculators to zero.
  10. In Tax Settings, bracket and rate changes require clicking 💾 Save as My Defaults to persist — HSA settings save automatically
Not tax or financial advice. Verify all results with a qualified CPA or financial advisor before making decisions. This tool is for planning and exploration only.

⭐ Key features

  • Live recalculation — outputs update on every keystroke; no submit button needed
  • MFJ / Single filing controls — each single calculator can use its own filing status, while the All 5 Calculators Dashboard uses one shared filing status for all five cards; both use the same tax tables
  • Theme — use the "Switch to Aurora" / "Switch to Classic" button in the top bar to toggle between the Classic light theme and the Aurora dark theme
  • Copy inputs — the Copy Calc 1 inputs to 2-5 button copies Calculator 1's inputs into Calculators 2, 3, 4, and 5 in the same view. The dashboard also includes Copy all input values from single calculator view to dashboard.
  • Effective tax rate — shown below Total Tax in every calculator's breakdown
  • Collapsible tax breakdown — click the "Tax Breakdown" title to collapse the detail rows
  • Tax Settings panel — all brackets, rates, thresholds, and deductions are editable; changes apply instantly to all calculators
  • Save as My Defaults — customize Tax Settings for your state, save them to your browser, and they reload automatically on every visit. Use Backup Tax Settings / Restore Tax Settings to move tax settings between devices.
  • Scenario Manager — save, compare, sort, filter, and duplicate scenarios; export as JSON, CSV, or Excel
  • Print-friendly — calculator print buttons create compact calculator reports. Scenario Manager printing is available for quick previews, but Export to Excel or CSV is recommended for the cleanest printed scenario tables
  • MAGI target helper — enter your target in the calculator inputs; each calculator then shows whether your MAGI is over or under target, and by how many dollars.
ACA/FPL timing note
ACA premium tax credit calculations for a coverage year generally use federal poverty line (FPL) thresholds published before that coverage year begins. Current-year coverage can rely on the prior year's FPL guidelines because open enrollment and plan pricing occur before the new year. ACA subsidy rules can change, so verify the current rule and FPL threshold before relying on the MAGI target for planning.
  • No account required — your inputs, scenarios, and settings are stored in your browser's local storage and never transmitted to any server

💵 Calculator 1 dividend-only shortcut

Set WD rate = dividends only, no share sales
Calculator 1 keeps one consistent definition: total desired withdrawal rate includes dividends plus share sales. The dividend-only shortcut sets the withdrawal rate equal to (ordinary dividends + qualified dividends) ÷ portfolio value. This models spending portfolio dividends with no share sales.
Scenario Manager impact
Scenarios save the resulting withdrawal rate, not the button click itself. For example, if dividends are $32,000 and portfolio value is $4,000,000, the saved withdrawal rate is 0.80%. Loading the scenario later restores that withdrawal rate and keeps the calculator consistent with the other calculators.

💡 Key concepts

Ordinary income
Wages, Traditional 401(k)/IRA withdrawals, interest, and ordinary dividends. Taxed at regular progressive federal rates and full state rates.
Long-Term Capital Gains (LTCG)
Profits from selling assets held more than a year. Federally taxed at preferential LTCG rates. Cost basis % applies only to the share-sale residual — not to dividends. A 60% cost basis means 40% of the sale residual is taxed as a realized capital gain.
Example: A $120,000 withdrawal with $5,000 ordinary dividends, $5,000 qualified dividends, and a $110,000 share-sale residual at 50% cost basis produces $55,000 of taxable gain. California then taxes $5,000 ordinary + $5,000 qualified + $55,000 gain = $65,000 CA-taxable investment income before deductions.
Qualified dividends
Dividends from certain stocks held long enough. Taxed federally at LTCG rates. Most states treat them as ordinary income.
Total Desired Withdrawal Rate
The percentage of your portfolio you withdraw per year — this includes dividends. If your portfolio is $1M and your withdrawal rate is 4%, your annual portfolio withdrawal is $40,000 (dividends + share sales combined, not in addition to).

🔢 How the math works

When you enter inputs, the calculator works through this chain:

  1. Compute total portfolio income: Portfolio × Withdrawal Rate
  2. Subtract your dividends (ordinary + qualified) — what's left is the implied "share sale"
  3. Categorize each income stream by tax treatment (ordinary vs. LTCG vs. tax-free)
  4. Apply federal brackets to ordinary taxable income
  5. Stack LTCG on top of ordinary income and apply preferential LTCG rates by threshold
  6. Apply state brackets to state-taxable income (state treats LTCG as ordinary; Social Security benefits are excluded)
  7. Compute payroll taxes on earned income only
  8. Subtract everything to get net income; compare to expenses to get surplus or shortfall

For Calculators 2, 3, 4, and 5, a bisection solver works backwards — it tries values of the unknown variable until the math balances at the relevant target, such as target spending or the ACA/MAGI target.

📋 Income types

Input Federal treatment State treatment
Earned income (W-2)Ordinary bracketsOrdinary brackets + payroll taxes
Social Security benefitsTaxable % included in ordinary brackets ( default, adjustable)Excluded from state taxable income (California and most states); no state income tax or payroll tax on benefits
Pension / other ordinary incomeFully included in ordinary bracketsFully included in ordinary brackets (no payroll tax)
Ordinary dividendsOrdinary bracketsOrdinary brackets
Qualified dividendsLTCG rates (stacked)Ordinary brackets
Share-sale residual (LTCG)LTCG rates on gain portionOrdinary brackets on gain portion
Roth / cash / no-taxNot taxedNot taxed

🏛 Tax coverage

Federal tax coverage
  • Progressive ordinary income tax brackets for MFJ and Single filing status
  • Federal standard deduction settings
  • Long-term capital gains and qualified dividend stacking
  • Net Investment Income Tax where applicable
  • 401(k) and HSA deductions for federal taxable income and MAGI
  • Configurable taxable percentage for Social Security benefits
Payroll tax coverage
  • Social Security payroll tax on wages
  • Medicare payroll tax on wages
  • Additional Medicare Tax on wages where applicable
  • State payroll/disability tax where configured
  • No payroll tax on Social Security benefits, pension income, dividends, or portfolio withdrawals
State tax coverage
  • Editable state name, bracket schedule, standard deduction, and exemption credit settings
  • State treatment of long-term capital gains and qualified dividends as ordinary income unless manually adjusted
  • Social Security benefits excluded from state taxable income (matches California and most states)
  • State HSA conformity or nonconformity based on Tax Settings
  • High-income state surtax where configured
  • Exact rates, brackets, thresholds, deductions, credits, and state assumptions are shown and editable in the Tax Settings tab.

⚠️ Important nuances

Withdrawal rate includes dividends
If your withdrawal rate is 4% and your portfolio is $1M, the model assumes $40,000 of total portfolio income — including dividends. Dividends and share sales are different sources of the same $40k, not additions on top of it.
Why higher ordinary dividends increase the needed withdrawal rate
In Calculator 2, increasing ordinary dividends will increase the rate the solver returns. This isn't a bug — ordinary dividends are taxed at higher rates than LTCG. Shifting income from "share sale at preferential LTCG rates" to "ordinary dividend at regular progressive rates" creates more tax, so you need to withdraw more total to net the same spending.
Why 401(k) or HSA deductions may look offset in solver calculators
In Calculators 2, 3, and 4, the calculator solves backward to hit your target spending. A 401(k) or HSA contribution still reduces federal taxable income and MAGI directly, but the solver may increase the needed withdrawal, portfolio size, or earned income to keep net spending funded. If the extra solved withdrawal is taxed as ordinary income, the offset can be exact: 401(k) contribution reduces MAGI by $1; extra ordinary withdrawal increases MAGI by $1; net MAGI change = $0. So MAGI may appear unchanged even though the deduction is included.
State taxes vary widely
California is built in, but you can enter any state's brackets in the Tax Settings tab. For states with no income tax (TX, FL, NV, SD, WY, AK, TN, NH, etc.), set all state bracket rates to 0%.

Nine states (AR, HI, MT, ND, NM, SC, VT, WA, WI) tax LTCG differently from ordinary income — the calculator will overstate state tax for residents of those states. See the Read Me's "What this calculator does NOT model" section for details.

Social Security is excluded from state taxable income (correct for California and most states); the few states that tax Social Security use income-based phaseouts that are not modeled.

🗺 Customizing for your state

The calculator loads with California-style defaults, but the State Tax Settings are editable. Changing the state name only changes labels; to model another state, also update the standard deduction, exemption credit, bracket schedule, HSA state treatment, payroll/SDI rate, and high-income surtax settings. See the Tax Settings tab for the editable fields.

  • If your state has fewer brackets, enter the real brackets from top to bottom in ascending lower-threshold order, then enter $0 and 0% in any unused bracket rows at the bottom.
  • If your state has more brackets than the table allows or uses special worksheets, the state-tax estimate may require approximation or code changes.
  • For states with no income tax, set the state bracket rates to 0%. Separate taxes outside the ordinary income-tax schedule may not be modeled.

📁 Scenario Manager

The Scenario Manager lets you build a library of "what if" cases side by side.

To save a scenario: run any of the five calculators in a single view or dashboard card, then click + Save to Scenario Manager and give it a name like "Base case — retire 2027".

To load a scenario: go to the Scenario Manager tab, find the row, and click Load — the saved inputs populate into the matching calculator view and the calculator recalculates. Click Duplicate to copy a scenario and modify it, or Delete to remove it.

To sort and filter: use the Sort buttons (Extra/Mo, Withdrawal Rate, Portfolio) and Filter buttons (Calc 1–5) above the table to focus on what matters. Null values always sort to the bottom.

To export or print: use Backup Scenarios for a restorable JSON backup. Use Export to CSV for raw spreadsheet data, or Export to Excel for a formatted .xlsx file with dollar/percent formatting. The Scenario Manager 🖨 Print option is useful for quick previews, but Excel/CSV is usually better for polished printed reports.

To back up and move scenarios only: use Backup Scenarios and Restore Scenarios to move saved scenarios between browsers or devices. Use Backup All Data in Tax Settings to move scenarios plus calculator inputs, Tax Settings, MAGI/HSA preferences, theme, and Scenario Manager column layout.

🔒 Your data never leaves your device. No account required. No login. Your inputs, scenarios, and settings are saved in your browser's local storage and never transmitted anywhere. If you clear your browser's site data, saved scenarios will be erased — use Backup Scenarios regularly to keep a scenarios-only backup, or Backup All Data for a full browser/device transfer.

💾 What saves automatically

  • Calculator inputs — saved on every field change; restored on your next visit
  • Scenarios — saved whenever you click "+ Save to Scenario Manager"
  • HSA settings — saved whenever you change either HSA toggle in Tax Settings
  • Dark mode preference — remembered across visits
  • MAGI target settings — saved automatically when changed
  • User changes to tax brackets and rates — not saved automatically; click Save as My Defaults in Tax Settings to persist them

✅ How the tax math was checked

Multiple independent checks
The tax engine was checked against multiple independent sources before release and after the later Social Security / pension, Additional Medicare Tax, and high-income state surtax changes:
  • PSLmodels Tax-Calculator — an open-source Python library used by economists and tax-policy researchers to model federal tax law. The calculator's federal outputs were compared for the regression scenarios on the overlapping federal items: AGI/MAGI-style income, regular federal tax, NIIT, and total federal income tax.
  • OpenTaxSolver US 1040 + Form 8960 / Form 8959 — open-source tax preparation software run from command-line input files. It was used as a separate federal check for regular federal tax, qualified-dividend/LTCG behavior, NIIT, and Additional Medicare Tax under matching test-year assumptions.
  • OpenTaxSolver CA 540 — OpenTaxSolver's California Form 540 module. It was used to check the California tax-from-California-AGI layer: standard deduction, bracket tax, personal exemption credit, and final CA tax for the overlapping lines. Remaining high-income differences were explained by California exemption-credit phaseout, which is user-adjustable but not automated, and separate high-income surtax line handling.
  • PolicyEngine US — an open-source microsimulation model of US federal and state tax-benefit rules. It was used as an independent cross-check on California results built from raw inputs and on federal results in a matching-year simulation.
  • AARP's federal calculator and California FTB materials — selected federal cases were checked against AARP's federal calculator, including complex investment-income and NIIT cases. California bracket math and state constants were checked against California FTB materials.
Payroll taxes were checked against published Social Security, Medicare, Additional Medicare Tax, and state SDI assumptions. The regression and external checks covered both filing statuses, earned wages, Social Security taxable percentage, Pension / Other Ordinary Income, ordinary and qualified dividends, long-term capital gains, ordinary share-sale income, 401(k) and HSA deductions, NIIT, Additional Medicare Tax, California HSA nonconformity, high-income state surtax logic, and a dividends-exceed-withdrawal edge case.

These checks reduce the risk of errors, but this calculator is still an estimate and is not a substitute for professional tax advice.

🚫 What this calculator does NOT model

  • Full Social Security benefit taxation formula — the calculator uses a fixed taxable percentage (default shown in Tax Settings, adjustable by the user) rather than automatically applying the IRS phase-in formula based on combined income. Earlier calculator versions treated the former combined SS / Pension field as fully taxable, so older saved scenarios with Social Security income may show different results after this update.
  • State taxation of Social Security in the few states that tax it — California (built in) and most states fully exclude Social Security from state taxable income, which the calculator models by excluding Social Security from the state base. The roughly eight states that still tax Social Security (e.g. CO, CT, MN, MT, NM, RI, UT, VT) do so through income- and age-based phaseouts that are not modeled; for those states the calculator understates state tax on Social Security.
  • Multi-year projections, inflation, sequence-of-returns risk, or Monte Carlo simulation
  • RMDs, Roth conversions, or account sequencing optimization
  • Itemized deductions — the standard deduction is assumed
  • Alternative Minimum Tax (AMT)
  • Tax credits beyond the basic state exemption credit
  • ACA premium tax credit calculation or Form 8962 reconciliation — the calculator tracks MAGI against a user-entered target but does not calculate the actual subsidy or repayment amount
  • Full federal-to-state adjustment worksheets or state-specific tax worksheets beyond the editable bracket, deduction, credit, HSA, payroll, and surtax settings
  • State exemption-credit phaseouts — some states reduce or eliminate exemption credits at higher incomes using state-specific worksheets. The calculator does not automatically model those phaseouts; adjust the State Exemption Credit manually in Tax Settings if applicable.
  • State LTCG preferential or separate state capital-gains taxes — some states (including AR, HI, MT, ND, NM, SC, VT, WA, and WI) tax long-term capital gains differently from ordinary income. Because this calculator generally treats LTCG as ordinary income for state purposes, state tax may be overstated or otherwise not match those states. For WA residents, set state income-tax bracket rates to 0%; Washington's separate capital gains tax is not modeled.

🔧 Technical notes

  • Tax engine written in vanilla JavaScript; bisection solver runs 60 iterations per calculation for precision equivalent to less than a penny on any result
  • All data stored in browser localStorage — see "What saves automatically" above for details
  • Print-optimized CSS included; use calculator header print buttons for calculator reports. For wide Scenario Manager tables, Export to Excel or CSV usually prints more cleanly than browser print.

📝 Calculation changelog

2026-06-14 — Fixed California tax on Social Security: California fully excludes Social Security benefits from state taxable income (Schedule CA 540 subtraction, R&TC §17087), but the calculator had been including the federally-taxable portion (up to 85%) in the California base. Social Security is now excluded from the state computation; the federal treatment (up to 85% taxable) is unchanged. California tax is lower and net income higher for any scenario with Social Security benefits.
2026-06-06 — Visual interface changes were made to the website, including layout and usability updates, but the underlying calculation engine was unchanged.
2026-06-03 — Added Additional Medicare Tax (Form 8959) on wages above the configured threshold. Previously not modeled; high-wage earners' payroll taxes were understated. The rate and thresholds are configurable in Tax Settings.
2026-06-03 — Added configurable high-income state surtax on state taxable income above the configured threshold. Previously not modeled; filers subject to a state high-income surtax could have understated state tax. The rate and threshold are configurable in Tax Settings and can be disabled there for states without this tax.
2026-06-03 — Added configurable Social Security taxable percentage in Tax Settings. Previously Social Security and pension income were treated the same way for tax purposes. The taxable percentage can now be adjusted in Tax Settings. Saved scenarios from the prior version that included Social Security income may show different taxes after this update.
2026-06-03 — Fixed Calculator 4 (Needed Earned Income): the bisection solver's lower-bound probe was missing the Pension / Other Ordinary Income value, causing Calculator 4 to overstate needed earned income when pension income was entered. Calculators 1, 2, 3, and 5 were unaffected.
2026-06-03 — Split the former combined SS / Pension input into separate Social Security Benefits and Pension / Other Ordinary Income fields. Pension / Other Ordinary Income is treated as fully taxable ordinary income with no payroll tax. Social Security Benefits use an adjustable Social Security Taxable % setting. Earlier calculator versions conservatively treated the former combined SS / Pension field as 100% taxable. The default is now 85% for Social Security benefits, and users can adjust the taxable percentage in Tax Settings to better match their income situation.
2026-06-01 — Added Calculator 1 “Set WD rate = dividends only, no share sales” shortcut. This sets the withdrawal-rate input so total withdrawal equals ordinary plus qualified dividends, allowing users to model spending dividends without share sales while preserving the calculator’s definition that withdrawal rate includes dividends plus share sales.
2026-05-30 — Fixed federal LTCG / qualified dividend tax for retirees with low ordinary income. When earned income and ordinary dividends fall below the standard deduction, the unused portion of the deduction now correctly reduces the LTCG taxable amount before rate stacking, matching the IRS qualified dividend and capital gain tax worksheet. Previously the calculator overstated federal capital gains tax in this scenario.

💬 Feedback & discussion

This calculator was shared on the Bogleheads forum. If you have questions, found a bug, or want to suggest an improvement, that thread is the best place to reach me.
© All rights reserved. This calculator and its source code may not be copied, modified, redistributed, or used as the basis for other products without explicit written permission.
Model notes and disclaimer
Disclaimer: This calculator is for educational and planning purposes only. Results are estimates and may contain errors. It is not tax, legal, investment, financial, or insurance advice. Verify results independently and consult a qualified professional before making financial decisions.
Key assumptions: Federal tax uses settings; California uses settings unless changed in Tax Settings. Total Desired Withdrawal Rate is inclusive of dividends. Cost basis % applies to share-sale residual only, not dividends. NIIT is on investment income above the applicable MAGI threshold.
Model limits: State tax modeling may not reflect every state-specific rule. State LTCG preferences (AR, HI, MT, ND, NM, SC, VT, WA, WI) are not modeled. Payroll taxes include Social Security, Medicare, and state SDI on wages only; Social Security and pension income are not subject to payroll taxes. The calculator does not model every tax item, credit, deduction, phaseout, carryover, AMT item, Form 8962 detail, or state-specific adjustment.