Home›Money›Compounding for Retirement

How Compound Interest Works in a 401(k) and an IRA

The formula is identical inside a retirement account. The tax timing, the way money goes in, and the decades of patience are what differ. Worked over 30 and 40 years at a stated assumed return.

14 min readUpdated October 2026Compound Interest Calculator

A 401(k) and an IRA compound exactly like any other account, but the money enters through pay or direct contributions, grows under different tax timing, and is left alone for decades. The retirement version, worked over 30 and 40 years.

Key takeaways
  • The compounding formula is identical inside a 401(k) and an IRA; the tax timing, contributions and horizon are what differ.
  • At an assumed 7%, $10,000 plus $200 a month reaches $325,159.17 over 30 years, of which $243,159.17 is growth.
  • Ten more years more than doubles the outcome: $200 a month reaches $243,994.20 over 30 years and $524,962.68 over 40 years.

The same formula, a different account

Compound interest inside a 401(k) or an IRA works exactly as it works in a savings account: interest, or investment growth, is added to the balance, and the next period growth is calculated on the new, larger balance. The formula is the one the calculator on this hub uses, A equals P times one plus r divided by n, raised to n times t, where P is the starting amount, r is the annual rate, n is the number of compounding periods a year, and t is the number of years. What changes inside a retirement account is everything around the formula: how money goes in, how it is taxed, how it is invested, and how long it is left alone. This guide works the retirement version in full, with the numbers run over 30 and 40 years, so the account can be judged on its own compounding, not on slogans about it.

The first point to settle is what compounds. A 401(k) or IRA balance is not cash earning bank interest; it is invested, usually in funds holding stocks and bonds, and the growth is the return on those investments, which varies year by year and can be negative in some years. The calculator smooths that into a single assumed annual return, which is a modelling convenience, not a description of any real year. A 7% assumed return means 7% every year in the model. Real returns arrive as a sequence — a strong year, a flat year, a falling year — and the order matters, especially near retirement. The model is still useful, because over decades the average dominates the sequence for a saver who keeps contributing, but it must never be read as a promise. Every figure in this guide states its assumed return, and none of them is a forecast.

401(k) versus IRA: how money goes in

A 401(k) is an employer plan. Contributions usually come out of pay, often before tax in a traditional 401(k), and the employer may add a matching contribution, typically tied to how much the employee contributes. The investments are chosen from the plan menu, the money stays in the plan while employed, and withdrawals before retirement age are restricted and costly. An IRA is an individual account opened directly with a provider. Contributions are made by the individual, the investment choice is wide, and the account is portable across jobs and providers. A traditional IRA and a Roth IRA differ in tax timing: traditional contributions may be tax-deductible and withdrawals in retirement are taxed, while Roth contributions are made with after-tax money and qualified withdrawals in retirement are tax-free. The 401(k) has the same traditional and Roth variants in many plans. The compounding inside each variant is identical; the tax timing is what differs, and tax timing changes the spendable result even when the balance is the same.

Contribution limits are set by the tax authority and change most years, so this guide states no limit figures: a number printed here would be stale within a year and wrong for readers in different years. The principle that survives every limit change is the order of operations. First, contribute enough to a 401(k) to receive the full employer match, where one is offered, because the match is an immediate addition to the balance that no investment return can match. Second, build the regular habit at a level that can be sustained every month, and raise it when income rises. Third, use the IRA to fill gaps: for a worker without an employer plan, the IRA is the main vehicle; for a worker with one, it is the supplement and the portable backup. The match first, the habit second, the vehicle third — that order matters more than the account label, because the compounding only works on money that actually goes in.

Worked: 30 years at an assumed 7%

Start with $10,000 already saved, add $200 a month, assume 7% a year compounded monthly, and leave it for 30 years. The balance reaches $325,159.17. Contributions total $82,000: the $10,000 start plus $72,000 of monthly deposits. Growth supplies the remaining $243,159.17, nearly three times the money put in. The same $10,000 left alone, with no further contributions, reaches $81,164.97 over the same 30 years, all of it growth on the original deposit. And $200 a month with no starting balance reaches $243,994.20, of which $72,000 is contributions and $171,994.20 is growth. The comparison isolates the two engines: the starting balance compounds for the full thirty years, while each monthly contribution compounds for a shorter time, and together they produce more than either alone. The habit and the head start are both valuable, and neither substitutes for the other.

30 years at assumed 7%, monthly compoundingContributionsEnding balanceGrowth
$10,000 lump sum, no further contributions$10,000$81,164.97$71,164.97
No lump sum, $200 a month$72,000$243,994.20$171,994.20
$10,000 lump sum plus $200 a month$82,000$325,159.17$243,159.17
$10,000 lump sum plus $500 a month$190,000$609,985.50$419,985.50

The last row is the habit scaled up. At $500 a month, contributions total $190,000 over 30 years and the balance reaches $609,985.50, with $419,985.50 of growth. The monthly amount is two and a half times the $200 case, and the ending balance is two and a half times as large, because contributions scale directly while growth scales with them. That proportionality is the most encouraging fact in retirement saving: the lever is the contribution, and it is fully in the saver hands, unlike the return, which is not. A saver who cannot raise the return can still raise the outcome by raising the contribution, and the table shows the reward for doing so, at the same assumed return, over the same thirty years.

What the assumed return does: 5%, 7% and 9%

Change the assumed return and the same contributions produce very different endings, which is why the return assumption must always be stated and always be treated as uncertain. The $10,000 lump sum plus $200 a month over 30 years reaches $211,129.17 at an assumed 5%, $325,159.17 at 7%, and $513,454.46 at 9%. The gap between 5% and 9% is $302,325.29, larger than the total contributions of $82,000, on identical saving behaviour. No saver controls which return the market delivers. What the saver controls is the contribution, the costs, and the time horizon, and the next section shows that time is the most powerful of the three, because it is the exponent in the formula: the balance grows with the number of years in the power, not in proportion to it.

Costs are the quiet return-reducer. Fund expenses, charged as a percentage of the balance each year, come straight out of the return, so a fund charging 1% a year in a 7% world delivers roughly a 6% net return, and over 30 years that single point costs tens of thousands on the balances in this guide. The 401(k) menu and the IRA provider both disclose expenses, and choosing lower-cost funds for the same exposure is one of the few free improvements available in investing: the same market return, less of it taken in fees. Taxes are the other reducer, and they are where the account type matters: growth inside a traditional account is tax-deferred, so the full balance compounds until withdrawal, when withdrawals are taxed; growth inside a Roth account is never taxed again on qualified withdrawals, so the balance shown is closer to the spendable amount. The calculator shows pre-tax balances. The spendable figure depends on the account and the tax rules at withdrawal, which is why the balance and the spendable balance should never be confused.

Starting early: the exponent does the work

Time is the exponent, and exponents punish delay more than intuition expects. At an assumed 7% with $200 a month and no starting balance, 40 years reaches $524,962.68, 30 years reaches $243,994.20, 25 years reaches $162,014.34, and 20 years reaches $104,185.33. Ten extra years, from 30 to 40, more than doubles the outcome, because the later years compound on a balance already swollen by the earlier ones. The first ten years look unrewarding by comparison: $200 a month for the first ten years reaches only a fraction of the 40-year figure, and many savers conclude the habit is not working. It is working. The growth is back-loaded by the mathematics, and the saver who stops in the slow decade never reaches the fast ones. Starting at 25 instead of 35, on the same monthly contribution, is worth more than doubling the contribution at 35, and no catch-up contribution later fully replaces the lost exponent.

The same back-loading explains why the final decade before retirement deserves the most care. By then the balance is large, so a single bad year moves more dollars than a whole early decade of contributions, and the order of returns — the sequence risk — matters most just when there is least time to recover. That is a planning point, not a reason to stop contributing: contributions in the final decade still add directly to the balance, and the employer match, where offered, is still immediate. But the investment mix usually shifts gradually toward stability as retirement approaches, trading some expected growth for less violent swings, because the balance being protected is now the product of thirty years of compounding, and a large fall just before withdrawals begin is the one loss the exponent cannot repair in time.

Withdrawals, and the inflation adjustment

Withdrawals remove money from the compounding engine, and early withdrawals cost twice: the money withdrawn stops growing, and the withdrawal itself can bring income tax plus an additional early-withdrawal tax, depending on the account and the circumstances. Loans from a 401(k), where the plan allows them, avoid the tax cost but carry their own risk: the borrowed money is out of the market while the loan is outstanding, and leaving the job can force rapid repayment, with unpaid amounts treated as withdrawals. The honest rule is that retirement money is for retirement, and the compounding in this guide assumes it stays invested. Any withdrawal plan should be priced with the same calculator used for the saving plan, by entering the withdrawal as a negative contribution and watching the ending balance fall, so the cost is a counted number rather than a vague regret.

Inflation is the final adjustment, and it is the one most often skipped. The balances in this guide are nominal: future dollars, not today dollars. At an assumed 3% inflation, the $81,164.97 that a $10,000 lump sum reaches in 30 years at 7% is worth about $33,438.89 in today purchasing power, and the $524,962.68 that 40 years of $200 a month reaches is worth about $160,930.90 today. Those adjusted figures are not pessimism; they are the same balances measured in the dollars the saver actually spends. The habit still wins, and the growth is still real, because 7% assumed return against 3% assumed inflation is roughly 4% real growth a year, compounded for decades. But any retirement plan that only ever shows nominal balances is overstating the spendable outcome, and the inflation assumption, like the return assumption, should always be stated alongside the figure it adjusts.

The whole guide in one paragraph. Contribute regularly, starting as early as possible, capture the full employer match, keep costs low, and leave the money invested. At an assumed 7%, $200 a month for 30 years reaches $243,994.20 and for 40 years $524,962.68, and the difference between those two figures is ten years of compounding, not ten years of contributions. The formula is simple. The discipline is the hard part, and it is the part that pays.

Frequently asked questions

Does a 401(k) earn compound interest?

Yes, in effect. A 401(k) balance is invested, and the returns on those investments are added to the balance, so future growth is calculated on a larger amount, which is compounding. The growth is investment return, not bank interest, so it varies year by year and can be negative in some years. Over decades, the compounding pattern is the same as the calculator shows, but the return in any single year is never guaranteed.

How does compound interest work in an IRA?

The same way as in any compounding account: contributions and growth stay invested, and each period growth is calculated on the enlarged balance. In a traditional IRA, growth is tax-deferred until withdrawal. In a Roth IRA, qualified withdrawals in retirement are tax-free, so the compounded balance is closer to the spendable amount. The account type changes the tax timing, not the compounding mathematics, and the calculator models the balance before tax in both cases.

How much will $200 a month grow to in a 401(k) over 30 years?

At an assumed 7 percent a year compounded monthly, $200 a month with no starting balance reaches $243,994.20 over 30 years, of which $72,000 is contributions and $171,994.20 is growth. With a $10,000 starting balance as well, the figure is $325,159.17. Both figures assume a steady 7 percent every year, which real markets will not deliver, so treat them as illustrations of the compounding pattern, not as forecasts of any particular account.

Is it better to contribute to a 401(k) or an IRA first?

Usually the 401(k) first, up to the full employer match, because the match is an immediate addition no investment return can match. After the match, the choice depends on fees, investment options and whether an employer plan exists at all: an IRA often offers wider choice and lower costs, while the 401(k) allows larger contributions. Workers without an employer plan should use the IRA as the main vehicle. The order matters more than the label, and the habit matters more than either.

Do withdrawals from a 401(k) or IRA stop compounding?

Withdrawals do not stop the formula, but they remove the money the formula works on, so all future growth on the withdrawn amount is lost. Early withdrawals can also bring income tax plus an additional early-withdrawal tax, depending on the account and circumstances. Loans from a 401(k) keep the money out of the market while outstanding and can become withdrawals if employment ends. Price any withdrawal with the calculator before taking it, so the cost is counted.

What is the difference between compound interest and simple interest in retirement accounts?

Simple interest pays only on the original amount, so growth is a straight line. Compound interest pays on the growing balance, so growth accelerates. Over 30 years at an assumed 7 percent, $10,000 at simple interest earns $21,000 of interest, while the same $10,000 compounded annually reaches $76,122.55, a gain of $66,122.55. Retirement accounts compound, which is why long horizons produce balances far larger than the contributions alone would suggest.

Try it on the calculator

Run your own starting balance and monthly contribution through the calculator to see your compounding over 30 or 40 years.

Open the Compound Interest Calculator
Related guides

Similar Posts