# CAGR and ROI calculator documentation

Inputs, formulas, assumptions and API/MCP examples for the cagr and roi calculator. Reproduce a calculation and cite its sources.

Canonical calculator: https://klarfort.com/tools/cagr-calculator/
Content updated: 2026-09-07
Assumptions reviewed: 2026-09-07

## Overview
Measure the annualized growth between a starting and ending value over a chosen number of years. CAGR means compound annual growth rate; total return measures the overall percentage change for the full period.

Reverse calculations let you enter an assumed growth rate to find a future value, the starting amount required or the years needed to reach a target. These calculations exclude intermediate deposits and withdrawals.

## How to use
1. Choose whether to calculate a growth rate, future value, present value or duration.
2. For a growth rate, enter the starting value, ending value and number of years.
3. For a reverse calculation, enter the known value, assumed annual growth rate and either the time or target.
4. Calculate and check the result unit. Growth is a percentage, duration is in years and value modes use your currency.

## Understanding the result
CAGR is the constant annual rate that connects the two values. Total return reports the full-period gain or loss without annualizing it. Neither describes the path taken between those values.

An unavailable duration means the entered rate cannot reach the target in a nonnegative number of years. A zero rate reaches only an unchanged target.

## Questions
### How is CAGR different from total ROI?
CAGR annualizes compound growth over the entered years. The total return shown here is the ending value divided by the starting value, minus one, without adjusting for interim cash flows or transaction fees.

### Can I use CAGR when I made extra deposits?
Not as a cash-flow-adjusted performance measure. Deposits and withdrawals change the ending value but are excluded here. Use values without interim cash flows, or interpret the result only as growth between the two balances.

### Can the calculator handle losses?
Yes. A positive starting value and a lower nonnegative ending value produce negative total and annualized returns. An ending value of zero represents a complete loss and produces a negative 100% CAGR.

## Default worked example
Compound annual growth rate: 7.18 %. Compound annual growth rate from the starting and ending values; interim cash flows are excluded. Assumptions as of 2026-09-07.

## Formula
CAGR = (end/start)^(1/years) − 1; total return = end/start − 1. Reverse modes use end = start × (1 + annual growth)^years.

- Interim deposits, withdrawals and transaction fees are excluded. CAGR requires a positive start and a nonnegative end. Duration requires positive start and end and a growth direction capable of reaching the target.

## Inputs
- currency: Currency; default "USD"
- mode: Calculation mode; default "calculate"
- startValue: Starting value; default 10000
- endValue: Ending value; default 20000
- years: Years; default 10
- annualReturn: Annual growth rate (%); default 7

## Interfaces
Input schema: https://klarfort.com/tools/cagr-calculator/schema.json
Worked request and response: https://klarfort.com/tools/cagr-calculator/examples.json
Public table: https://klarfort.com/tools/cagr-calculator/table.json
JSON API: POST https://klarfort.com/tools/api/v1/cagr-calculator
MCP endpoint: POST https://klarfort.com/tools/mcp
MCP tool name: cagr-calculator

## JSON request body
```json
{
  "currency": "USD",
  "mode": "calculate",
  "startValue": 10000,
  "endValue": 20000,
  "years": 10,
  "annualReturn": 7
}
```

## Usage and credit
Free for personal, commercial and any other lawful use with credit to KlarFort at https://klarfort.com/. Third-party data terms still apply.

Computed with KlarFort Calculators, https://klarfort.com/

Place a visible credit near the reused material or in the credits for your work or integration. One clear credit per work or integration is sufficient; no separate credit per API request is required. The credit_url field contains the homepage. The citation_url field is an optional calculator reference. Full permission: https://klarfort.com/tools/docs/license/

## Sources
KlarFort calculation methodology: https://klarfort.com/tools/methodology/ (1)
