{"openapi":"3.1.0","info":{"title":"Inflation Calculator API","version":"1.0.0","description":"Inflation-economics maths as an API, computed locally and deterministically. The adjust endpoint expresses a value across time in two ways — by an annual inflation rate over a number of years, V = amount·(1+r)^years, or by a ratio of consumer-price-index figures, V = amount·CPI_end/CPI_start — so an old price can be restated in today's money, with the total inflation over the period. The real-rate endpoint computes the real (inflation-adjusted) interest or investment rate from a nominal rate and an inflation rate using the Fisher equation, 1 + real = (1 + nominal)/(1 + inflation), alongside the rough nominal-minus-inflation approximation. The purchasing-power endpoint shows how inflation erodes money over time — the future buying power of today's amount, amount/(1+r)^years, the value lost and the larger amount needed to maintain the same purchasing power. Rates may be entered as a percent or a fraction and amounts in any currency. Everything is computed locally and deterministically, so it is instant and private. Ideal for personal-finance, budgeting, salary, retirement-planning and economics app developers, cost-of-living and real-return tools, and finance education. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This is inflation adjustment; for loan repayments use a loan API and for investment growth an investment API.","contact":{"name":"PremiumApi","url":"https://www.oanor.com/by/premiumapi"}},"servers":[{"url":"https://api.oanor.com/inflation-api","description":"oanor gateway"}],"tags":[{"name":"Inflation"},{"name":"Meta"}],"components":{"securitySchemes":{"oanorKey":{"type":"apiKey","in":"header","name":"x-oanor-key","description":"Get your key at https://www.oanor.com/developer/keys"}}},"security":[{"oanorKey":[]}],"paths":{"/v1/adjust":{"get":{"operationId":"get_v1_adjust","tags":["Inflation"],"summary":"Inflation adjust","description":"","parameters":[{"name":"amount","in":"query","required":true,"description":"Amount","schema":{"type":"string"},"example":"100"},{"name":"rate","in":"query","required":false,"description":"Annual inflation rate (% or fraction)","schema":{"type":"string"},"example":"3"},{"name":"years","in":"query","required":false,"description":"Number of years","schema":{"type":"string"},"example":"10"},{"name":"cpi_start","in":"query","required":false,"description":"CPI at start","schema":{"type":"string"}},{"name":"cpi_end","in":"query","required":false,"description":"CPI at end","schema":{"type":"string"}}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Annual-rate method: adjusted = amount · (1+r)^years. The rate may be a percent (3) or a fraction (0.03).","inputs":{"rate":3,"years":10,"amount":100},"method":"annual-rate","adjusted_amount":134.3916,"inflation_factor":1.34391638,"total_inflation_pct":34.391638},"meta":{"timestamp":"2026-06-05T11:30:32.383Z","request_id":"d49ccc26-e12f-4518-9813-04ce2957c52c"},"status":"ok","message":"Inflation adjust","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/purchasing-power":{"get":{"operationId":"get_v1_purchasing_power","tags":["Inflation"],"summary":"Purchasing power","description":"","parameters":[{"name":"amount","in":"query","required":true,"description":"Amount","schema":{"type":"string"},"example":"100"},{"name":"rate","in":"query","required":true,"description":"Inflation rate (% or fraction)","schema":{"type":"string"},"example":"3"},{"name":"years","in":"query","required":true,"description":"Number of years","schema":{"type":"string"},"example":"10"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"After 'years' of inflation, today's amount buys future_purchasing_power = amount/(1+r)^years; amount_to_maintain_power = amount·(1+r)^years keeps the same buying power.","inputs":{"rate":3,"years":10,"amount":100},"value_lost":25.5906,"erosion_pct":25.590609,"future_purchasing_power":74.4094,"amount_to_maintain_power":134.3916},"meta":{"timestamp":"2026-06-05T11:30:32.470Z","request_id":"f45b8664-6007-47ef-bf35-19377ae34b79"},"status":"ok","message":"Purchasing power","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/real-rate":{"get":{"operationId":"get_v1_real_rate","tags":["Inflation"],"summary":"Fisher real rate","description":"","parameters":[{"name":"nominal_rate","in":"query","required":true,"description":"Nominal rate (% or fraction)","schema":{"type":"string"},"example":"7"},{"name":"inflation_rate","in":"query","required":true,"description":"Inflation rate (% or fraction)","schema":{"type":"string"},"example":"3"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Fisher equation: 1 + real = (1 + nominal)/(1 + inflation). The approximate form (nominal − inflation) is only accurate at low rates.","inputs":{"nominal_rate":7,"inflation_rate":3},"real_rate":0.03883495,"real_rate_pct":3.883495,"approximate_real_rate_pct":4},"meta":{"timestamp":"2026-06-05T11:30:32.575Z","request_id":"2cafd0ce-4f2e-43e2-9149-2757b764bda7"},"status":"ok","message":"Fisher real rate","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/meta":{"get":{"operationId":"get_v1_meta","tags":["Meta"],"summary":"Spec","description":"","parameters":[],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"notes":"Rates may be a percent (3) or a fraction (0.03). Amounts are in any currency. CPI values are index numbers.","service":"inflation-api","formulae":{"fisher":"1 + real = (1 + nominal)/(1 + inflation)","adjust_cpi":"V = amount · CPI_end / CPI_start","adjust_rate":"V = amount · (1+r)^years","purchasing_power":"P = amount / (1+r)^years"},"endpoints":{"GET /v1/meta":"This document.","GET /v1/adjust":"Adjust an amount for inflation by an annual rate over n years, or by CPI start/end.","GET /v1/real-rate":"Real (inflation-adjusted) interest rate from nominal rate and inflation (Fisher).","GET /v1/purchasing-power":"Future purchasing power and the amount needed to keep buying power."},"description":"Inflation calculator: adjust a value across years by an annual rate or a CPI ratio, the Fisher real interest rate, and the erosion of purchasing power over time."},"meta":{"timestamp":"2026-06-05T11:30:32.688Z","request_id":"580ccbfb-0565-4df0-8a51-12e8cf899d62"},"status":"ok","message":"Meta","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}}},"x-oanor-pricing":[{"slug":"free","name":"Free","price_cents_month":0,"monthly_call_quota":2800,"rps_limit":2,"hard_limit":true},{"slug":"starter","name":"Starter","price_cents_month":1300,"monthly_call_quota":35000,"rps_limit":6,"hard_limit":true},{"slug":"pro","name":"Pro","price_cents_month":3400,"monthly_call_quota":215000,"rps_limit":15,"hard_limit":true},{"slug":"mega","name":"Mega","price_cents_month":9900,"monthly_call_quota":1400000,"rps_limit":40,"hard_limit":true}],"x-oanor-marketplace-url":"https://www.oanor.com/api/inflation-api"}