CAGR to Annual Growth Rate Calculator
This calculator helps you understand the Compound Annual Growth Rate (CAGR) and its relationship to the average annual growth rate. CAGR represents the mean annual growth rate of an investment over a specified period of time, assuming the profits were reinvested at the end of each year. It smooths out volatility and provides a more representative growth figure than simple arithmetic averages. The annual growth rate (AGR) is the year-over-year percentage change.
Beginning Value:
Ending Value:
Number of Years:
Calculate Growth Rates
Results:
Compound Annual Growth Rate (CAGR): – %
Average Annual Growth Rate (AGR – Simple Average): – %
function calculateGrowthRates() {
var beginningValue = parseFloat(document.getElementById("beginningValue").value);
var endingValue = parseFloat(document.getElementById("endingValue").value);
var numberOfYears = parseInt(document.getElementById("numberOfYears").value);
var cagrResultSpan = document.getElementById("cagrResult");
var agrResultSpan = document.getElementById("agrResult");
// Clear previous results
cagrResultSpan.textContent = "-";
agrResultSpan.textContent = "-";
// Input validation
if (isNaN(beginningValue) || isNaN(endingValue) || isNaN(numberOfYears) || beginningValue <= 0 || numberOfYears <= 0) {
alert("Please enter valid positive numbers for all fields.");
return;
}
// Calculate CAGR
var cagr = Math.pow((endingValue / beginningValue), (1 / numberOfYears)) – 1;
cagr = cagr * 100; // Convert to percentage
// Calculate individual year-over-year growth rates to find the simple average
var totalGrowth = endingValue – beginningValue;
var simpleAverageGrowth = (totalGrowth / beginningValue) / numberOfYears;
simpleAverageGrowth = simpleAverageGrowth * 100; // Convert to percentage
// Display results
cagrResultSpan.textContent = cagr.toFixed(2);
agrResultSpan.textContent = simpleAverageGrowth.toFixed(2);
}
#cagr-calculator {
font-family: sans-serif;
max-width: 500px;
margin: 20px auto;
padding: 20px;
border: 1px solid #ccc;
border-radius: 8px;
box-shadow: 2px 2px 12px rgba(0,0,0,0.1);
}
.input-section {
margin-bottom: 15px;
}
.input-section label {
display: block;
margin-bottom: 5px;
font-weight: bold;
}
.input-section input {
width: calc(100% – 22px);
padding: 10px;
border: 1px solid #ccc;
border-radius: 4px;
}
button {
display: block;
width: 100%;
padding: 10px;
background-color: #007bff;
color: white;
border: none;
border-radius: 4px;
font-size: 16px;
cursor: pointer;
transition: background-color 0.3s ease;
}
button:hover {
background-color: #0056b3;
}
#results {
margin-top: 20px;
padding-top: 15px;
border-top: 1px solid #eee;
}
#results p {
margin-bottom: 10px;
font-size: 1.1em;
}
#results span {
font-weight: bold;
color: #28a745;
}