Compound interest calculator: the formula, step by step

By · · 6 min read · How we write our guides

A compound interest calculator takes a starting amount, how much you add each month, a yearly rate and how many years, and shows what the balance could grow to, because each period's interest starts earning interest too. For example, $5,000 plus $200 a month at a made-up 6% a year grows to about $223,620 after 30 years, of which $77,000 is money you put in. Try your own numbers in the calculator below. This guide also shows the formula behind any calculator, so you can check one, build your own in a spreadsheet, and see what the result can and can't tell you.

If you want the idea first, see compound interest, with worked examples. This page is the math.

Try the numbers

Compound interest calculator

Rates for
Use today's rate, or type your own

Made-up example. Savings and CDs pay a stated rate (APY). Stocks and funds don't: some years are negative.

All rates are yearly (APY): what you'd earn in a year, compounding included. Deposits go in each month.

A fund's expense ratio (MER in Canada). It comes off the rate.

Could grow to about

$223,620 after 30 years at 6.0%

An illustration, not a forecast.

You put in$77,000
Growth on top$146,620

A few points either way: $153,271 at 4.0%, $332,023 at 8.0%.

By decade
AfterYou put inPut inBalanceGrowth on topGrowth
10 years$29,000$41,449$12,449
20 years$53,000$106,723$53,723
30 years$77,000$223,620$146,620

The same money, three ways, after 30 years

  • At your rate (6.0%)$223,620
  • In a regular bank savings account (0.38%)$81,847
  • Just what you put in$77,000

Before inflation, which shrinks what a dollar buys: compound interest, with worked examples. Works the same in US or Canadian dollars.

What a compound interest calculator asks for

Most calculators, including the free one on the SEC's Investor.gov, ask for the same things:

InputWhat it meansIn the example
Starting amountWhat you put in on day one$5,000
Monthly additionWhat you add every month$200
Yearly rateThe yearly interest rate or return you assume6% (made up)
YearsHow long it grows30
CompoundingSome calculators also ask how often interest is added. If your rate is already a yearly figure (APY), it's built inBuilt into the 6%

Investor.gov's calculator also asks for a "variance range", a band above and below your rate, so you see a spread of results instead of one number. That's a useful habit: the rate is the input you know least about.

The formula behind every calculator

With no monthly additions, compound interest is one formula:

A = P × (1 + r/n)^(n × t)

Here's what that means, in plain terms:

  • A is the balance at the end.
  • P is the starting amount.
  • r is the yearly rate as a decimal (6% is 0.06).
  • n is how many times a year interest is added (12 for monthly).
  • t is the number of years.

Example: $5,000 at a made-up 6% a year for 30 years is $5,000 × 1.06^30, about $28,717. A rate quoted as APY already includes compounding, so n is 1. If a rate is quoted as compounded monthly instead, 6% that way works out to about 6.17% a year, which is why the two kinds of quotes don't match. Either way, the rate and the years matter far more than how often interest is added.

Adding monthly contributions

Regular deposits need a second piece. Each $200 grows from the month it goes in, and the formula adds them all up:

Monthly additions = PMT × ((1 + i)^N − 1) ÷ i

PMT is the monthly amount, i is the monthly rate that adds up to the yearly one ((1 + r)^(1/12) − 1, about 0.487% at 6%) and N is the number of months (360 for 30 years). This version assumes each deposit goes in at the end of the month. For $200 a month at a made-up 6% a year for 30 years, it comes to about $194,903. Add the $28,717 from the starting amount and the total is about $223,620.

A worked example, decade by decade

Same inputs: $5,000 to start, $200 a month, a made-up 6% a year, nothing taken out.

AfterYou put inBalanceGrowth on top
10 years$29,000$41,449$12,449
20 years$53,000$106,723$53,723
30 years$77,000$223,620$146,620

In the first 10 years, growth is less than half of what you put in. By year 30, growth is about twice what you put in. That's compounding: the last decade adds more than the first two combined, because it builds on everything before it.

How much the rate changes the answer

Same $5,000 and $200 a month for 30 years, at three made-up rates:

Yearly rate (made up)Balance after 30 years
4%$153,271
6%$223,620
8%$332,023

Two points of rate either way changes the answer by roughly $70,000 to $108,000. That's why it's worth trying more than one rate, and why the fees in the next section matter.

Do it yourself in a spreadsheet

Excel, Google Sheets and Numbers all have a future value function, FV, that does the whole calculation in one cell:

=FV((1+6%)^(1/12)-1, 360, -200, -5000)

The four parts are the monthly rate (the one that adds up to 6% a year), the number of months (30 years × 12 = 360), the monthly addition and the starting amount. The amounts are entered as negatives because, to the spreadsheet, they're money leaving your pocket. This returns about $223,620, the same as the formula above. Change one input at a time to see what moves the result most.

What a calculator can't tell you

  • The rate is an assumption. A savings account or CD pays a stated rate, shown as APY (annual percentage yield) in the US under the Truth in Savings rules. Stocks, ETFs and index funds don't pay a set rate. Their returns vary, some years are negative, and a calculator's smooth line hides that. Nothing about the math promises a result.
  • Fees compound too. A yearly fund fee comes out of the balance every year. In the example, if a fee trims the made-up 6% to 5%, the 30-year balance is about $184,685 instead of $223,620, roughly $39,000 less.
  • Inflation shrinks the result. The Federal Reserve and the Bank of Canada both aim for about 2% inflation a year (2026). A balance 30 years from now buys less than the same number of dollars today.
  • Taxes can take a share. In a regular taxable account, interest and gains can be taxed along the way. In a Roth IRA (or a TFSA in Canada), growth isn't taxed as it happens, so more of it keeps compounding. See Roth IRA for beginners.

For money that does earn a stated rate: in the US, deposits at an FDIC-insured bank are covered up to $250,000 per depositor, per bank, per ownership category (FDIC, 2026). In Canada, eligible deposits such as GICs at a CDIC member are covered up to $100,000 per eligible category, per member institution (CDIC, 2026). In Canada there's no single required yield figure like APY, so check whether a quoted savings or GIC rate is compounded, and how often, before you put it into a calculator.

How to check your own numbers

  1. Find your real inputs. Your current balance, what you add each month, and, for savings, the APY on your statement.
  2. Pick a few rates, not one. For investments, try a low, middle and high made-up rate and look at the range.
  3. Subtract fees. Find each fund's expense ratio (MER in Canada) and take it off the rate you test.
  4. Run it. Use the calculator above, Investor.gov's free calculator, or the FV line above in a spreadsheet.
  5. Sanity-check with the Rule of 72. Divide 72 by the rate to estimate how many years money takes to double: about 12 years at 6%.

The Bywell course covers this in "Why invest at all: inflation and compounding," in the unit on the basics, using made-up rates like the ones here. When you're ready to put the numbers to work, see how to start investing.

This is general information, not investment advice. Rates here are made up for illustration.

Try this lesson free

Why invest at all: inflation and compounding

7 min · The basics

Right here in your browser, no download. Read it in a few minutes, then answer questions that explain why each answer is right. Free includes the Start here unit, then 3 lessons a day.

Already investing? Follow your stocks and ask Claude or ChatGPT.

Common questions

What is the formula for compound interest?
A = P × (1 + r/n)^(n × t). P is the starting amount, r the yearly rate as a decimal, n how many times a year interest is added, and t the number of years. Monthly additions get a second piece of the formula, shown in this guide.
How do I calculate compound interest with monthly contributions?
Add two parts: the starting amount grown by (1 + monthly rate) to the power of the number of months, plus each monthly deposit grown the same way. For a yearly rate (APY), the monthly rate is (1 + yearly rate)^(1/12) − 1. In a spreadsheet, =FV((1+rate)^(1/12)-1, years × 12, -monthly, -start) does both in one line.
Is a compound interest calculator accurate for stocks or index funds?
Only as a what-if. A calculator assumes the same rate every year. Stocks and funds don't pay a set rate: some years are up, some are down. The math is right; the steady rate is the made-up part.
What rate should I put into a compound interest calculator?
For a savings account or CD, use its APY. For investments there's no right number, so many people try a few rates to see a range. Lower the rate by any yearly fund fee, and remember inflation shrinks what the result buys.
Where can I find a free compound interest calculator?
The SEC's Investor.gov has a free one: you enter a starting amount, a monthly contribution, the years, a rate, a range around that rate, and how often interest compounds. A spreadsheet's FV function does the same math.

Sources

  1. SEC Investor.gov: Compound Interest Calculator
  2. SEC Investor.gov: Rule of 72 (glossary)
  3. CFPB: Regulation DD, Truth in Savings (12 CFR 1030): APY disclosure for deposit accounts
  4. FDIC: Understanding Deposit Insurance ($250,000 per depositor, per insured bank, per ownership category; 2026)
  5. Federal Reserve: Statement on Longer-Run Goals and Monetary Policy Strategy (2% inflation goal)
  6. CDIC: GICs (eligible GICs covered up to $100,000 per eligible category, per member institution; 2026)
  7. Bank of Canada: Why we target 2% inflation (September 2025)

General information and education, not investment advice. Bywell never makes buy, sell or hold recommendations.

Keep reading