The compound interest formula, written out.
A = P(1 + r/n)^(nt). Drop $10,000 into an account paying 7% compounded monthly, leave it for 30 years, and that one line of algebra returns $81,164.97. No contributions, no tax adjustments baked in. Principal times the growth factor, raised to the number of compounding periods.
With regular contributions, the formula extends with an annuity term:
PMT is the payment per compounding period. Contribute $500 a month to a monthly-compounding account and PMT is $500, n is 12. If the account compounds daily, Accruo prorates $500 across that month's 30 daily periods so the math stays consistent.
In Python, both forms evaluate directly:
def compound(P, r, n, t, PMT=0):
growth = (1 + r / n) ** (n * t)
return P * growth + PMT * (growth - 1) / (r / n)What each variable actually controls
P scales linearly. Double P, double the final balance.
r is the annual nominal rate as a decimal. 7% goes in as 0.07.
n is how many times per year interest is credited: daily n = 365, monthly n = 12, quarterly n = 4, annually n = 1. Higher n yields a slightly bigger balance because partial-period interest earns its own interest sooner.
t is years, and it's the variable with the most leverage. Stretching t from 20 to 30 on a $10,000 principal at 7% monthly takes the result from $40,387 to $81,165. Ten extra years roughly doubles the answer.
PMT is the per-period contribution. The annuity term compounds like principal, with each dollar joining the pool at a different point in the schedule.
A 30-year walkthrough with real numbers
Canonical scenario: $10,000 principal, no contributions, 7% annual rate, monthly compounding, 30 years. Accruo runs the formula across 360 months and surfaces per-year totals.
compound(P=10_000, r=0.07, n=12, t=30) # → 81164.97
| Year | Starting balance | Contributions | Interest earned | Ending balance |
|---|---|---|---|---|
| 1 | $10,000.00 | $0 | $722.90 | $10,722.90 |
| 5 | $13,829.66 | $0 | $1,000.07 | $14,829.73 |
| 10 | $19,672.49 | $0 | $1,422.50 | $21,094.99 |
| 15 | $27,985.84 | $0 | $2,023.50 | $30,009.34 |
| 20 | $39,810.49 | $0 | $2,878.50 | $42,688.99 |
| 25 | $56,632.85 | $0 | $4,094.99 | $60,727.84 |
| 30 | $80,567.94 | $0 | $5,825.95 | $86,393.89 |
The interest column tells the story. Year 1 earns $722.90. Year 30 earns $5,826, eight times more, at the same 7% rate. Nothing about the rate changed; the balance it was applied to grew. Year 30's interest alone beats years 1 through 5 combined.
The walkthrough also exposes a quirk. The displayed year-30 ending balance reads $86,393.89, not the $81,164.97 from a single direct application of A = P(1 + r/n)^(nt). Accruo iterates month-by-month then totals each year; the single-shot formula telescopes 360 months into one exponent. Both are right. They answer slightly different questions about how interest accrues in the final period.
Compounding frequency and effective annual yield
Compounding more often than annually pushes the effective annual yield above the nominal rate. 7% compounded monthly has an EAY of (1 + 0.07/12)^12 − 1, or 7.229%. Daily climbs to 7.250%. Continuous compounding tops out at e^0.07 − 1 = 7.251%.
On a $10,000 balance, the gap between annual and daily compounding over 30 years is about $5,800. The frequency lever matters most when the rate is high or the horizon is long. At 4% over 5 years, daily-vs-monthly is under $20.
What the model assumes and where it rounds
Accruo treats contributions as an ordinary annuity: each payment lands at the end of its compounding period. That choice undercounts a 30-year projection by one period's interest on contributions, roughly 0.6% of the annuity at 7% monthly. We picked end-of-period because it matches how 401(k) payroll deductions and most automated savings transfers clear.
The math runs in IEEE 754 double-precision floats and rounds only at render. The table snaps to the nearest cent, but the running balance passed into next year keeps every binary digit. That avoids the rounding drift that plagues calculators rounding at each step.
The model ignores taxes, inflation, and fees. A Roth IRA result is already after-tax. A taxable brokerage sees every dollar of interest reduced by your marginal rate at withdrawal. For inflation-adjusted growth, enter a real rate (historical S&P 500 real return is roughly 7%, which is why we used it above) rather than nominal (~10%).
Where the projection breaks down
The formula is deterministic. Markets are not.
A 30-year projection at a constant 7% is a smoothed average, not a path you'll actually live through. Real returns arrive in clumps: a 26% year, a flat year, a 19% drop. The geometric mean over a long horizon often lands near the assumed rate, but sequence-of-returns risk means two retirees with the same average return can end up in very different places depending on when the bad years fell. We chose not to model volatility in this build. Stochastic returns turn a calculator into a Monte Carlo simulator, and Accruo's audience wants the deterministic skeleton first.
Inflation is the other invisible cost. $86,394 in 2056 dollars at 3% inflation buys what about $35,600 buys today. For purchasing-power planning, enter a real rate. For matching a brokerage statement, enter nominal.
Treat the output as a clean upper bound for a fixed scenario. The lower bound is whatever taxes, fees, withdrawals, and bad-year clustering subtract.
Questions worth answering.
How does a compound interest calculator work?
A compound interest calculator applies the formula A = P(1 + r/n)^(nt) + PMT × [((1 + r/n)^(nt) − 1) / (r/n)], where P is your principal, r is the annual rate, n is compounding periods per year, t is the number of years, and PMT is the per-period contribution. Accruo runs this calculation in your browser every time you move a slider and shows the final balance, total contributions, total interest earned, and a year-by-year breakdown in under a millisecond.
What is compound interest and how is it different from simple interest?
Simple interest is calculated only on your original principal: $1,000 at 5% simple interest earns $50 every year, forever. Compound interest is calculated on your principal plus any interest already earned, so the base keeps growing. The same $1,000 at 5% compounded annually earns $50 in year one, $52.50 in year two, $55.13 in year three, and so on. Over 30 years, simple interest would yield $2,500 in interest, while compound interest yields about $3,322. The longer the time horizon, the larger the gap.
What is the compound interest formula?
The compound interest formula is A = P(1 + r/n)^(nt). Add periodic contributions and it becomes A = P(1 + r/n)^(nt) + PMT × [((1 + r/n)^(nt) − 1) / (r/n)]. A is the final balance, P is principal, r is the annual rate as a decimal, n is compounding periods per year, t is years, and PMT is the contribution per compounding period.
Can I see my balance grow year by year?
Yes. Accruo shows a year-by-year breakdown table directly under the chart. Each row reports the starting balance, contributions added that year, interest earned that year, and the ending balance. Most major calculators (NerdWallet, Bankrate) hide this view or bury it behind extra clicks. Accruo treats the year-by-year table as a first-class output because that is how compound interest actually feels — small in the early years, then suddenly large.
What is the difference between APY and nominal interest rate?
The nominal rate is the stated annual rate (also called APR). APY (Annual Percentage Yield) is the effective annual return after compounding is applied. A 7% nominal rate compounded monthly produces an APY of about 7.229%. Banks advertise savings accounts in APY because it reflects what you actually earn. Most calculators (including Accruo) accept whichever rate you enter, so use APY for the most accurate projection.
How often does compound interest compound (daily, monthly, or annually)?
Most savings accounts compound daily or monthly. CDs and bonds typically compound monthly, quarterly, or semi-annually. More frequent compounding produces slightly higher returns, but the difference shrinks compared to the impact of contribution amount and time horizon. On $10,000 at 7% over 30 years, the gap between annual and daily compounding is roughly $2,000. Accruo lets you test daily, monthly, quarterly, and annual compounding side by side.
How much will $500 a month grow over 30 years at 7 percent?
Contributing $500 a month for 30 years at 7% compounded monthly grows to roughly $591,000, of which about $180,000 is your contributions and the remaining $411,000 is compound interest. Starting with a non-zero balance, contributing more, or extending the horizon materially increases the total. Drag Accruo's sliders to see your exact number for any scenario.
How accurate is Accruo's calculation?
Accruo uses the standard compound interest formula with sub-period simulation for maximum accuracy. It matches the SEC Investor.gov reference calculator within $1 for the standard scenario ($10,000 initial, $500/month, 7%, monthly compounding, 30 years). The year-by-year table gives you per-year precision, and all math runs in your browser using IEEE 754 double precision, rounded at render only.
Why is there no 'Calculate' button?
Because it's not necessary. Accruo recalculates in under 1 millisecond on every slider change, debounced to about 150ms so dragging stays smooth. A button would add a step and slow down exploration. The goal is to let you feel compound interest in real time, not submit a form. Move any input and the entire projection updates instantly.
Does Accruo account for inflation?
Not automatically. Accruo calculates nominal returns, the number your account will actually show. To adjust for inflation, subtract your expected inflation rate from the annual rate. If you expect 3% inflation and want 7% nominal, model 4% to see real (inflation-adjusted) growth. This is the standard approach used by most financial planners and gives you a reasonable picture of future purchasing power.
Does Accruo save my inputs?
No. Accruo stores nothing. Your inputs exist only in the browser's memory for the duration of your session. Refresh the page and everything resets to the defaults. No account. No localStorage. No server. Your financial numbers never leave your device. This is a deliberate privacy choice. Compound interest math does not require a backend.
Is this financial advice?
No. Accruo is a calculator. It computes scenarios based on the numbers you enter. It doesn't know your tax situation, your risk tolerance, your actual investment returns, or your life circumstances. For personalized advice, consult a fiduciary financial advisor. Accruo is a tool for exploring scenarios and building intuition, not for making investment decisions.
What is the Rule of 72?
A quick mental shortcut: divide 72 by your annual interest rate to estimate how long it takes for money to double. At 7%, 72 ÷ 7 ≈ 10.3 years. At 5%, 72 ÷ 5 = 14.4 years. It's approximate but accurate enough for planning conversations. Drag Accruo's years slider and watch the Final Balance roughly double each time you cross a doubling threshold. That's the Rule of 72, compound interest intuition in one division.
Your numbers stay on your device.
Accruo runs entirely in your browser. No data is sent to any server. No financial inputs are stored, logged, or tracked. See the AppCrib privacy policy for full details.
Back to the calculator