Finance Runs locally Ready to use Built-in examples No tracking

Compound Interest Calculator

Calculate compound interest on a lump sum plus monthly contributions with a yearly breakdown. Everything runs locally in your browser.

Compound interest is the reason a retirement or education fund can look flat for a decade and then take off: the curve is not a straight line, and the steepest part is always at the far end. Enter the starting balance, a monthly contribution, an annual return and a number of years, pick the compounding frequency, and the final balance, total contributions, total earnings and effective annual return come back with a year-by-year table.

A nominal 6% compounded monthly is an effective 6.17% a year ((1 + 6%/12)^12 − 1), and the gap widens as the rate rises. Monthly contributions are treated as an ordinary annuity, credited at the end of each period; assuming the start of the period instead shifts the answer slightly. The return is an assumption, not a promise — real investments fluctuate, so the table describes a smooth path that no market actually delivers.

%

How to use

  1. Enter the starting balance, the monthly contribution, the annual return and the number of years.
  2. Choose the compounding frequency (yearly, half-yearly, quarterly, monthly or daily).
  3. Read the final balance, total contributed, total earnings and the effective annual return.
  4. Use the year-by-year table to see where the curve steepens; everything runs locally.

How it works

The compound interest formula

Compound interest formula: final balance = principal x (1 + monthly rate)^months + monthly contribution x ((1 + monthly rate)^months - 1) / monthly rate. Each period's return is added to principal and earns interest again — why compounding grows faster than simple interest.

How monthly contributions are computed

Monthly contributions are treated as end-of-month (ordinary annuity convention): the current month's contribution starts earning next month. For example 10,000 principal, 1,000 monthly, 5% annual over 10 years gives about 170,700, of which 130,000 is contributions and about 40,700 returns.

Compounding frequency and effective annual rate

Compounding frequency determines the effective monthly rate: monthly rate = (1 + annual rate / compounds per year)^(compounds per year / 12) - 1. At the same 5% annual rate, annual compounding gives 5.00% effective, monthly 5.12%, daily about 5.13% — higher frequency earns slightly more but with diminishing gains.

Code example

JavaScript Compound future value plus a regular-contribution annuity

function compound(principal, monthly, annualRate, years, freqPerYear) {
  const r = annualRate / freqPerYear;
  const n = years * freqPerYear;
  const fvLump = principal * Math.pow(1 + r, n);          // the lump sum
  const monthsPer = 12 / freqPerYear;
  const fvSip = monthly * monthsPer *
    (Math.pow(1 + r, n) - 1) / r;                          // future value of the contributions
  return { total: fvLump + fvSip,
           invested: principal + monthly * years * 12 };
}

compound(100000, 1000, 0.06, 10, 12);   // ≈ 337,000 (220,000 invested)

Python The same formulas in Python

def compound(principal, monthly, rate, years, freq=12):
    r, n = rate / freq, years * freq
    fv_lump = principal * (1 + r) ** n
    fv_sip = monthly * (12 / freq) * ((1 + r) ** n - 1) / r
    return fv_lump + fv_sip, principal + monthly * years * 12

compound(100000, 1000, 0.06, 10)   # (≈337000, 220000)

# Effective annual rate: (1 + rate/freq) ** freq - 1

FAQ

What's the difference between compound and simple interest?

Simple interest earns on principal only, and interest doesn't earn interest; compound interest adds each period's interest to principal so the next period earns on it too — "interest on interest." The longer the time, the wider the gap: 10,000 at 5% over 10 years is 15,000 simple, about 16,289 compounded.

Does higher compounding frequency earn more?

At the same annual rate, more compounding periods raise the effective annual rate but with diminishing returns: annual 5.00%, monthly 5.12%, daily about 5.13%, after which more frequency barely changes. Don't accept worse product terms just for extra compounding.

How are monthly contributions compounded?

This tool treats contributions as end-of-month: the current month's contribution earns from next month, an ordinary annuity convention. If your deposit is actually at month start, the result is slightly higher.

Can an annualized return be used directly as a compound rate?

Only if all returns are reinvested and actual returns match the annualized figure. The "7-day annualized" and "performance benchmark" figures on products are historical or expected, not guaranteed; money-market funds that settle daily are closer to daily compounding.

Why does the result differ slightly from the platform's?

Mainly three sources: whether contributions are month-start or month-end, the compounding convention (nominal or effective annual), and whether the platform deducts subscription/redemption and management fees. This tool standardizes on month-end contributions and converts by the chosen frequency, for easy comparison.

Is it suitable for retirement or education funding?

For rough estimates, yes — e.g. back-solving a target into the needed principal or monthly contribution. Real planning also needs inflation, fees and return volatility, so set a conservative rate (like 3-5%) and leave a margin.

How many years to double the principal?

Use the Rule of 72: doubling years is about 72 / annual rate. 5% is about 14.4 years, 8% about 9, 12% about 6. It works for quick mental math in the 5-12% range; for an exact value, set the final balance to twice the principal and try years here.

Are my principal and return rate recorded?

No. Principal, contribution amount and rate are used only in your browser and aren't sent to a server, and we have no interface to collect them. The "history" at the bottom is just local storage (localStorage) in your browser, gone on a device change or when you clear browser data, and clearable anytime. The tool works offline — proof that it needs no connection.

Should I account for inflation?

Yes, advisable. The results above are "nominal" final values; purchasing power subtracts inflation: real rate is about (1 + nominal) / (1 + inflation) - 1. At 5% with 2.5% inflation, the real rate is only about 2.44% — 10,000 growing to 16,289 in 10 years is worth only about 12,700 in today's money. Long-term planning needs the real rate.

Is weekly contributing much different from monthly?

Very little, usually under 0.5% — not worth changing your habit. The same rate earns slightly more when invested earlier and longer, so weekly edges out monthly, but the effect is far smaller than "1% more return" or "0.5% lower fees." This tool computes monthly (end-of-month); for weekly, multiply the monthly amount by 4.33 to approximate, or just use the monthly result — the error is negligible.

What happens if I pause contributions midway?

The invested portion keeps compounding; there's just no new principal, so the final value is clearly lower. Set "monthly contribution" to 0 and compare — the difference is what those contributions added (including their own compounding). This is why "start early, never stop" matters more than "start late, invest more" — time is the multiplier in compounding.