GizmoBench guides
Copyable Compound Interest Formula: Spreadsheet Steps and Private Checks

The standard compound interest formula is A = P(1 + r/n)^(nt), and the continuous-compounding version is A = Pe^(rt). Here, P is the amount you start with, r is the annual rate written as a decimal, n is how many times per year interest compounds, and t is the number of years.
TL;DR:
- Interest grows faster with more frequent compounding, so converting nominal rates to the effective annual rate is essential for accurate comparisons.
- Continuous compounding models interest accruing at every instant, producing slightly higher balances than annual compounding, but is mostly theoretical outside finance models.
- When calculating manually, ensure the rate is in decimal form and match the time unit, and always verify the first year’s result to avoid errors.
- Loan costs increase significantly when interest is compounded more frequently, making it important to compare APRs that include fees rather than just nominal rates.
- Using tools like the Rule of 72 provides rough estimates of doubling time, but precise figures require direct calculation of the compound interest formula.
Table of Contents
- Standard compound interest formula and what each variable means
- Where the formula comes from: a step-by-step derivation
- Compounding frequency, effective annual rate, and APR pitfalls
- Continuous compounding and the constant e
- How to calculate compound interest by hand, spreadsheet, or calculator
- Worked examples: savings, loans, and periodic contributions
- Common mistakes, quick checks, and the Rule of 72
- Running these numbers with GizmoBench’s calculators
- Sources
- FAQ
Standard compound interest formula and what each variable means
In A = P(1 + r/n)^(nt), each letter carries a specific, practical meaning, and mixing one up is the most common source of a wrong answer.

P is the principal, the amount of money you deposit or borrow at the start. If you put $5,000 into a savings account, P = 5,000. r is the annual nominal interest rate, expressed as a decimal rather than a percentage. n is the compounding frequency, or how many times per year the bank applies interest to your balance. t is the time horizon in years and needs to match the same time unit implied by n.
Compounding frequency varies by product and institution, and the OpenStax formula reference lays out the general case for any n. In practice, you will run into a small set of common values:
- n = 1 means annual compounding, interest applied once per year.
- n = 2 means semiannual compounding, interest applied twice per year.
- n = 4 means quarterly compounding, interest applied every three months.
- n = 12 means monthly compounding, common for savings accounts and many loans.
- n = 365 means daily compounding, used by some high-yield savings products.
A quick substitution shows how the pieces fit together. With P = $1,000, r = 0.05, n = 1, and t = 2 years, the formula becomes A = 1,000(1 + 0.05/1)^(1×2) = 1,000(1.05)^2 = $1,102.50. That result matches the numeric example the Consumer Financial Protection Bureau uses to illustrate compounding, where $1,000 at 5% compounded annually grows to $1,050 after year one and $1,102.50 after year two. Notice that the second year’s gain is larger than the first, even though the rate never changed. That gap is the entire point of compounding: interest earns interest.
Where the formula comes from: a step-by-step derivation
The compound interest formula is not an arbitrary shortcut. It falls directly out of applying the same one-period growth rule over and over.
- Start with one compounding period. If you deposit P and earn a rate of r/n for that single period, your balance becomes P + P(r/n), which factors to P(1 + r/n).
- Apply that same growth factor again for the second period. Your new balance is P(1 + r/n) multiplied by another (1 + r/n), giving P(1 + r/n)^2.
- Repeat the pattern. Each additional period multiplies the current balance by another (1 + r/n), so after k periods the balance is P(1 + r/n)^k.
- Count how many periods occur in t years. Since the account compounds n times per year, the total number of periods over t years is nt.
- Substitute nt for k to get the general formula: A = P(1 + r/n)^(nt).
The exponent nt is not a rounding convenience. It is a literal count of how many times the growth factor gets applied, which is why changing either the frequency or the time horizon changes the exponent directly rather than the base.
Once you have A, the interest earned is simply A minus the original principal: Interest = A − P. In the earlier two-year example, the account grew to $1,102.50 from a $1,000 principal, so the interest earned over both years was $102.50. Breaking that into components, the first year contributed $50.00 in interest, and the second year contributed $52.50, the extra $2.50 coming from interest earned on the first year’s interest. That small difference is what separates compound growth from simple interest, where every period would contribute exactly $50.00 and the total after two years would be only $1,100.
Compounding frequency, effective annual rate, and APR pitfalls
Two accounts can quote the same nominal rate and still pay out differently, because the frequency of compounding changes the real return. The effective annual rate, or EAR, converts a nominal rate and compounding frequency into a single number you can compare across products: EAR = (1 + r/n)^n − 1.
Take a nominal rate of 6% compounded at different frequencies:
The nominal rate never changes in this table, but the real annual return climbs as compounding happens more often, an effect the OpenStax chapter on stated versus effective rates recommends checking before comparing two accounts or loans on their nominal rate alone.
Annual Percentage Rate, or APR, is a different figure and a frequent source of confusion. APR is meant to reflect the cost of borrowing including certain fees, not just the interest rate, and it can diverge sharply from the nominal rate when a loan carries short-term finance charges. The CFPB’s explanation of APR notes that a 15% two-week finance charge annualizes to an APR near 400%, because that short-term charge gets stretched across a full year’s worth of periods. When you compare loan offers, checking the APR rather than the quoted period rate keeps you from underestimating the real cost.
Pro Tip: When two savings products list different compounding frequencies, convert both to EAR before deciding which one actually pays more.
Continuous compounding and the constant e
Continuous compounding models what happens when the number of compounding periods per year grows without bound, interest compounding not daily or hourly but constantly. Mathematically, this comes from taking the limit of (1 + r/n)^n as n approaches infinity, and that limit converges to the mathematical constant e, approximately 2.718282, according to the OpenStax formula reference. Substituting that limit into the general formula produces A = Pe^(rt).
Working an example makes the formula concrete. With P = $1,000, r = 0.05, and t = 2 years, A = 1,000 × e^(0.05×2) = 1,000 × e^0.1 ≈ $1,105.17. Compare that to the $1,102.50 result from annual compounding on the same principal, rate, and time: continuous compounding produces a slightly higher balance because interest is, in effect, applied at every instant rather than once a year.
In practice, few real bank accounts compound continuously. The formula shows up mainly in theoretical finance and some pricing models where it approximates very frequent compounding closely enough to simplify the math, and it sets a useful upper bound: no realistic compounding frequency will produce more growth than the continuous case at the same nominal rate.
How to calculate compound interest by hand, spreadsheet, or calculator
Working through the numbers yourself, in a spreadsheet, or with a quick online calculator all follow the same underlying formula, just with different mechanics.
By hand:
- Convert the percentage rate to a decimal by dividing by 100.
- Choose the value of n that matches how often the account or loan compounds.
- Compute the exponent nt first, then raise (1 + r/n) to that power.
- Multiply the result by the principal P, and double check that your time unit for t matches the period implied by n.
In a spreadsheet:
- In Excel or Google Sheets, the formula
=P*(1+r/n)^(n*t)reproduces A directly when P, r, n, and t are entered in separate cells. - The
EFFECTfunction converts a nominal rate and compounding frequency into an effective annual rate automatically, matching the EAR calculation shown earlier. - For a savings plan with regular deposits rather than a single lump sum, the
FVfunction handles the future value of an annuity, andPMTcalculates the payment needed to reach a savings goal.
With an online calculator, entering principal, rate, compounding frequency, and time gets you the same result without manual exponent work. The Percentage Calculator on GizmoBench is useful for the first step, converting a quoted percentage into the decimal form the formula needs, and running through examples on a calculator is a fast way to catch an arithmetic slip before it compounds into a bigger error over several years.
Worked examples: savings, loans, and periodic contributions
Two-year savings, annual versus monthly compounding. With P = $1,000 and r = 0.05, annual compounding (n = 1) over two years gives A = 1,000(1.05)^2 = $1,102.50, matching the CFPB’s own example. Switching to monthly compounding (n = 12) over the same two years gives A = 1,000(1 + 0.05/12)^(12×2) ≈ $1,104.94, a modest increase driven entirely by the higher compounding frequency.
Ten-year savings. Extending the same $1,000 principal and 5% annual rate out to ten years with annual compounding gives A = 1,000(1.05)^10 ≈ $1,628.89. The gap between principal and balance widens each year rather than growing by a fixed amount, which is the visible signature of exponential rather than linear growth.

statistic_callout: Interest on interest. In the CFPB’s two-year example, the account grows from $1,000 to $1,102.50 after two years of annual compounding, with the second year contributing $52.50 versus the first year’s $50.00, the extra $2.50 being interest earned on interest already credited.
Loan example, simple versus compound. Suppose you borrow $2,000 for three years at a 6% annual rate. Under simple interest, the cost is fixed at P × r × t = 2,000 × 0.06 × 3 = $360, for a total repayment of $2,360. Under annual compounding, A = 2,000(1.06)^3 is approximately $2,382, meaning the borrower pays roughly $22 more over three years purely because unpaid interest itself starts accruing interest. The gap grows faster the longer the loan runs or the more frequently it compounds, which is why the CFPB’s material on APR treats compounding structure as a real cost variable, not a technicality. Readers working through debt repayment plans, including the kind of structured budgeting covered in the No Spend Reset Challenge Workbook, will recognize this as the same mechanic that makes carrying a balance more expensive the longer it sits unpaid.
Periodic contributions, future value of an annuity. Lump-sum formulas do not cover the common case of depositing a fixed amount every period. For regular contributions of size PMT, made at the end of each period, into an account compounding n times per year at nominal rate r for t years, the future value is:
FV = PMT × [((1 + r/n)^(nt) − 1) / (r/n)]
Total contributions over the five years were $6,000, so the remaining roughly $801 came from compounding on the deposits made earliest, which had the most time to grow.
Common mistakes, quick checks, and the Rule of 72
A handful of errors account for most wrong answers. Entering a rate as 5 instead of 0.05 inflates the result by a factor of 100. Using n = 12 while leaving t in months rather than years double-counts the period count. Reporting A itself as “the interest” instead of subtracting P is another frequent slip, and one worth watching for specifically since it is easy to miss on a calculator screen.
A fast sanity check is to compute just the first period by hand and confirm the balance rose by roughly r/n of the principal, then confirm each following period’s balance is slightly larger than the last, since compounding should always produce monotonic growth for a positive rate.
For a rough doubling-time estimate without running the full formula, the Rule of 72 divides 72 by the annual interest rate in percentage form.
Pro Tip: Before trusting any compound interest result, recompute just year one by hand. If that single number looks right, the rest of the exponent is just repetition of the same logic.
Running these numbers with GizmoBench’s calculators
Working through exponents by hand is a good way to understand the mechanics, but checking a real savings or loan scenario is faster with a dedicated tool. The APY Calculator on GizmoBench converts a nominal rate and compounding frequency into an effective annual yield, letting you reproduce the EAR comparisons from earlier in a few seconds rather than working through four separate exponent calculations by hand.
To test one of this article’s examples, enter the principal, the nominal rate as a decimal or percentage depending on the field, and the compounding frequency, then compare the output against the $1,102.50 or $1,104.94 figures shown above for the two-year savings case. The Percentage Calculator handles the percent-to-decimal conversion step directly if you would rather not do that arithmetic by hand. Both tools run in the browser with no account needed, and calculations stay on your device rather than being uploaded anywhere. For other everyday math and money tasks, GizmoBench’s everyday tools collection covers percentage, age, and unit calculations in the same no-account format.
Sources
The formulas and worked figures above draw on the CFPB’s compound interest guidance, the CFPB’s explanation of APR, the OpenStax compound interest chapter, and Investopedia’s overview of compound interest and the Rule of 72. A broader overview of compounding frequency and accumulation functions is available on Wikipedia.
FAQ
What is the difference between simple and compound interest?
Simple interest is calculated only on the original principal each period, so it grows by the same fixed amount every time. Compound interest is calculated on the principal plus all previously accumulated interest, which is why the CFPB’s example shows a $1,000 balance gaining $50.00 in year one but $52.50 in year two at the same 5% rate.
How do I convert a percentage rate into the formula?
Skipping this step is one of the most common sources of a wildly incorrect result when calculating compound growth.
Why does compounding frequency change my final balance?
More frequent compounding means interest gets added to the balance more often, so each new round of interest is calculated on a slightly larger amount sooner.
What is the Rule of 72 and when should I use it?
The Rule of 72 estimates how many years it takes an investment to double by dividing 72 by the annual interest rate expressed as a percentage. It works best as a quick mental estimate at moderate interest rates and is not a substitute for the exact compound interest formula when precision matters.
Is APR the same as the compounding rate in the formula?
No, APR often includes fees and other costs on top of the nominal interest rate, so it can be higher than the rate you would plug directly into the compound interest formula. The CFPB notes that annualizing a short-term finance charge can push APR to levels far above the period rate actually charged.