# CAGR Calculator

> CAGR Calculator is a paid API for AI agents from agent402.tools, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-15).

Computes the Compound Annual Growth Rate (CAGR) and total growth percentage between a beginning value and an ending value over a specified number of years.

## Facts

- Endpoint: POST https://agent402.tools/api/cagr
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/cagr-calculator-75a27b0b
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_-2_UBOzqnLWWVDFG6mTgx

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability cagr-calculator-75a27b0b -d '<json body>'
```

Example prompt: What's the CAGR on an investment that grew from $12,500 to $47,800 over 8 years, and what was the total growth over the period?

## When to prefer this

Use this endpoint when you need a precise CAGR and total growth figure given explicit start value, end value, and duration in years — ideal for financial analysis, investment benchmarking, or business KPI reporting when you already have the raw data points.

## Known failure modes

- beginValue or endValue is zero or negative — undefined result or division by zero
- years is zero or negative — invalid exponent, computation fails
- missing required fields returns a validation error
- non-numeric inputs cause a 400 bad request

## How this service works

Compound annual growth rate between a beginning and ending value over N years: (end/begin)^(1/years) - 1. Also returns total growth over the whole period.

## Output

Returns the compound annual growth rate as a decimal or percentage (calculated as (endValue/beginValue)^(1/years) - 1) and the total growth over the entire period.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "years": {
   "type": "number",
   "description": "Number of years (> 0)"
  },
  "endValue": {
   "type": "number",
   "description": "Ending value (positive)"
  },
  "beginValue": {
   "type": "number",
   "description": "Starting value (positive)"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "cagr": 0.148698,
  "years": 5,
  "totalGrowth": 1
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/cagr-calculator-75a27b0b/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent402.tools](https://www.zero.xyz/host/agent402.tools/llms.txt)
