| Title: | Inflation Adjustment for Historical Currency Values |
| Version: | 0.2.0 |
| Description: | Convert historical monetary values into their present-day equivalents using bundled CPI (Consumer Price Index) and GDP deflator data sourced from the World Bank Development Indicators. Supports British pounds (GBP), Australian dollars (AUD), US dollars (USD), Euro (EUR), Canadian dollars (CAD), Japanese yen (JPY), Chinese yuan (CNY), Swiss francs (CHF), New Zealand dollars (NZD), Indian rupees (INR), South Korean won (KRW), Brazilian reais (BRL), and Norwegian krone (NOK). Currency codes and country names are both accepted as input. |
| License: | MIT + file LICENSE |
| Encoding: | UTF-8 |
| Language: | en-US |
| URL: | https://charlescoverdale.github.io/inflateR/, https://github.com/charlescoverdale/inflateR |
| BugReports: | https://github.com/charlescoverdale/inflateR/issues |
| RoxygenNote: | 7.3.3 |
| LazyData: | true |
| Depends: | R (≥ 3.5.0) |
| Suggests: | testthat (≥ 3.0.0) |
| Config/testthat/edition: | 3 |
| NeedsCompilation: | no |
| Packaged: | 2026-09-09 10:07:32 UTC; charlescoverdale |
| Author: | Charles Coverdale [aut, cre] |
| Maintainer: | Charles Coverdale <charlesfcoverdale@gmail.com> |
| Repository: | CRAN |
| Date/Publication: | 2026-09-09 10:40:20 UTC |
inflateR: Inflation Adjustment for Historical Currency Values
Description
Convert historical monetary values into their present-day equivalents using bundled CPI (Consumer Price Index) and GDP deflator data sourced from the World Bank Development Indicators. Supports British pounds (GBP), Australian dollars (AUD), US dollars (USD), Euro (EUR), Canadian dollars (CAD), Japanese yen (JPY), Chinese yuan (CNY), Swiss francs (CHF), New Zealand dollars (NZD), Indian rupees (INR), South Korean won (KRW), Brazilian reais (BRL), and Norwegian krone (NOK). Currency codes and country names are both accepted as input.
Author(s)
Maintainer: Charles Coverdale charlesfcoverdale@gmail.com
See Also
Useful links:
Report bugs at https://github.com/charlescoverdale/inflateR/issues
Adjust a historical monetary value for inflation
Description
Converts an amount from a historical year into its equivalent value in a target year, using bundled CPI data sourced from the World Bank Development Indicators. Supports GBP, AUD, USD, EUR, CAD, JPY, CNY, CHF, NZD, INR, KRW, BRL, and NOK.
Usage
adjust_inflation(amount, from_year, currency, to_year = NULL, round = 2)
Arguments
amount |
Numeric (scalar or vector). The original monetary amount(s). |
from_year |
Integer. The year the amount is from. |
currency |
Character. A currency code or country name. Accepted codes:
|
to_year |
Integer. The target year to adjust to. Defaults to the latest available year in the data. |
round |
Integer or |
Value
A numeric value (or vector) representing the inflation-adjusted amount.
See Also
Other CPI adjustment:
historical_value()
Examples
# What is £12 from 1963 worth today?
adjust_inflation(12, 1963, "GBP")
# What is AUD 50 from 1980 worth in 2000?
adjust_inflation(50, 1980, "AUD", to_year = 2000)
# Full precision
adjust_inflation(100, 2000, "USD", to_year = 2020, round = NULL)
Adjust a monetary value using a GDP deflator
Description
Converts an amount between two years using GDP deflator data sourced from
the World Bank Development Indicators (indicator: NY.GDP.DEFL.ZS). Suitable
for adjusting GDP figures, government expenditure, and other macroeconomic
aggregates. For adjusting personal or consumer values (wages, prices of goods),
use adjust_inflation which uses CPI instead.
Usage
adjust_real(amount, from_year, currency, to_year = NULL, round = 2)
Arguments
amount |
Numeric (scalar or vector). The original monetary amount(s). |
from_year |
Integer. The year the amount is from. |
currency |
Character. A currency code or country name. Accepted codes:
|
to_year |
Integer. The target year to adjust to. Defaults to the latest available year in the deflator series. |
round |
Integer or |
Details
The GDP deflator measures price changes across all goods and services produced in an economy, unlike CPI which tracks a fixed consumer basket. Key differences from CPI:
Covers all domestic production, not just consumer goods
Excludes imported goods (CPI includes them)
Updates its basket automatically (CPI uses a fixed basket)
Published annually/quarterly (CPI is monthly)
Use the GDP deflator when comparing macroeconomic aggregates (GDP, government
spending, investment) across time. Use adjust_inflation for
personal or consumer values.
Value
A numeric value (or vector) representing the deflator-adjusted amount.
See Also
Other GDP deflator adjustment:
historical_real()
Examples
# Adjust UK GDP from 1990 to today using GDP deflator
adjust_real(500000, 1990, "GBP")
# Compare US government spending in 2000 vs 2020 terms
adjust_real(1000000, 2000, "USD", to_year = 2020)
Australian CPI Data (1960-2025)
Description
Annual Consumer Price Index for Australia, sourced from the World Bank Development Indicators (indicator: FP.CPI.TOTL). Rescaled so that 2020 = 100.
Usage
aud_cpi
Format
A data frame with 66 rows and 2 columns:
- year
Calendar year (integer)
- index
CPI index value (numeric, base 2020 = 100)
Source
World Bank Open Data https://data.worldbank.org/indicator/FP.CPI.TOTL
Australian GDP Deflator Data (1960-2025)
Description
Annual GDP deflator for Australia, sourced from the World Bank Development Indicators (indicator: NY.GDP.DEFL.ZS). Rescaled so that 2020 = 100.
Usage
aud_gdp_def
Format
A data frame with 66 rows and 2 columns:
- year
Calendar year (integer)
- index
GDP deflator index value (numeric, base 2020 = 100)
Source
World Bank Open Data https://data.worldbank.org/indicator/NY.GDP.DEFL.ZS
Brazilian CPI Data (1990-2025)
Description
Annual Consumer Price Index for Brazil, sourced from the World Bank Development Indicators (indicator: FP.CPI.TOTL). Rescaled so that 2020 = 100. Data availability begins in 1990.
Usage
brl_cpi
Format
A data frame with 36 rows and 2 columns:
- year
Calendar year (integer)
- index
CPI index value (numeric, base 2020 = 100)
Source
World Bank Open Data https://data.worldbank.org/indicator/FP.CPI.TOTL
Brazilian GDP Deflator Data (1990-2025)
Description
Annual GDP deflator for Brazil, sourced from the World Bank Development Indicators (indicator: NY.GDP.DEFL.ZS). Rescaled so that 2020 = 100.
Usage
brl_gdp_def
Format
A data frame with 36 rows and 2 columns:
- year
Calendar year (integer)
- index
GDP deflator index value (numeric, base 2020 = 100)
Source
World Bank Open Data https://data.worldbank.org/indicator/NY.GDP.DEFL.ZS
Canadian CPI Data (1960-2025)
Description
Annual Consumer Price Index for Canada, sourced from the World Bank Development Indicators (indicator: FP.CPI.TOTL). Rescaled so that 2020 = 100.
Usage
cad_cpi
Format
A data frame with 66 rows and 2 columns:
- year
Calendar year (integer)
- index
CPI index value (numeric, base 2020 = 100)
Source
World Bank Open Data https://data.worldbank.org/indicator/FP.CPI.TOTL
Canadian GDP Deflator Data (1960-2025)
Description
Annual GDP deflator for Canada, sourced from the World Bank Development Indicators (indicator: NY.GDP.DEFL.ZS). Rescaled so that 2020 = 100.
Usage
cad_gdp_def
Format
A data frame with 66 rows and 2 columns:
- year
Calendar year (integer)
- index
GDP deflator index value (numeric, base 2020 = 100)
Source
World Bank Open Data https://data.worldbank.org/indicator/NY.GDP.DEFL.ZS
Swiss CPI Data (1960-2025)
Description
Annual Consumer Price Index for Switzerland, sourced from the World Bank Development Indicators (indicator: FP.CPI.TOTL). Rescaled so that 2020 = 100.
Usage
chf_cpi
Format
A data frame with 66 rows and 2 columns:
- year
Calendar year (integer)
- index
CPI index value (numeric, base 2020 = 100)
Source
World Bank Open Data https://data.worldbank.org/indicator/FP.CPI.TOTL
Swiss GDP Deflator Data (1960-2025)
Description
Annual GDP deflator for Switzerland, sourced from the World Bank Development Indicators (indicator: NY.GDP.DEFL.ZS). Rescaled so that 2020 = 100.
Usage
chf_gdp_def
Format
A data frame with 66 rows and 2 columns:
- year
Calendar year (integer)
- index
GDP deflator index value (numeric, base 2020 = 100)
Source
World Bank Open Data https://data.worldbank.org/indicator/NY.GDP.DEFL.ZS
Chinese CPI Data (1986-2025)
Description
Annual Consumer Price Index for China, sourced from the World Bank Development Indicators (indicator: FP.CPI.TOTL). Rescaled so that 2020 = 100. Data availability begins in 1986.
Usage
cny_cpi
Format
A data frame with 40 rows and 2 columns:
- year
Calendar year (integer)
- index
CPI index value (numeric, base 2020 = 100)
Source
World Bank Open Data https://data.worldbank.org/indicator/FP.CPI.TOTL
Chinese GDP Deflator Data (1960-2025)
Description
Annual GDP deflator for China, sourced from the World Bank Development Indicators (indicator: NY.GDP.DEFL.ZS). Rescaled so that 2020 = 100.
Usage
cny_gdp_def
Format
A data frame with 66 rows and 2 columns:
- year
Calendar year (integer)
- index
GDP deflator index value (numeric, base 2020 = 100)
Source
World Bank Open Data https://data.worldbank.org/indicator/NY.GDP.DEFL.ZS
Euro Area CPI Data (1960-2025)
Description
Annual Consumer Price Index for Germany, used as a proxy for the Euro (EUR). Sourced from the World Bank Development Indicators (indicator: FP.CPI.TOTL). Rescaled so that 2020 = 100.
Usage
eur_cpi
Format
A data frame with 66 rows and 2 columns:
- year
Calendar year (integer)
- index
CPI index value (numeric, base 2020 = 100)
Details
Note: The Euro area aggregate is not available in WDI. Germany is used as a proxy as it is the largest Eurozone economy and was the monetary anchor (Deutsche Mark) prior to the Euro's introduction in 1999.
Source
World Bank Open Data https://data.worldbank.org/indicator/FP.CPI.TOTL
Euro Area GDP Deflator Data (1960-2025)
Description
Annual GDP deflator for Germany, used as a proxy for the Euro (EUR). Sourced from the World Bank Development Indicators (indicator: NY.GDP.DEFL.ZS). Rescaled so that 2020 = 100.
Usage
eur_gdp_def
Format
A data frame with 66 rows and 2 columns:
- year
Calendar year (integer)
- index
GDP deflator index value (numeric, base 2020 = 100)
Source
World Bank Open Data https://data.worldbank.org/indicator/NY.GDP.DEFL.ZS
Convert a value to its historical equivalent using a GDP deflator
Description
Takes a monetary amount from a recent year and returns what it would have
been worth in a specified historical year, using GDP deflator data sourced
from the World Bank Development Indicators (indicator: NY.GDP.DEFL.ZS).
This is the inverse of adjust_real.
Usage
historical_real(amount, to_year, currency, from_year = NULL, round = 2)
Arguments
amount |
Numeric (scalar or vector). The monetary amount(s) in the reference year. |
to_year |
Integer. The historical year to convert back to. |
currency |
Character. Currency code ( |
from_year |
Integer. The year the amount is from. Defaults to the latest year available in the deflator series. |
round |
Integer or |
Details
For converting consumer or personal values, use
historical_value which uses CPI instead.
Value
A numeric value (or vector) representing the historical equivalent amount.
See Also
Other GDP deflator adjustment:
adjust_real()
Examples
# What would UK GDP of £2 trillion today have been in 1990 terms?
historical_real(2e12, 1990, "GBP")
# What would USD 1 trillion in 2020 have been worth in 2000?
historical_real(1e12, 2000, "USD", from_year = 2020)
Convert a present-day value to its historical equivalent
Description
Takes a monetary amount from a recent year and returns what it would have been worth in a specified historical year, using bundled CPI data sourced from the World Bank Development Indicators. Supports GBP, AUD, USD, EUR, CAD, JPY, CNY, CHF, NZD, INR, KRW, BRL, and NOK.
Usage
historical_value(amount, to_year, currency, from_year = NULL, round = 2)
Arguments
amount |
Numeric (scalar or vector). The monetary amount(s) in the reference year. |
to_year |
Integer. The historical year to convert back to. |
currency |
Character. Currency code ( |
from_year |
Integer. The year the amount is from. Defaults to the latest year available in the data. |
round |
Integer or |
Value
A numeric value (or vector) representing the historical equivalent amount.
See Also
Other CPI adjustment:
adjust_inflation()
Examples
# What would £100 today have been worth in 1963?
historical_value(100, 1963, "GBP")
# What would USD 500 in 2020 have been worth in 1980?
historical_value(500, 1980, "USD", from_year = 2020)
Calculate the inflation rate between two years
Description
Returns the cumulative or annualised inflation rate between two years, using bundled CPI data sourced from the World Bank Development Indicators.
Usage
inflation_rate(from_year, to_year = NULL, currency, annualise = FALSE)
Arguments
from_year |
Integer. The starting year. |
to_year |
Integer. The ending year. Defaults to the latest available year in the data. |
currency |
Character. A currency code or country name (case-insensitive).
See |
annualise |
Logical. If |
Value
A numeric value representing the inflation rate as a proportion (e.g. 0.35 means 35\
Examples
# Cumulative US inflation from 2000 to 2020
inflation_rate(2000, 2020, "USD")
# Annualised UK inflation from 1990 to 2020
inflation_rate(1990, 2020, "GBP", annualise = TRUE)
Indian CPI Data (1960-2025)
Description
Annual Consumer Price Index for India, sourced from the World Bank Development Indicators (indicator: FP.CPI.TOTL). Rescaled so that 2020 = 100.
Usage
inr_cpi
Format
A data frame with 66 rows and 2 columns:
- year
Calendar year (integer)
- index
CPI index value (numeric, base 2020 = 100)
Source
World Bank Open Data https://data.worldbank.org/indicator/FP.CPI.TOTL
Indian GDP Deflator Data (1960-2025)
Description
Annual GDP deflator for India, sourced from the World Bank Development Indicators (indicator: NY.GDP.DEFL.ZS). Rescaled so that 2020 = 100.
Usage
inr_gdp_def
Format
A data frame with 66 rows and 2 columns:
- year
Calendar year (integer)
- index
GDP deflator index value (numeric, base 2020 = 100)
Source
World Bank Open Data https://data.worldbank.org/indicator/NY.GDP.DEFL.ZS
Japanese CPI Data (1960-2025)
Description
Annual Consumer Price Index for Japan, sourced from the World Bank Development Indicators (indicator: FP.CPI.TOTL). Rescaled so that 2020 = 100.
Usage
jpy_cpi
Format
A data frame with 66 rows and 2 columns:
- year
Calendar year (integer)
- index
CPI index value (numeric, base 2020 = 100)
Source
World Bank Open Data https://data.worldbank.org/indicator/FP.CPI.TOTL
Japanese GDP Deflator Data (1960-2025)
Description
Annual GDP deflator for Japan, sourced from the World Bank Development Indicators (indicator: NY.GDP.DEFL.ZS). Rescaled so that 2020 = 100.
Usage
jpy_gdp_def
Format
A data frame with 66 rows and 2 columns:
- year
Calendar year (integer)
- index
GDP deflator index value (numeric, base 2020 = 100)
Source
World Bank Open Data https://data.worldbank.org/indicator/NY.GDP.DEFL.ZS
South Korean CPI Data (1960-2025)
Description
Annual Consumer Price Index for South Korea, sourced from the World Bank Development Indicators (indicator: FP.CPI.TOTL). Rescaled so that 2020 = 100.
Usage
krw_cpi
Format
A data frame with 66 rows and 2 columns:
- year
Calendar year (integer)
- index
CPI index value (numeric, base 2020 = 100)
Source
World Bank Open Data https://data.worldbank.org/indicator/FP.CPI.TOTL
South Korean GDP Deflator Data (1960-2025)
Description
Annual GDP deflator for South Korea, sourced from the World Bank Development Indicators (indicator: NY.GDP.DEFL.ZS). Rescaled so that 2020 = 100.
Usage
krw_gdp_def
Format
A data frame with 66 rows and 2 columns:
- year
Calendar year (integer)
- index
GDP deflator index value (numeric, base 2020 = 100)
Source
World Bank Open Data https://data.worldbank.org/indicator/NY.GDP.DEFL.ZS
List supported currencies and data coverage
Description
Returns a data frame showing all supported currencies, the country they represent, and the year range available for both CPI and GDP deflator data.
Usage
list_currencies()
Value
A data frame with columns:
- currency
ISO currency code (character)
- country
Country or area name (character)
- cpi_start
First year of CPI data (integer)
- cpi_end
Last year of CPI data (integer)
- deflator_start
First year of GDP deflator data (integer)
- deflator_end
Last year of GDP deflator data (integer)
Examples
list_currencies()
Norwegian CPI Data (1960-2025)
Description
Annual Consumer Price Index for Norway, sourced from the World Bank Development Indicators (indicator: FP.CPI.TOTL). Rescaled so that 2020 = 100.
Usage
nok_cpi
Format
A data frame with 66 rows and 2 columns:
- year
Calendar year (integer)
- index
CPI index value (numeric, base 2020 = 100)
Source
World Bank Open Data https://data.worldbank.org/indicator/FP.CPI.TOTL
Norwegian GDP Deflator Data (1960-2025)
Description
Annual GDP deflator for Norway, sourced from the World Bank Development Indicators (indicator: NY.GDP.DEFL.ZS). Rescaled so that 2020 = 100.
Usage
nok_gdp_def
Format
A data frame with 66 rows and 2 columns:
- year
Calendar year (integer)
- index
GDP deflator index value (numeric, base 2020 = 100)
Source
World Bank Open Data https://data.worldbank.org/indicator/NY.GDP.DEFL.ZS
New Zealand CPI Data (1960-2025)
Description
Annual Consumer Price Index for New Zealand, sourced from the World Bank Development Indicators (indicator: FP.CPI.TOTL). Rescaled so that 2020 = 100.
Usage
nzd_cpi
Format
A data frame with 66 rows and 2 columns:
- year
Calendar year (integer)
- index
CPI index value (numeric, base 2020 = 100)
Source
World Bank Open Data https://data.worldbank.org/indicator/FP.CPI.TOTL
New Zealand GDP Deflator Data (1960-2025)
Description
Annual GDP deflator for New Zealand, sourced from the World Bank Development Indicators (indicator: NY.GDP.DEFL.ZS). Rescaled so that 2020 = 100.
Usage
nzd_gdp_def
Format
A data frame with 66 rows and 2 columns:
- year
Calendar year (integer)
- index
GDP deflator index value (numeric, base 2020 = 100)
Source
World Bank Open Data https://data.worldbank.org/indicator/NY.GDP.DEFL.ZS
UK CPI Data (1960-2025)
Description
Annual Consumer Price Index for the United Kingdom, sourced from the World Bank Development Indicators (indicator: FP.CPI.TOTL). Rescaled so that 2020 = 100.
Usage
uk_cpi
Format
A data frame with 66 rows and 2 columns:
- year
Calendar year (integer)
- index
CPI index value (numeric, base 2020 = 100)
Source
World Bank Open Data https://data.worldbank.org/indicator/FP.CPI.TOTL
UK GDP Deflator Data (1960-2025)
Description
Annual GDP deflator for the United Kingdom, sourced from the World Bank
Development Indicators (indicator: NY.GDP.DEFL.ZS). Rescaled so that 2020 = 100.
Use for adjusting macroeconomic aggregates (GDP, government spending, investment).
For consumer values, use uk_cpi instead.
Usage
uk_gdp_def
Format
A data frame with 66 rows and 2 columns:
- year
Calendar year (integer)
- index
GDP deflator index value (numeric, base 2020 = 100)
Source
World Bank Open Data https://data.worldbank.org/indicator/NY.GDP.DEFL.ZS
US CPI Data (1960-2024)
Description
Annual Consumer Price Index for the United States, sourced from the World Bank Development Indicators (indicator: FP.CPI.TOTL). Rescaled so that 2020 = 100.
Usage
usd_cpi
Format
A data frame with 65 rows and 2 columns:
- year
Calendar year (integer)
- index
CPI index value (numeric, base 2020 = 100)
Source
World Bank Open Data https://data.worldbank.org/indicator/FP.CPI.TOTL
US GDP Deflator Data (1960-2025)
Description
Annual GDP deflator for the United States, sourced from the World Bank Development Indicators (indicator: NY.GDP.DEFL.ZS). Rescaled so that 2020 = 100.
Usage
usd_gdp_def
Format
A data frame with 66 rows and 2 columns:
- year
Calendar year (integer)
- index
GDP deflator index value (numeric, base 2020 = 100)
Source
World Bank Open Data https://data.worldbank.org/indicator/NY.GDP.DEFL.ZS