This calculator helps you understand how the purchasing power of money has changed over time due to inflation, using historical data from the Bank of Canada.
Understanding Inflation
Inflation is the rate at which the general level of prices for goods and services is rising, and subsequently, purchasing power is falling. Central banks, like the Bank of Canada, use monetary policy to target a low and stable rate of inflation. Over time, even a small annual inflation rate can significantly erode the value of money. For instance, $100 today will buy less than $100 did in the past.
This calculator uses historical Consumer Price Index (CPI) data, a common measure of inflation, to estimate the equivalent value of an amount of money between two different years. The Bank of Canada provides this data, allowing individuals and businesses to gauge historical purchasing power and plan for the future.
How it Works:
The calculator will attempt to find the relevant CPI data for your specified start and end years and then calculate the equivalent value of your original amount in the end year. The formula generally involves comparing the CPI index for both years. While this calculator provides a good estimate, it's important to note that actual purchasing power can vary based on specific goods and services consumed and regional price differences.
Example: If you input $100, a start year of 2000, and an end year of 2023, the calculator will show you how much $100 from the year 2000 would be equivalent to in terms of purchasing power in 2023, considering the cumulative inflation over that period.
var historicalCPI = {
1990: 100.0,
1991: 103.5,
1992: 105.2,
1993: 106.2,
1994: 107.1,
1995: 108.1,
1996: 109.4,
1997: 110.3,
1998: 111.1,
1999: 112.0,
2000: 113.7,
2001: 115.1,
2002: 116.7,
2003: 118.2,
2004: 119.6,
2005: 121.3,
2006: 123.1,
2007: 124.8,
2008: 127.2,
2009: 127.5,
2010: 128.7,
2011: 130.2,
2012: 131.5,
2013: 132.0,
2014: 132.4,
2015: 132.5,
2016: 133.7,
2017: 135.2,
2018: 137.2,
2019: 138.5,
2020: 139.0,
2021: 142.6,
2022: 149.4,
2023: 153.8, // Approximate value for calculation purposes. Official end-of-year data may vary.
2024: 155.0 // Placeholder for ongoing year.
};
function calculateInflation() {
var amountInput = document.getElementById("amount");
var startYearInput = document.getElementById("startYear");
var endYearInput = document.getElementById("endYear");
var resultDiv = document.getElementById("result");
var amount = parseFloat(amountInput.value);
var startYear = parseInt(startYearInput.value);
var endYear = parseInt(endYearInput.value);
if (isNaN(amount) || isNaN(startYear) || isNaN(endYear)) {
resultDiv.innerHTML = "Please enter valid numbers for all fields.";
return;
}
if (amount startYear) {
explanation = "To have the same purchasing power as $" + amount.toFixed(2) + " in " + startYear + ", you would need approximately $" + equivalentAmount.toFixed(2) + " in " + endYear + " (due to " + ((inflationFactor – 1) * 100).toFixed(2) + "% cumulative inflation).";
} else { // endYear < startYear
explanation = "The purchasing power of $" + amount.toFixed(2) + " in " + startYear + " was equivalent to approximately $" + equivalentAmount.toFixed(2) + " in " + endYear + " (due to " + ((1 – (1/inflationFactor)) * 100).toFixed(2) + "% cumulative deflation).";
}
resultDiv.innerHTML = "" + explanation + "";
}
.inflation-calculator-wrapper {
font-family: Arial, sans-serif;
border: 1px solid #ccc;
padding: 20px;
border-radius: 8px;
max-width: 800px;
margin: 20px auto;
display: grid;
grid-template-columns: 1fr 1fr;
gap: 30px;
}
.calculator-section {
background-color: #f9f9f9;
padding: 20px;
border-radius: 5px;
}
.explanation-section {
background-color: #eef;
padding: 20px;
border-radius: 5px;
}
.calculator-section h2, .explanation-section h3 {
color: #333;
margin-bottom: 15px;
}
.input-group {
margin-bottom: 15px;
}
.input-group label {
display: block;
margin-bottom: 5px;
font-weight: bold;
color: #555;
}
.input-group input[type="number"] {
width: calc(100% – 12px);
padding: 8px;
border: 1px solid #ccc;
border-radius: 4px;
box-sizing: border-box;
}
button {
background-color: #4CAF50;
color: white;
padding: 10px 15px;
border: none;
border-radius: 4px;
cursor: pointer;
font-size: 16px;
}
button:hover {
background-color: #45a049;
}
#result {
margin-top: 20px;
padding: 10px;
background-color: #e7f3fe;
border-left: 6px solid #2196F3;
}
.explanation-section p, .explanation-section h4 {
line-height: 1.6;
color: #444;
}
@media (max-width: 600px) {
.inflation-calculator-wrapper {
grid-template-columns: 1fr;
}
}