| Title: | Inflation Adjustment for Historical Currency Values |
| Version: | 0.1.3 |
| 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://github.com/charlescoverdale/inflateR |
| BugReports: | https://github.com/charlescoverdale/inflateR/issues |
| RoxygenNote: | 7.3.3 |
| LazyData: | true |
| Depends: | R (≥ 3.5.0) |
| NeedsCompilation: | no |
| Packaged: | 2026-03-03 20:48:12 UTC; charlescoverdale |
| Author: | Charles Coverdale [aut, cre] |
| Maintainer: | Charles Coverdale <charlesfcoverdale@gmail.com> |
| Repository: | CRAN |
| Date/Publication: | 2026-03-04 08:40:12 UTC |
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)
Arguments
amount |
Numeric. The original monetary amount. |
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 current year. |
Value
A numeric value representing the inflation-adjusted amount.
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)
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)
Arguments
amount |
Numeric. The original monetary amount. |
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. |
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 representing the deflator-adjusted amount.
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-2024)
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 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
Australian GDP Deflator Data (1960-2024)
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 65 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 (1980-2024)
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 1980.
Usage
brl_cpi
Format
A data frame with 45 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 (1960-2024)
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 65 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-2024)
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 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
Canadian GDP Deflator Data (1960-2024)
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 65 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-2024)
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 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
Swiss GDP Deflator Data (1960-2024)
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 65 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-2024)
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 39 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-2024)
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 65 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-2024)
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 65 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-2024)
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 65 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)
Arguments
amount |
Numeric. The monetary amount 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. |
Details
For converting consumer or personal values, use
historical_value which uses CPI instead.
Value
A numeric value representing the historical equivalent amount.
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, and CHF.
Usage
historical_value(amount, to_year, currency, from_year = NULL)
Arguments
amount |
Numeric. The monetary amount 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. |
Value
A numeric value representing the historical equivalent amount.
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)
Indian CPI Data (1960-2024)
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 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
Indian GDP Deflator Data (1960-2024)
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 65 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-2024)
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 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
Japanese GDP Deflator Data (1960-2024)
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 65 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-2024)
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 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
South Korean GDP Deflator Data (1960-2024)
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 65 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
Norwegian CPI Data (1960-2024)
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 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
Norwegian GDP Deflator Data (1960-2024)
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 65 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-2024)
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 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
New Zealand GDP Deflator Data (1960-2024)
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 65 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-2024)
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 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
UK GDP Deflator Data (1960-2024)
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 65 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-2024)
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 65 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