# 2s.io Inflation Calculator

> 2s.io Inflation Calculator is a paid API for AI agents from 2s.io, paid per call via x402, $0.0012/call, status unknown (last checked 2026-09-14).

Adjusts a US dollar amount for inflation between two dates using CPI-U data from BLS via FRED, returning the adjusted amount, cumulative inflation %, annualized rate, and CPI index values.

## Facts

- Endpoint: GET https://2s.io/api/inflation/calculator
- Price: $0.0012/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/2s-io-inflation-calculator-dc457a28
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_K2YGuLaa_TgKOo6DanzAk

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 2s-io-inflation-calculator-dc457a28
```

Example prompt: What is $75,000 from 1995 worth in today's dollars? Use CPI-U to give me the inflation-adjusted amount, cumulative inflation percentage, and annualized rate.

## When to prefer this

Use this endpoint when you need a reliable, BLS-official CPI-U inflation adjustment for US dollar amounts between any two dates from 1913 to present. Prefer this over generic finance APIs when you need the exact same methodology as the official BLS inflation calculator, including annualized rates and raw CPI index values.

## Known failure modes

- Date before 1913 — CPI data not available, returns error
- Invalid date format — must be YYYY-MM-DD or YYYY
- Amount missing or non-numeric — required field validation error
- End date before start date — may return error or unexpected result
- Date in the future beyond latest available CPI month — defaults to or errors on latest available data

## How this service works

Adjust a US dollar amount for inflation between two dates ('what is $100 in 1990 worth today?'). Pass amount, from (YYYY-MM-DD or YYYY), and optional to (defaults to the latest CPI month). Uses CPI-U (CPIAUCNS — the same not-seasonally-adjusted all-items index as the official BLS inflation calculator), data back to 1913. Returns the inflation-adjusted amount, cumulative inflation %, annualized rate, and the CPI index values used on each date. Source: BLS CPI via FRED (St. Louis Fed).

## Output

Returns a JSON object with: the inflation-adjusted dollar amount, cumulative inflation percentage over the period, annualized inflation rate, the CPI-U index value on the start date, and the CPI-U index value on the end date.

## Example request

```json
{
 "input": {
  "type": "http",
  "method": "GET",
  "queryParams": {
   "to": "2024",
   "from": "1995",
   "amount": 75000
  }
 }
}
```

## 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",
    "queryParams"
   ],
   "properties": {
    "type": {
     "const": "http"
    },
    "method": {
     "const": "GET"
    },
    "queryParams": {
     "required": [
      "amount",
      "from"
     ],
     "properties": {
      "to": {
       "type": "string",
       "description": "End date (YYYY-MM-DD or YYYY). Defaults to latest CPI."
      },
      "from": {
       "type": "string",
       "description": "Start date (YYYY-MM-DD or YYYY)."
      },
      "amount": {
       "type": "number",
       "description": "Dollar amount to adjust."
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/2s-io-inflation-calculator-dc457a28/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from 2s.io](https://www.zero.xyz/host/2s.io/llms.txt)
