BLS API: Convert US dollars between months with CPI
Converts a US dollar amount from one month or annual average to another using the US city average CPI-U for all items, not seasonally adjusted. Defaults to the latest published month.
Unofficial. Not affiliated with or endorsed by BLS.
Inputs
Values from the run on Oct 23, 2026, shown under Output.
- Amount, required
amount Original US dollar amount, for example 100.
100
Number 0 or more.
- End Month optional
end_month Destination month, such as 2024-08, or 2024 for its annual average. Defaults to the latest published month.
Not set
- Start Month, required
start_month Month the money is from, such as 1995-06; use 1995 for its annual average.
1995-06
Input as JSON
{ "amount": 100, "start_month": "1995-06"}Output
{ "end_cpi": 336.94, "currency": "USD", "sentence": "$100 in June 1995 has the same buying power as $220.94 in September 2026.", "end_month": "2026-09", "start_cpi": 152.5, "source_url": "https://www.bls.gov/data/inflation_calculator.htm" , "start_month": "1995-06", "adjusted_amount": 220.94, "original_amount": 100, "cumulative_inflation_percent": 120.94}Code
curl https://api.fous.com/v1/runs \ -H "Authorization: Bearer $FOUS_API_KEY" \ -H "Content-Type: application/json" \ -d '{"method":"bls.gov/calculate_inflation","input":{"amount":100,"start_month":"1995-06"}}' # Save as fous.py, then run: python3 fous.pyimport json, os, timefrom urllib.error import HTTPErrorfrom urllib.request import Request, urlopenAPI = "https://api.fous.com/v1/runs" KEY = os.environ["FOUS_API_KEY"]HEADERS = { "Authorization": f"Bearer {KEY}", "Content-Type": "application/json" ,}def call(url, body=None): data = json.dumps(body).encode() if body else None request = Request(url, data, HEADERS) try: with urlopen(request, timeout=120) as r: return r.status, json.load(r) except HTTPError as error: message = json.load(error)["error"]["message"] raise RuntimeError(message) from errorstatus, run = call(API, { "method": "bls.gov/calculate_inflation" , "input": { "amount": 100, "start_month": "1995-06" }})# 202: still going after 30 s. Ask again until it ends.while status == 202: time.sleep(2) status, run = call(f"{API}/{run['id']}")print(json.dumps(run["data"], indent=2))// Save as fous.mjs, then run: node fous.mjsconst api = "https://api.fous.com/v1/runs" ;const headers = { Authorization: `Bearer ${process.env.FOUS_API_KEY}`, "Content-Type": "application/json" ,};let response = await fetch(api, { method: "POST", headers, body: JSON.stringify({ "method": "bls.gov/calculate_inflation" , "input": { "amount": 100, "start_month": "1995-06" } }), signal: AbortSignal.timeout(120_000),});let run = await response.json();// 202: still going after 30 s. Ask again until it ends.while (response.status === 202) { await new Promise((done) => setTimeout(done, 2_000)); response = await fetch(`${api}/${run.id}`, { headers }); run = await response.json();}if (!response.ok) throw new Error(run.error.message);console.log(run.data);# Connect your agent to Fous once, over MCP (Streamable HTTP):# https://api.fous.com/mcp# Set FOUS_API_KEY first: create a key at https://app.fous.com/keys.# Claude Codeclaude mcp add \ --scope user \ --transport http fous https://api.fous.com/mcp \ --header "Authorization: Bearer ${FOUS_API_KEY:?Set FOUS_API_KEY to your Fous API key}"# Codexcodex mcp add fous \ --url https://api.fous.com/mcp \ --bearer-token-env-var FOUS_API_KEY# Cursor, VS Code, Windsurf, Cline and morenpx -y add-mcp https://api.fous.com/mcp -g -n fous \ --header "Authorization: Bearer ${FOUS_API_KEY:?Set FOUS_API_KEY to your Fous API key}"# Then ask your agent:# "Use Fous to run bls.gov/calculate_inflation# with {"amount":100,"start_month":"1995-06"}"Over HTTP, the answer’s data holds the output. A run still going after 30 seconds answers 202 with its id: ask GET /v1/runs/{id} until it ends.
Schema
Input schema
{ "type": "object", "required": [ "amount", "start_month" ], "properties": { "amount": { "type": "number", "minimum": 0, "description": "Original US dollar amount, for example 100." }, "end_month": { "type": "string", "pattern": "^[0-9]{4}(-[0-9]{2})?$", "description": "Destination month, such as 2024-08, or 2024 for its annual average. Defaults to the latest published month." }, "start_month": { "type": "string", "pattern": "^[0-9]{4}(-[0-9]{2})?$", "description": "Month the money is from, such as 1995-06; use 1995 for its annual average." } }}Output schema
{ "type": "object", "required": [ "original_amount", "adjusted_amount", "currency", "cumulative_inflation_percent", "start_cpi", "end_cpi", "start_month", "end_month", "sentence", "source_url" ], "properties": { "end_cpi": { "type": "number", "description": "CPI-U used for the destination month or year." }, "currency": { "type": "string", "description": "Currency code for both amounts." }, "sentence": { "type": "string", "description": "Plain-English comparison of purchasing power." }, "end_month": { "type": "string", "description": "Destination month (YYYY-MM) or annual average year (YYYY)." }, "start_cpi": { "type": "number", "description": "CPI-U used for the original month or year." }, "source_url": { "type": "string", "description": "BLS inflation calculator page." }, "start_month": { "type": "string", "description": "Original month (YYYY-MM) or annual average year (YYYY)." }, "adjusted_amount": { "type": "number", "description": "Equivalent amount in US dollars, rounded to cents." }, "original_amount": { "type": "number", "description": "Original amount in US dollars." }, "cumulative_inflation_percent": { "type": "number", "description": "Change in purchasing-power-equivalent dollar amount, in percent." } }}- Price
- 1 credit per completed run (1¢ with pay as you go); failed runs are free.
- Method
bls.gov/calculate_inflation- Returns
- adjusted amount, cumulative inflation percent, CPI values, plain-English sentence
Use it from your agent
Give your agent this line. It reads SKILL.md, gets a Fous API key and connects the Fous MCP server. Its run then takes the method bls.gov/calculate_inflation with the inputs above.
Ask your agent
- How much is 250 dollars in 1985 worth in today's money using CPI?
- What would 75,000 dollars from March 2001 be worth in August 2024?
- Adjust 1200 dollars from the 1990 annual average to the 2023 annual average for inflation
- On bls.gov, convert 500 dollars from June 1978 to the latest month's purchasing power
- How much did prices rise between 2010 and 2022 if I had 40 dollars in 2010 and want the equivalent in 2022?
See more
All BLS methodsGets the latest U.S. Consumer Price Index inflation for a spending category, with up to 24 recent months of history. Monthly changes are seasonally adjusted; 12-month changes are not.
bls.gov/get_inflation_rateFinds the latest published BLS pay and employment for an occupation in the US, a state, or a metro area, and compares it with the national median.
bls.gov/get_occupation_wagesGets the latest seasonally adjusted unemployment rate and labor-force counts for the United States or a state, with up to 24 months of history.
bls.gov/get_unemployment_rateFinds the best-matching Occupational Outlook Handbook profile for a job title and returns its pay, entry requirements, jobs and 10-year outlook.
bls.gov/get_occupation_outlookConverts an amount between currencies using ECB euro reference rates, including euro and cross-currency conversions. Uses the latest preceding published rate when the date has none.
ecb.europa.eu/convert_currencyConverts an amount between two currencies using the current Google Finance quote. Rates may be delayed.
google.com/convert_currencyConverts an amount between two currencies using XE's displayed mid-market rate. It also returns the rate time and an XE converter link. Rates are informational, not transfer quotes.
xe.com/convert_currencyGets decades of yearly commodity or stock-index price history from Macrotrends: yearly average, open, high, low, close, annual change and inflation-adjusted value for gold, silver, crude oil, natural gas, copper, Dow Jones, S&P 500 and Nasdaq. The current year may be incomplete.
macrotrends.net/get_long_term_price_history