# Inflation Time Machine > What was money from one year worth in another? CPI-based, 20 countries, World Bank data. Convert an amount between years with the consumer price index (2010 = 100) published by the World Bank. Shows the equivalent value, cumulative inflation, average annual inflation and lost purchasing power, with a year-by-year table. Part of usefulweb.site (https://usefulweb.site/). Results are deterministic calculations from the inputs and the listed assumptions; the API returns exactly what the web page shows. ## Use it - Human interface: https://inflationtimemachine.usefulweb.site/ (interactive tool at https://inflationtimemachine.usefulweb.site/tool) - JSON API: POST https://inflationtimemachine.usefulweb.site/api/v1/calculate with a JSON object of inputs (schema: https://inflationtimemachine.usefulweb.site/api/v1/tool) - OpenAPI: https://inflationtimemachine.usefulweb.site/openapi.json - MCP (Streamable HTTP): https://inflationtimemachine.usefulweb.site/mcp - tool `inflation_time_machine` ## Inputs - amount (number, required): Amount - currency (text): Currency label - Label only. Use the currency of the chosen country; no conversion is done. - fromYear (integer, required): From year - toYear (integer, required): To year - country (select): Country ## Method - Data: World Bank WDI indicator FP.CPI.TOTL, consumer price index (2010 = 100), annual averages, snapshot stored with retrieval date. - Equivalent value = amount × CPI(to year) ÷ CPI(from year). - Cumulative inflation = (CPI(later) ÷ CPI(earlier) − 1) × 100. - Average annual inflation (CAGR) = ((CPI(later) ÷ CPI(earlier))^(1 ÷ years) − 1) × 100. - Purchasing power loss = (1 − CPI(earlier) ÷ CPI(later)) × 100: how much less the same nominal amount buys in the later year. - Because CPI values are annual averages, results compare average price levels of whole years, not specific dates.