# Inflation calculator by country and year documentation

Inputs, formulas, assumptions and API/MCP examples for the inflation calculator by country and year. Reproduce a calculation and cite its sources.

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

## Overview
Estimate how much money in one year corresponds to the purchasing power of an amount in another year for the same country. The calculation uses published annual consumer price index observations, commonly called CPI.

Choose available years in either order to make a forward or reverse comparison. National CPI describes a broad basket of prices and may differ from the costs of your own purchases.

## How to use
1. Choose the country and enter an amount in its domestic monetary unit.
2. Select the starting year and the year whose equivalent amount you want to calculate.
3. Calculate and review the equivalent value, cumulative percentage change and annualized inflation.
4. Check the annual table and source vintage. If either year lacks a published observation, choose another available pair.

## Understanding the result
Equivalent value multiplies the original amount by the ending CPI divided by the starting CPI. Cumulative inflation reports the full-period index change; annualized inflation expresses it as a compound yearly rate.

Purchasing power of the original amount shows the entered amount divided by that CPI ratio. The annual table displays available observations between your chosen years without filling missing data.

## Questions
### Can I compare an earlier year with a later year in reverse?
Yes. Swapping the years reverses the CPI ratio and converts the amount back into the earlier year's equivalent purchasing power. Both years must have published observations for that country.

### Why is a year unavailable?
The committed source may not contain an observation for every country and year. Missing values are not interpolated, and the latest available year can differ across countries.

### Does this convert between currencies or handle currency redenominations?
No. Amounts stay in the country's domestic monetary unit. Exchange rates, redenominations and changes in currency units require separate handling before interpreting a comparison.

## Default worked example
Equivalent value: 1,821.65 local currency. Equivalent purchasing power in United States in 2024, using annual average CPI. Assumptions as of 2026-09-07.

## Formula
Equivalent value = amount × CPI(end year) ÷ CPI(start year).

- Annual average national CPI measures a broad basket, not your personal cost of living.
- Missing years are unavailable; values are never interpolated. Earlier-year comparisons work in reverse.
- Amounts stay in the country’s domestic monetary unit; redenominations and changes in currency units need separate handling.

## Inputs
- amount: Amount; default 1000
- country: World Bank ISO alpha-3 country code. Available observation years vary by country.; default "USA"
- startYear: From year; default 2000
- endYear: To year; default 2024

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

## JSON request body
```json
{
  "amount": 1000,
  "country": "USA",
  "startYear": 2000,
  "endYear": 2024
}
```

## 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
World Bank, World Development Indicators; IMF International Financial Statistics: https://data.worldbank.org/indicator/FP.CPI.TOTL (2026-07-13)
