Illustration of the formula A equals P times one plus r over n, raised to the power n times t

Calculators & everyday math

The Compound Interest Formula Explained

The compound interest formula, A = P(1 + r/n)^(nt), packs four inputs into one line. Once each piece makes sense, the formula can also be turned around to find the starting amount needed or the time a balance takes to grow. This guide walks through it and flags the most common mistakes.

Ready to try the tool this guide describes?

Each part of the formula

  • A — the balance at the end.
  • P — the principal, the starting amount.
  • r — the annual interest rate as a decimal (4% is 0.04).
  • n — how many times per year interest is added (12 for monthly).
  • t — the time in years.
  • r/n is the rate for each period, and nt is the total number of periods.

A worked example

$2,500 at 4% compounded quarterly for 6 years:

  1. Rate per quarter: r/n = 0.04 ÷ 4 = 0.01.
  2. Number of quarters: nt = 4 × 6 = 24.
  3. Growth factor: 1.01^24 = 1.2697346485.
  4. Balance: A = 2,500 × 1.2697346485 = $3,174.34, so the interest is $674.34.

Solving for the starting amount

Rearranged, P = A ÷ (1 + r/n)^(nt). To have $5,000 in 5 years at 4% compounded monthly, the growth factor is (1 + 0.04/12)^60 = 1.2209965939, so the starting amount is $5,000 ÷ 1.2209965939 = $4,095.02. This is often called the present value.

Solving for the time

Taking logarithms gives t = ln(A ÷ P) ÷ (n × ln(1 + r/n)). For a balance to double at 6% compounded monthly: t = ln 2 ÷ (12 × ln 1.005) = 11.58 years.

Common mistakes

  • Using the percentage instead of the decimal: 5, not 0.05, gives a wildly wrong answer.
  • Mixing periods: with monthly compounding both the rate division and the exponent use 12.
  • Rounding r/n early: 0.04 ÷ 12 is 0.003333…, and cutting it to 0.0033 visibly changes a long-term result.
  • Forgetting that A includes the principal: interest earned is A − P.

Compound Interest Formula FAQ

What does n mean in the compound interest formula?
The number of times interest is added per year: 1 for annually, 4 for quarterly, 12 for monthly, 365 for daily.
How do I calculate only the interest?
Work out A with the formula, then subtract P.
Can t be a fraction of a year?
Yes, mathematically. Many accounts only credit interest at the end of each full period, though.
Does the formula include regular deposits?
No. It covers a single starting amount. Regular deposits need a separate annuity formula.
What is the formula for continuous compounding?
A = P × e^(rt), the limit as n grows without bound.

Related guides

Open the tool

Jump into Compound Interest Calculator when you are ready to process your files.

← Back to all guides

More from Looty

Explore Looty’s Ecosystem

Discover more ways Looty can help you learn, organize, create, and make an impact.