# Portfolio Stats CAGR Calculator

> Portfolio Stats CAGR Calculator is a paid API for AI agents from portfolio-stats.x402tookit.com, paid per call via x402, $0.02/call, status unknown (last checked 2026-10-30).

Calculates compound annual growth rate (CAGR) from start and end values over a specified duration (years, dates, or periods)

## Facts

- Endpoint: GET https://portfolio-stats.x402tookit.com/cagr?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-30
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/portfolio-stats-cagr-calculator-b30b2e24
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Lq2NyPCiJkeO4D_Orm-7F

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 portfolio-stats-cagr-calculator-b30b2e24
```

Example prompt: What's the CAGR on an investment that grew from $12,000 to $34,500 between 2018-03-01 and 2024-03-01?

## When to prefer this

Choose this endpoint when you need pure arithmetic CAGR computation from user-supplied values without any external data fetching. It is ideal for agents that already have the start/end portfolio values and a time duration and need a precise annualized growth figure. Prefer this over general-purpose LLM math when you want structured output including growth multiple, doubling time, and a plain-language summary with disclaimer. Use date inputs when the user provides calendar dates rather than an elapsed years figure.

## Known failure modes

- startValue of zero or negative causes computation error (denominator or invalid base)
- endValue of zero returns a CAGR of -100% or null
- mismatched date inputs (endDate without startDate or vice versa) cause validation failure
- providing more than one duration input (years + dates + periods simultaneously) may cause ambiguity or error
- negative elapsed years if endDate is before startDate
- missing required fields startValue or endValue returns validation error

## How this service works

Compound annual growth rate from start and end values over years, or dates, or periods. Arithmetic on your numbers, not advice.

## Output

Returns a CAGR as a decimal and percentage, along with the elapsed years, growth multiple, total return percentage, estimated doubling time in years, a plain-language summary, and a verdict string. Also includes a disclaimer noting results are educational arithmetic only and not financial advice.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "startValue",
      "endValue"
     ],
     "properties": {
      "years": {
       "type": "number",
       "description": "Elapsed years (give exactly one of years, startDate with endDate, or periods)"
      },
      "endDate": {
       "type": "string",
       "description": "ISO end date like 2025-01-01"
      },
      "periods": {
       "type": "number",
       "description": "Number of periods elapsed (use with periodsPerYear)"
      },
      "endValue": {
       "type": "number",
       "description": "Ending value, zero or more"
      },
      "startDate": {
       "type": "string",
       "description": "ISO start date like 2020-01-01 (use with endDate)"
      },
      "startValue": {
       "type": "number",
       "description": "Starting value, above zero"
      },
      "periodsPerYear": {
       "type": "integer",
       "description": "Periods per year when periods is given (252, 52 or 12)"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "asOf": {
       "type": [
        "null",
        "string"
       ]
      },
      "cagr": {
       "type": [
        "null",
        "number"
       ]
      },
      "years": {
       "type": [
        "null",
        "number"
       ]
      },
      "source": {
       "type": [
        "null",
        "string"
       ]
      },
      "cagrPct": {
       "type": [
        "null",
        "number"
       ]
      },
      "reasons": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "string"
       }
      },
      "summary": {
       "type": [
        "null",
        "string"
       ]
      },
      "verdict": {
       "type": [
        "null",
        "string"
       ]
      },
      "degraded": {
       "type": [
        "boolean",
        "null"
       ]
      },
      "disclaimer": {
       "type": [
        "null"
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/portfolio-stats-cagr-calculator-b30b2e24/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from portfolio-stats.x402tookit.com](https://www.zero.xyz/host/portfolio-stats.x402tookit.com/llms.txt)
