Calculate Compound Annual Growth Rate Online

Compound Annual Growth Rate (CAGR) Calculator .cagr-calculator-container { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; max-width: 800px; margin: 0 auto; padding: 20px; background-color: #fff; border: 1px solid #e0e0e0; border-radius: 8px; box-shadow: 0 4px 10px rgba(0,0,0,0.05); } .calc-header { text-align: center; margin-bottom: 30px; background-color: #2c3e50; color: white; padding: 15px; border-radius: 6px 6px 0 0; } .calc-header h2 { margin: 0; font-size: 24px; } .calc-body { display: flex; flex-wrap: wrap; gap: 20px; padding: 20px; } .input-group { flex: 1 1 300px; display: flex; flex-direction: column; } .input-group label { font-weight: 600; margin-bottom: 8px; color: #333; } .input-group input { padding: 12px; font-size: 16px; border: 1px solid #ccc; border-radius: 4px; transition: border-color 0.3s; } .input-group input:focus { border-color: #3498db; outline: none; } .calc-actions { width: 100%; text-align: center; margin-top: 20px; } .calc-btn { background-color: #27ae60; color: white; border: none; padding: 15px 30px; font-size: 18px; font-weight: bold; border-radius: 4px; cursor: pointer; transition: background-color 0.2s; } .calc-btn:hover { background-color: #219150; } .calc-result-box { margin-top: 30px; padding: 20px; background-color: #f8f9fa; border-radius: 6px; border-left: 5px solid #27ae60; display: none; } .result-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; } .result-label { font-size: 16px; color: #555; } .result-value { font-size: 28px; font-weight: bold; color: #2c3e50; } .result-sub { font-size: 14px; color: #7f8c8d; margin-top: 5px; } .calc-content { margin-top: 40px; line-height: 1.6; color: #444; } .calc-content h3 { color: #2c3e50; border-bottom: 2px solid #ecf0f1; padding-bottom: 10px; margin-top: 30px; } .calc-content p { margin-bottom: 15px; } .calc-content ul { margin-bottom: 20px; padding-left: 20px; } .formula-box { background-color: #f1f8ff; padding: 15px; border-radius: 5px; font-family: 'Courier New', monospace; text-align: center; margin: 20px 0; border: 1px solid #d1e8ff; } .error-msg { color: #c0392b; margin-top: 10px; display: none; font-weight: bold; } @media (max-width: 600px) { .calc-body { flex-direction: column; } }

Online CAGR Calculator

Compound Annual Growth Rate (CAGR): 0.00%
Total Growth Percentage: 0.00%
Absolute Difference: 0

Calculate Compound Annual Growth Rate Online

The Compound Annual Growth Rate (CAGR) is one of the most accurate ways to calculate and determine returns for anything that can rise or fall in value over time. Unlike an average annual return, which simply takes the arithmetic mean of yearly returns, CAGR provides a smoothed geometric mean. It answers the question: "If this investment had grown at a steady rate every year, what would that rate be?"

How the CAGR Formula Works

Calculating the compound annual growth rate requires three specific inputs: the value at the beginning of the period, the value at the end of the period, and the duration of time (usually in years). The formula is:

CAGR = (Ending Value / Beginning Value)(1 / n) – 1
  • Ending Value: The final value of the investment or metric.
  • Beginning Value: The initial value invested or the starting metric.
  • n: The number of years or periods involved.

Why Use a CAGR Calculator?

Investors and business analysts prefer CAGR because it eliminates the effects of volatility. For example, if a portfolio grows by 50% in year one and drops by 50% in year two, the average return is 0%, but the actual value has decreased significantly. The CAGR calculation accurately reflects this loss in value over time. It is widely used to:

  • Compare the historical performance of different stocks or funds.
  • Analyze revenue growth of a business over a 5 or 10-year period.
  • Project future value based on historical growth rates.

Real-World Example

Imagine you invested 10,000 in a tech startup. After 5 years, your equity is worth 25,000.

  • Beginning Value: 10,000
  • Ending Value: 25,000
  • Years: 5

Using the formula: (25,000 / 10,000)(1/5) – 1 = 1.250.2 – 1 ≈ 20.11%.
This means your investment grew at an effective steady rate of 20.11% per year.

function calculateCAGR() { // Get input elements by ID var startInput = document.getElementById('cagrStartValue'); var endInput = document.getElementById('cagrEndValue'); var yearsInput = document.getElementById('cagrYears'); var resultBox = document.getElementById('cagrResult'); var errorBox = document.getElementById('cagrError'); // Get values var startVal = parseFloat(startInput.value); var endVal = parseFloat(endInput.value); var yearsVal = parseFloat(yearsInput.value); // Reset error state errorBox.style.display = 'none'; errorBox.innerHTML = "; resultBox.style.display = 'none'; // Validation Logic if (isNaN(startVal) || isNaN(endVal) || isNaN(yearsVal)) { errorBox.innerHTML = "Please enter valid numeric values for all fields."; errorBox.style.display = 'block'; return; } if (yearsVal <= 0) { errorBox.innerHTML = "Number of periods (years) must be greater than 0."; errorBox.style.display = 'block'; return; } if (startVal 0) { // Infinite growth mathematically, handle gracefully errorBox.innerHTML = "Beginning value cannot be zero."; errorBox.style.display = 'block'; return; } // Mathematical Calculation // Formula: (End / Start)^(1/n) – 1 var ratio = endVal / startVal; // Handle negative ending value edge case (CAGR typically used for positive asset growth, but math works if ratio is positive) if (ratio <= 0) { errorBox.innerHTML = "The ending value results in a negative or zero ratio, which cannot be calculated using standard CAGR formulas."; errorBox.style.display = 'block'; return; } var power = 1 / yearsVal; var cagrDecimal = Math.pow(ratio, power) – 1; var cagrPercent = cagrDecimal * 100; var totalGrowthDecimal = (endVal – startVal) / startVal; var totalGrowthPercent = totalGrowthDecimal * 100; var absDiff = endVal – startVal; // Display Results document.getElementById('resultPercentage').innerHTML = cagrPercent.toFixed(2) + '%'; document.getElementById('totalGrowth').innerHTML = totalGrowthPercent.toFixed(2) + '%'; document.getElementById('absDiff').innerHTML = absDiff.toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2}); var summaryText = "Your investment grew from " + startVal.toLocaleString() + " to " + endVal.toLocaleString() + " over " + yearsVal + " years."; document.getElementById('resultSummary').innerHTML = summaryText; resultBox.style.display = 'block'; }

Leave a Comment