401(k) Calculator
Project your retirement balance, solve for required contributions, and compare Roth vs Traditional — fully in your browser.
Roth vs Traditional (after retirement-age tax)
Roth requires more take-home pay because contributions are after-tax. This comparison assumes equal gross contributions in both accounts.
Year-by-year breakdown
| Year | Age | Salary | Employee | Match | Growth | End balance |
|---|
—
What is 401k calculator?
A 401(k) is the most common retirement account in the US — but its mechanics are full of moving parts: contribution limits that change yearly, age-based catch-up rules, employer match formulas with their own caps, and the perennial Roth-vs-Traditional question. This calculator handles all of them in one page, fully in your browser.
The Project balance mode walks year-by-year from your current age out to your retirement age, applying the IRS contribution limit (with auto catch-up at 50 and the SECURE 2.0 super-catch-up at 60–63), your employer match formula, your expected return, and your salary growth rate. The result is a final balance, summary tiles for the four big numbers (final balance, total employee contributions, total employer match, total investment growth), an interactive line chart showing the trajectory, and a year-by-year breakdown table.
The Reach a goal mode flips the question around. Tell it the balance you want by your retirement age and it solves — by bisection — for the percent of salary you need to contribute to get there, capped at the IRS limit each year. If even contributing at the legal cap won’t get you to your number, it tells you that too, along with the best balance you could realistically reach.
Two toggles add the rest of the surface: Compare Roth vs Traditional reveals a side-by-side panel showing each account’s after-tax retirement balance using your estimated marginal rates. Show results in today’s dollars deflates everything by the inflation rate so you can read your future balance in present purchasing power.
Everything runs locally. Nothing is sent to a server. Inputs persist across reloads in your browser only.
When to use a 401k calculator
- Project your retirement balance — Enter your current age, balance, salary, contribution percent, and employer match formula. The calculator projects year-by-year out to your target retirement age, with current IRS contribution limits and age-based catch-up rules applied automatically.
- Solve for the contribution you need — Switch to Reach-a-goal mode, enter the balance you want to retire with, and the calculator returns the percent of salary you need to contribute — bisection-solving against the same projection engine, capped at the IRS limit each year.
- Compare Roth vs Traditional — Toggle the comparison panel on and supply your estimated marginal tax rate at retirement. The calculator shows Traditional's after-tax balance vs Roth's tax-free balance side by side, with a 'Winner' badge based on equal-gross-contribution math.
How to use the 401(k) Calculator
- Enter your current state — Fill in your current age, retirement age, current 401(k) balance, and current annual salary. Defaults assume a 30-year-old with $25k saved earning $75k.
- Set your contribution and match — Enter your employee contribution as a percent of salary, your employer match (e.g., 100% match) and the salary cap on that match (e.g., first 6% of salary). The helper text confirms how the formula reads back.
- Pick growth assumptions — Set the expected annual return (7% is a common long-term equity-heavy default) and an annual salary growth rate. Toggle 'Show in today's dollars' to see results in inflation-adjusted dollars.
- Optional: compare Roth and Traditional — Check the 'Compare Roth vs Traditional' toggle. Enter your estimated marginal tax rate at retirement to see which account ends up with more spendable money.
Worked examples
Mid-career, default match
Input: Age 35, retire at 65, $75k balance, $90k salary, 6% contribution, 100% match up to 6%, 7% return
Output: ≈ $1.5M nominal balance at 65 (≈ $620k in today's dollars at 3% inflation) Reach $1M by 60
Input: Age 30, target $1M at age 60, $25k balance, $75k salary, 7% return
Output: Required contribution ≈ 8.4% of salary (≈ $6,300/yr first year) Roth vs Traditional, equal rates
Input: Same inputs as Example 1, 22% retirement marginal rate
Output: Roth wins — $1.5M tax-free vs Traditional's $1.5M × 0.78 = $1.17M after retirement tax Frequently asked questions
What IRS contribution limits does the calculator use?
Does the calculator handle catch-up contributions automatically?
Why is my employer match smaller than my contribution percent?
min(yourContribution, salary × matchLimit) × matchPercent for each year.What does 'end-of-year compounding' mean?
How is Roth vs Traditional calculated?
(1 − retirementMarginalRate) at the end. This isolates the tax-rate-arbitrage question — Roth wins when your retirement rate is at or above your current rate, because you've prepaid taxes at today's known rate. If your retirement rate is lower than today's, Traditional often wins. The honest caveat: Roth requires more take-home pay because contributions are after-tax.