CAGR Calculator API
Compound annual growth rate: the CAGR between two values, the future value at a given CAGR, or the years needed to reach a target. Rates are returned as fractions (0.12 = 12%).
POST /api/v1/tools/cagr-calculatorMCP cagr_calculatorCalculatorsCalculate the compound annual growth rate between two values over years or between two dates, or work backwards to a future value or the years a target needs.
Input
Send these as a JSON object. Unknown fields are rejected.
- mode
- rate: CAGR from begin and end. future: end value from begin and rate. years: time for begin to reach end at rate. (string, one of rate, future, years, default "rate")
- begin
- Beginning value (greater than 0). (number, 0 to …, required)
- end
- Ending value (rate mode) or target value (years mode). (number, 0 to …)
- rate
- CAGR in percent (future and years modes), e.g. 7 for 7% a year. (number, -99.99 to 1000)
- years
- Length of the period in years (rate and future modes). Ignored when startDate and endDate are given. (number, 0 to 1000)
- startDate
- Start date as YYYY-MM-DD; with endDate, sets the period instead of years. (string, up to 10 characters)
- endDate
- End date as YYYY-MM-DD. (string, up to 10 characters)
curl https://pithlab.com/api/v1/tools/cagr-calculator \n -H "Authorization: Bearer $PITHLAB_KEY" \n -H "Content-Type: application/json" \n -d '{"mode":"rate","begin":10000,"end":19500,"years":5}'Example response
{
"ok": true,
"result": {
"mode": "rate",
"cagr": 0.14289655141156077,
"years": 5,
"totalGrowth": 0.95,
"multiple": 1.95,
"text": "10,000.00 to 19,500.00 over 5 years is a CAGR of 14.29% a year (total growth 95%)"
}
}