Inflation Calculator
Calculate the real value of money over time based on inflation rate.
About this tool
An inflation calculator helps you understand how purchasing power changes over time. Inflation—the gradual increase in prices of goods and services—erodes the real value of money, meaning a dollar today won't buy as much tomorrow. This tool lets you calculate what a specific amount of money was worth in the past or will be worth in the future, accounting for inflation's cumulative effects.
To use the calculator, enter an amount of money, select or enter the inflation rate (typically an annual percentage), and specify the number of years. The tool instantly shows you the adjusted value—either what that money was worth previously or what it will be worth in the future. This is particularly useful for long-term financial planning, comparing historical prices, understanding wage growth in real terms, or evaluating investment returns after accounting for inflation.
Frequently Asked Questions
Code Implementation
def adjust_for_inflation(amount, annual_rate, years, to_future=True):
"""
Adjust an amount for inflation.
to_future=True: present -> future value
to_future=False: future -> present (real) value
"""
if to_future:
return round(amount * ((1 + annual_rate) ** years), 2)
else:
return round(amount / ((1 + annual_rate) ** years), 2)
def years_to_double(annual_rate):
"""Rule of 70: years for prices to double."""
return round(70 / (annual_rate * 100), 1)
def real_return(nominal_return, inflation_rate):
"""Fisher equation: real return approximation."""
return round(((1 + nominal_return) / (1 + inflation_rate) - 1) * 100, 4)
# Examples
print(adjust_for_inflation(1000, 0.03, 10)) # 1343.92 (future)
print(adjust_for_inflation(1343.92, 0.03, 10, False)) # 1000.0 (real)
print(years_to_double(0.035)) # 20.0 years
print(real_return(0.07, 0.03)) # ~3.88%Comments & Feedback
Comments are powered by Giscus. Sign in with GitHub to leave a comment.