The CAGR Formula Is Easy. The Edge Cases Are Where It Bites
Most of us write a growth-rate formula once and stop thinking about it. Then a spreadsheet asks you for a fractional year, or a compounding table disagrees with a bank statement by a few dollars, and the formula stops be
Most of us write a growth-rate formula once and stop thinking about it. Then a spreadsheet asks you for a fractional year, or a compounding table disagrees with a bank statement by a few dollars, and the formula stops being a settled thing.
This post works through the compound annual growth rate from the definition up, then spends most of its time on the cases that actually break it: partial years, sign changes, zero baselines, and the difference between CAGR and a real return series.
At the end there is a link to a free browser-side calculator you can use to check any pair of endpoints while you read.
The definition
CAGR answers one question: what single constant annual rate would take you from a starting value to an ending value over a fixed number of years?
$$A = P \left(1 + \frac{r}{n}\right)^{nt}$$
CAGR is the $r$ that solves that equation for $n = 1$:
$$\text{CAGR} = \left(\frac{A}{P}\right)^{\frac{1}{t}} - 1$$
Three symbols carry the whole thing:
- $P$ — the initial value (principal, starting balance, initial metric)
- $A$ — the final value
- $t$ — the number of years
That is the entire formula. Everything below is about the assumptions it quietly makes.
Worked example
A side project costs \$2,000 in infrastructure in year one. Three years later it costs \$5,000.
$$\text{CAGR} = \left(\frac{5000}{2000}\right)^{\frac{1}{3}} - 1 = 2.5^{0.3333} - 1 \approx 1.3572 - 1 = 0.3572$$
So 35.72% annual growth. That single number is useful precisely because it compresses a changing series into one comparable figure — you can rank it against another project with a different base and a different duration.
Now the part that matters. If the growth was not actually smooth, the underlying numbers might have looked like this:
| Year | Value | Actual YoY change |
|---|---|---|
| 0 | 2,000 | — |
| 1 | 1,100 | -45.0% |
| 2 | 4,400 | +300.0% |
| 3 | 5,000 | +13.6% |
The CAGR of 35.72% describes none of those years. The project shrank 45% in year one. A single rate that "worked" is a statement about the endpoints only, not about the path.
Edge case: fractional years
Most tools ask for whole years. Real timelines are not whole years.
If a portfolio grows from \$1,000 to \$1,100 over 18 months, the period is $t = 1.5$, not 1 or 2:
$$\text{CAGR} = \left(\frac{1100}{1000}\right)^{\frac{1}{1.5}} - 1 = 1.1^{0.6667} - 1 \approx 0.0659$$
6.59% annualized. Notice what happens if you round the period down to 1 year: you get 10.00%, which overstates the rate by roughly 50% relative error. Rounding the period is the single most common way CAGR answers get inflated.
Edge case: a zero or negative baseline
The formula needs $P > 0$ and $A/P > 0$ to be real.
- $P = 0$ — undefined. If the starting value is zero, there is no growth rate; you have absolute changes, not rates. Use an absolute-delta metric instead.
- $P < 0$ — undefined. Negative bases break the fractional exponent, so no real answer exists. This matters more than it sounds: a metric that crosses zero (net income, cash flow, temperature anomaly relative to a baseline) cannot have a meaningful CAGR across the crossing.
- $A < 0$ with $P > 0$ — the ratio is negative, and a fractional power of a negative number is not real. A 50% loss cannot be annualized.
The safe rule: CAGR is only defined for a strictly positive starting value and a strictly positive ending value.
Edge case: the same endpoints, different years
Because the exponent is $1/t$, the rate is sensitive to how you count the period. Two people looking at the same data will disagree if one counts 2024→2026 as two years and the other counts it as three (inclusive counting of both endpoints).
Use elapsed time, not inclusive year count. If the value on Jan 1 2024 is $P$ and on Jan 1 2026 is $A$, then $t = 2$, not 3. If the endpoints are Dec 31 2023 and Dec 31 2026, $t = 3$.
CAGR versus a real return series
CAGR is the geometric mean of the yearly growth factors, expressed as an annual rate. That is exactly what it is good for. It is not:
- Arithmetic average of yearly returns. Averaging +100% and -50% gives +25%. The actual result was 0% ($100 \to 200 \to 100$).
- A forecast. CAGR is backward-looking. Projecting it forward assumes the rate continues, which is a modeling assumption with no evidentiary support.
- A measure of volatility. Two investments can share a CAGR and have wildly different paths. If risk matters, you need the variance of the yearly returns alongside it.
- Comparable across different periods without care. A 40% CAGR over 6 months annualizes to a number that looks like a 40% annual rate but is not comparable to a 40% CAGR over 10 years.
Worked example: comparing two paths
Two portfolios both end at \$4,000 from a \$1,000 start over 3 years:
| Portfolio | Path | CAGR |
|---|---|---|
| Steady | 1,000 → 1,587 → 2,520 → 4,000 | 58.72% |
| Volatile | 1,000 → 4,000 → 500 → 4,000 | 58.72% |
Same endpoints, same CAGR, completely different experiences. The volatile one was down 50% at one point and needed a perfect recovery to finish even. This is exactly why CAGR alone is insufficient for anything involving risk.
Common mistakes
Averaging yearly percentages instead of compounding. Percentages apply to a base that changes. Average the factors and take the root, or use the endpoints directly.
Using calendar years as the period. If the data starts mid-year, $t$ is not the calendar-year count. Use the actual elapsed time, including the fraction.
Ignoring fees, taxes, and inflation. A gross CAGR of 18% and a net CAGR of 15.2% are different facts about the same investment. Compute the CAGR on the numbers that actually landed in your account.
Treating it as a guaranteed rate. CAGR is a summary of what happened, not a promise about what will happen.
Applying it to a non-positive baseline. Covered above; the answer does not exist.
Comparing a CAGR computed over a partial period against one computed over a full period. Annualize both before comparing.
Checking your own numbers
You can verify any endpoint pair against this formula with a free calculator: CAGR Calculator with Growth Table — it takes the initial value, final value, and number of years (including fractional years) and returns the rate plus a year-by-year growth table so you can see where the path deviates from the single blended rate.
All the arithmetic runs locally in your browser. Nothing is uploaded, nothing is stored, and your inputs never leave the page.
This post was written by the Miryori calculators team, the team that builds and maintains the calculator linked above. We show the formula and the arithmetic step by step so you can check every result yourself. Our goal is to make a formula that looks obvious behave predictably — including in the cases where it quietly does not.
Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.