Skip to content

Latest commit

 

History

History
236 lines (174 loc) · 7.35 KB

File metadata and controls

236 lines (174 loc) · 7.35 KB

Roth IRA Calculator

Free, open-source Roth IRA retirement calculator with 2026 contribution limits.

Calculate your projected tax-free retirement savings with compound growth, catch-up contributions, and a full year-by-year breakdown.

Live Demo License: MIT


Try the Full Version

Use the Roth IRA Calculator on BullRun Forever Tools — includes interactive charts, CSV export, shareable links, and dark mode.


Features

  • 2026 Roth IRA contribution limits ($7,000 under 50 / $8,000 age 50+)
  • Automatic catch-up contribution calculations at age 50
  • Year-by-year tax-free growth breakdown
  • Compound interest projections to retirement
  • 30-year extended projection
  • Estimated tax savings vs. traditional IRA
  • Zero dependencies — pure JavaScript math

2026 Roth IRA Contribution Limits

Age Group Annual Limit Catch-Up Total
Under 50 $7,000 $7,000
50 and older $7,000 $1,000 $8,000

Income Limits (2026)

Filing Status Full Contribution Phase-Out Range No Contribution
Single < $150,000 $150,000 – $165,000 > $165,000
Married Filing Jointly < $236,000 $236,000 – $246,000 > $246,000

Quick Start

npm install
npm run dev

Open http://localhost:5173 to use the calculator locally.


The Math

Core Calculation

The calculator projects year-by-year Roth IRA growth using compound interest with annual contributions capped at IRS limits:

For each year from current age to retirement age:
  1. Start with beginning-of-year balance
  2. Determine contribution limit based on age (under 50: $7,000 / 50+: $8,000)
  3. Add contribution (capped at limit)
  4. Apply annual return: growth = balance × rate
  5. End-of-year balance = balance + growth

Example Calculation

Inputs:

  • Current Age: 25
  • Retirement Age: 65
  • Current Balance: $5,000
  • Annual Contribution: $7,000
  • Expected Return: 8%

Year 1:

Starting Balance: $5,000
Contribution: $7,000 (under limit of $7,000)
Balance after contribution: $12,000
Growth: $12,000 × 0.08 = $960
Ending Balance: $12,960

Year 2:

Starting Balance: $12,960
Contribution: $7,000
Balance after contribution: $19,960
Growth: $19,960 × 0.08 = $1,596.80
Ending Balance: $21,556.80

This continues for 40 years. At age 50, the contribution limit increases to $8,000.

Final Result (40 years):

Total Value:        ~$1,932,528 (tax-free!)
Total Contributed:  ~$289,000
Tax-Free Earnings:  ~$1,643,528

Key Formulas

Calculation Formula
Contribution Limit age >= 50 ? $8,000 : $7,000
Annual Growth balance × (annualReturn / 100)
Total Earnings finalValue - totalContributed
ROI (totalEarnings / totalContributed) × 100
Tax Savings (est.) totalEarnings × marginalTaxRate
Rule of 72 72 / returnRate = years to double

Usage (JavaScript)

import { calculateRothIRA } from './src/calculator.js';

const result = calculateRothIRA({
  currentAge: 25,
  retirementAge: 65,
  currentBalance: 5000,
  annualContribution: 7000,
  annualReturn: 8
});

console.log(result.totalValue);        // ~$1,932,528
console.log(result.totalEarnings);     // ~$1,643,528
console.log(result.yearlyBreakdown);   // Array of yearly data

Output Object

{
  totalValue: number,           // Final Roth IRA balance at retirement
  totalContributions: number,   // Sum of all contributions
  totalEarnings: number,        // Tax-free earnings (value - contributions)
  returnOnInvestment: number,   // ROI percentage
  years: number,                // Years until retirement
  yearlyBreakdown: [            // Year-by-year detail
    {
      year: number,
      age: number,
      startingBalance: number,
      contribution: number,
      contributionLimit: number,
      growth: number,
      endingBalance: number,
      totalContributed: number,
      totalEarnings: number
    }
  ],
  thirtyYearProjection: {       // Extended projection (if < 30 years to retirement)
    totalValue: number,
    totalContributed: number,
    totalEarnings: number
  }
}

Why Roth IRA?

A Roth IRA is one of the most powerful retirement tools available:

  • Tax-free withdrawals — All qualified withdrawals in retirement pay $0 federal income tax
  • No Required Minimum Distributions — Unlike traditional IRAs, you're never forced to withdraw
  • Contribution flexibility — Withdraw your contributions anytime, tax-free and penalty-free
  • Estate planning — Pass tax-free assets to heirs
  • 30+ million Americans use Roth IRAs (Investment Company Institute)

Roth IRA vs Traditional IRA

Feature Roth IRA Traditional IRA
Tax on contributions After-tax (no deduction) Pre-tax (deductible)
Tax on withdrawals Tax-free Taxed as income
RMDs None Required at 73
Early withdrawal Contributions anytime 10% penalty before 59.5
Best if Higher tax bracket in retirement Lower tax bracket in retirement

FAQ

What are the 2026 Roth IRA contribution limits? $7,000 if you're under 50. $8,000 if you're 50 or older ($1,000 catch-up contribution). Subject to income restrictions.

Can I withdraw from my Roth IRA early? You can withdraw your contributions (not earnings) at any time, tax-free and penalty-free. Earnings withdrawn before 59.5 incur a 10% penalty unless you qualify for an exception.

What is a backdoor Roth IRA? A strategy for high earners: contribute to a Traditional IRA (non-deductible), then convert to Roth IRA. Consult a tax professional about the pro-rata rule.

What return rate should I use? The S&P 500 has historically averaged ~10% before inflation (~7% after). Use 7-8% for conservative planning.


More Free Financial Tools

This calculator is part of the BullRun Forever Toolkit — 16 free financial calculators including:


License

MIT License — use freely in your own projects.


Disclaimer

This calculator is for educational and informational purposes only. It is not financial, tax, or investment advice. Consult a qualified financial advisor for personalized recommendations. Past market performance does not guarantee future results.


Built by BullRun Forever
Free financial tools for everyone.