ForHosting KIT · Finance & money

Inflation rate from CPI calculator

Turn two published CPI readings into an inflation rate: an index that rises from 100 to 103 means 3% inflation, and each unit of currency buys 2.9126% less. Longer spans also get a yearly average rate. Free in your browser.

  • Free
  • Runs in your browser
  • No sign-up
  • Your data stays on your device
Use it from WebAPIEmailTelegramApp soon
If you enter
Cpi base
100
Cpi later
103
You get
Years
1
Cpi change
3
Cpi ratio
1.03
Inflation rate percent
3

The inflation rate from a consumer price index is the percent change in that index between two periods, the standard cost-of-living measure used by statistical agencies, textbooks, and cost-of-living adjustments. You supply the earlier CPI reading and the later CPI reading; the calculator returns how much the reference basket rose or fell, the index ratio, the change in purchasing power of one currency unit, and—when the span is more than one year—the compound-average annualized rate. Households use it to turn two published table cells into a single headline percentage. Analysts, journalists, payroll clerks writing COLA clauses, and students checking homework all need the same identity so keys, worksheets, and news copy agree.

What inflation from CPI means and how the formula works

The official cost-of-living inflation rate between two dates is the percent change in a consumer price index from the earlier published reading to the later one. Statistical agencies report CPI as an index level, often rebased so a reference year equals one hundred, not as a ready-made percentage. A move from one hundred to one hundred three is a three percent rise in the price of the reference basket: households need three percent more currency units to buy the same mix of goods and services.

A move from one hundred twenty to one hundred fourteen is five percent deflation, which means the cost of living fell. Dividing by the earlier index—not by the later one, and not by the average of the two—is the convention that headlines, COLA clauses, and exam keys share. When the two readings span more than one year, that total percent change still answers how much the basket rose over the whole interval.

You paste the published CPI values; it returns the standard cost-of-living percentages.

What you enter and what you get back

Both must be finite numbers strictly greater than zero, because a price index is a positive scale and the percent-change formula divides by the base reading. Optional years is the number of years or periods between the two observations and defaults to one; it must be finite and strictly positive, and it is used only to annualize the total percent change. Validation rejects missing fields, empty strings, non-finite values, non-positive index levels, and non-positive year spans.

Worked example: one hundred to one hundred three over one year is a three percent inflation rate, ratio one point zero three, and direction inflation. Another: one hundred to one hundred twenty-one over two years is a twenty-one percent total rise and a ten percent annualized rate, because one point one squared equals one point two one. Failed validation is not billed.

Where an inflation rate from CPI calculator earns its keep

Introductory macroeconomics and statistics courses assign inflation-from-CPI problems because the percent-change identity is the grading key on most multiple-choice and free-response rubrics: students must divide by the earlier index and report a signed percentage, not a raw point change. Tutoring platforms and LMS plugins need a deterministic oracle that rejects a zero or negative base index instead of inventing infinity, and that annualizes a multi-year path with a real power rather than a naive rate divided by years.

Payroll and benefits teams writing cost-of-living adjustments turn two published CPI cells into the clause percentage without rebuilding a spreadsheet each review cycle. Here the inputs are index levels, and the output is the official cost-of-living inflation rate those levels imply.

Homework and exam CPI inflation checks

Enter two textbook CPI readings and verify the period percent change, the index ratio, and the inflation / deflation / unchanged label against the official cost-of-living formula.

COLA and wage-clause percentages

Turn two published CPI cells into the signed inflation rate a cost-of-living adjustment or contract clause needs, including a compound-average annualized rate over a multi-year span.

News and dashboard headline inflation

Convert a pair of official index levels into a reproducible headline percentage and purchasing-power change without fetching tables or assuming an annual rate.

What is the annualized inflation rate?

If years is omitted it defaults to one, so the two rates match.

Can the later CPI be lower than the base CPI?

Unchanged index levels return a zero rate and direction unchanged.

Does this look up official CPI tables?

No. You supply the two published index levels. The calculator applies the standard percent-change identity only; it does not fetch government series or invent missing months.

How do I calculate inflation between two CPI values?

Subtract the earlier index from the later one, divide by the earlier index and multiply by 100. An index going from 100 to 103 gives an inflation rate of 3%.

How much purchasing power does money lose with inflation?

Divide the earlier index by the later one and subtract one. When the index rises from 100 to 103, each unit of currency buys 2.9126% less than before, slightly less than the 3% price rise.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/econ/inflation-rate-from-cpi

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.

curl -X POST https://api.kit.forhosting.com/econ/inflation-rate-from-cpi \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"cpi_base":100,"cpi_later":103}'
{
  "cpi_base": 100,
  "cpi_later": 103
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "econ.inflation_rate_from_cpi",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

Invalid input fails with a clear invalid_input error and is not billed.

What inflation from CPI means and how the formula works

If cpi_base is the index in the starting period and cpi_later is the index in the comparison period, the period inflation rate equals (cpi_later minus cpi_base) divided by cpi_base, times one hundred. The same identity is (cpi_later divided by cpi_base minus one) times one hundred. The compound-average annualized rate, ((cpi_later / cpi_base) raised to the power one over years, minus one) times one hundred, answers the textbook question of the constant yearly inflation that would compound to the same index path. One currency unit also loses or gains purchasing power by the reciprocal of the index ratio: (cpi_base / cpi_later minus one) times one hundred. This calculator implements those identities on the two index levels you supply. It does not look up a government table, seasonally adjust a monthly series, splice vintages, or invent missing months.

Input contract, response shape, and error behaviour

POST a JSON body with two required fields: cpi_base, the consumer price index in the earlier period, and cpi_later, the index in the comparison period. Optional precision is an integer from zero to fifteen that defaults to four and controls decimal places on the numeric fields. cpi_base may arrive under aliases such as base_cpi, cpi1, earlier_cpi, initial_cpi, start_cpi, or from_cpi; cpi_later accepts later_cpi, cpi2, current_cpi, final_cpi, end_cpi, and to_cpi; years accepts n, periods, period_count, and n_years; precision accepts decimals and dp. Each numeric field may be a JSON number or a numeric string. Those failures return invalid_input, name the problem, and do not consume prepaid balance. On success the body echoes cleaned cpi_base, cpi_later, and years, then adds cpi_change, cpi_ratio, inflation_rate_percent as the period percent change, annualized_rate_percent as the compound-average rate, purchasing_power_ratio and purchasing_power_change_percent for one currency unit, direction as inflation, deflation, or unchanged, method cpi_percent_change, a formula string, and the precision used. Successful parse calls use the published $0.002 base price.

Where an inflation rate from CPI calculator earns its keep

Pin inflation_rate_percent and annualized_rate_percent in tests, reject non-positive CPI explicitly, and you get reproducible headline inflation figures for homework, COLA worksheets, and lightweight dashboards without hosting a CPI ingestion pipeline or floating-point edge cases of your own.

How do I calculate the inflation rate from two CPI values?

Send cpi_base and cpi_later. The API returns inflation_rate_percent = ((cpi_later − cpi_base) / cpi_base) × 100, plus the index ratio, the change in purchasing power, and a direction label.

What does the inflation rate from CPI calculator cost?

The browser tool is free. API requests use prepaid KIT balance at $0.002 per successful call; invalid input is not billed.

Read the full KIT documentation →