Please enter valid positive numbers for all fields.
Average Yearly Growth Rate (CAGR)
0.00%
function calculateGrowthRate() {
// Get input elements by exact ID
var startInput = document.getElementById("startValue");
var endInput = document.getElementById("endValue");
var yearsInput = document.getElementById("numYears");
var resultBox = document.getElementById("resultDisplay");
var rateDisplay = document.getElementById("growthRateResult");
var diffDisplay = document.getElementById("growthDifference");
var errorMsg = document.getElementById("errorMessage");
// Parse values
var startVal = parseFloat(startInput.value);
var endVal = parseFloat(endInput.value);
var years = parseFloat(yearsInput.value);
// Validation
if (isNaN(startVal) || isNaN(endVal) || isNaN(years) || years <= 0) {
errorMsg.style.display = "block";
errorMsg.innerHTML = "Please enter valid numbers. Years must be greater than 0.";
resultBox.style.display = "none";
return;
}
if (startVal 0) {
// Handling negative to positive growth or zero start mathematically typically requires specific context,
// but for standard CAGR formula, start value must be non-zero and same sign usually.
// We will restrict to positive start values for standard calculation.
errorMsg.style.display = "block";
errorMsg.innerHTML = "Initial value must be greater than 0 for standard growth rate calculation.";
resultBox.style.display = "none";
return;
}
errorMsg.style.display = "none";
// Calculation Logic: CAGR = (End / Start)^(1 / n) – 1
var base = endVal / startVal;
var exponent = 1 / years;
var cagrDecimal = Math.pow(base, exponent) – 1;
var cagrPercentage = cagrDecimal * 100;
// Calculate total absolute growth
var totalGrowth = endVal – startVal;
var totalGrowthPercent = ((endVal – startVal) / startVal) * 100;
// Display Result
resultBox.style.display = "block";
rateDisplay.innerHTML = cagrPercentage.toFixed(2) + "%";
// Formatting context string
var direction = totalGrowth >= 0 ? "increase" : "decrease";
diffDisplay.innerHTML = "From " + startVal.toLocaleString() + " to " + endVal.toLocaleString() + " over " + years + " years." +
"Total absolute change: " + totalGrowth.toLocaleString() + " (" + totalGrowthPercent.toFixed(2) + "% total).";
}
How to Calculate Average Yearly Growth Rate
Calculating the average yearly growth rate is essential for investors, business owners, and analysts who need to understand how a specific value—such as revenue, portfolio value, or user base—has changed over a specific period of time. Unlike a simple average, the standard method for this calculation is the Compound Annual Growth Rate (CAGR).
This calculator determines the smoothed annual rate at which a value grew from its starting balance to its ending balance, assuming the profits were reinvested at the end of each year.
The Formula
To calculate the average yearly growth rate manually, you use the following geometric progression ratio formula:
CAGR = ( End Value / Start Value ) 1 / n – 1
Where:
End Value: The value at the end of the period.
Start Value: The value at the beginning of the period.
n: The number of years (or periods).
Why Use CAGR Instead of Simple Average?
A simple arithmetic average (calculating growth for each year and dividing by the number of years) can be misleading because it ignores the compounding effect of growth.
For example, if a business grows by 50% one year and shrinks by 50% the next, a simple average suggests 0% growth. However, mathematically, if you start with 100, grow to 150, then shrink to 75, you have actually lost value. The CAGR formula correctly accounts for this volatility and provides a single percentage that represents the steady rate required to get from the start value to the end value.
Example Calculation
Let's say you want to calculate the average yearly growth rate of an investment:
Initial Value (Year 0): 10,000
Final Value (Year 5): 18,000
Time Period: 5 Years
Step 1: Divide End Value by Start Value:
18,000 / 10,000 = 1.8
Step 2: Raise the result to the power of one divided by the number of years (1/5 = 0.2):
1.8 0.2 ≈ 1.1247
Step 3: Subtract 1:
1.1247 – 1 = 0.1247
Step 4: Convert to percentage:
0.1247 * 100 = 12.47%
This means the investment grew at an average yearly rate of 12.47%.
When to Use This Calculator
Business Revenue: Determining the steady growth of company sales over a 5 or 10-year period.
Investment Portfolios: Comparing the performance of different assets (stocks vs. bonds) over time.
Population Statistics: analyzing demographic shifts in cities or countries.
Website Traffic: Measuring user acquisition rates year-over-year.