Inflation calculator
Find out what a sum becomes with inflation: at 3% a year, 1000 grows to 1343.92 in 10 years. Leave out any one of the four values, whether starting amount, final amount, rate or years, and the calculator solves for it. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Present value
- 1,000
- Rate (%)
- 3
- Years
- 10
- Calculate
- Future value
- Future value
- 1,343.92
Solve the compound formula FV = PV × (1 + r)^years for any one unknown — future value, present value, annualized rate, or number of years — from the other three inputs, rounded deterministically to the decimals you choose.
One formula, four questions
Inflation and growth follow the same compound rule: the final amount equals the starting amount multiplied by one plus the annual rate, raised to the number of years. Leave out any one of those four pieces and the calculator solves for it. Ask what a sum becomes, and 1000 at 3 percent over 10 years gives 1343.92. Ask what you would need today to reach a target, and it divides instead of multiplying. Ask which annual rate links two amounts, or how many years a change takes, and it rearranges the same formula, so every answer agrees with the others.
What to watch when you enter the numbers
Type the rate as a percentage, so 3 means 3 percent a year; the calculator does the division by 100 for you. The rate is applied as the same figure every year, which makes this a planning tool rather than a record of past official price indexes. Amounts must be greater than zero and the number of years must be positive. A negative rate models deflation, as long as it stays above minus 100 percent. When you solve for years, a rate of exactly zero is not accepted, because nothing would ever change. Results are rounded to the number of decimals you choose.
One formula, four unknowns
The worked example grows 1000 at 3 percent over 10 years to 1343.92. The same engine handles the erosion of purchasing power — enter an inflation rate to see what a sum will be worth later — as well as required-return and time-to-target problems, because the arithmetic is symmetric across all four unknowns.
What you can do with it
Purchasing power
See what a sum will be worth after several years at a given inflation rate.
Back-solving a rate
Find the annualized rate that turned one amount into another over a set number of years.
Time to target
Compute how many years it takes to reach a future value at a fixed rate.
FAQ
Can the rate be negative?
Yes, to model deflation, as long as 1 + rate/100 stays above zero.
Does it compound annually?
Yes. It applies (1 + r)^years, treating one compounding period per year.
How precise is it?
decimals defaults to 2 and can go up to 6, which helps the rate and years solvers.
How do I find the annual inflation rate between two amounts?
Choose the rate option and enter the starting amount, the final amount and the number of years. The calculator compares the two amounts, finds the yearly factor behind the change and gives it back as an annual percentage.
How long does it take for an amount to reach a target?
Choose the years option and enter the starting amount, the target and the annual rate. The time is found with logarithms; a rate of exactly zero is refused here, because the amount would never change.
Related tools
For developers — API access
Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.
API endpoint
Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/dev/inflation-calculator \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"present_value":1000,"rate_percent":3,"years":10}'const res = await fetch("https://api.kit.forhosting.com/dev/inflation-calculator", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"present_value": 1000,
"rate_percent": 3,
"years": 10
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/dev/inflation-calculator",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"present_value": 1000,
"rate_percent": 3,
"years": 10
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/dev/inflation-calculator", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"present_value":1000,"rate_percent":3,"years":10}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"present_value":1000,"rate_percent":3,"years":10}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/dev/inflation-calculator", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"present_value": 1000,
"rate_percent": 3,
"years": 10
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "dev.inflation_calculator",
"status": "queued",
"_links": {
"result": "/tasks/tsk_…/result"
}
}The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |
Technical notes
One formula, four unknowns
dev.inflation_calculator applies the standard compound-growth identity FV = PV × (1 + r)^years, where r is rate_percent ÷ 100, and rearranges it to solve for whichever variable you leave out. The solve_for field — which defaults to "future_value" — selects the target: future_value computes FV from present_value, rate and years; present_value inverts it as FV ÷ (1 + r)^years; rate returns the annualized figure (FV ÷ PV)^(1 ÷ years) − 1 expressed back as a percent; and years uses ln(FV ÷ PV) ÷ ln(1 + r).
Which inputs each mode requires
The years solver additionally forbids a rate of exactly zero, because ln(1 + r) would be zero and the growth time is then undefined. The mandatory inputs depend on solve_for, and only the fields that mode needs are validated. future_value requires present_value, rate_percent and years; present_value requires future_value, rate_percent and years; rate requires present_value, future_value and years; years requires present_value, future_value and rate_percent. Any monetary value that participates must be a finite number strictly greater than zero, and years likewise must be positive, so a zero or negative horizon is rejected before the power is taken. rate_percent may be negative to model deflation, but 1 + r must stay above zero. An unrecognized solve_for string, or any non-finite intermediate result, throws a typed invalid_input error that names the specific problem so the caller can react without guessing.
Precision, rounding and where to run it
All four figures — present_value, future_value, rate_percent and years — are echoed in the response, and each is rounded once with a half-up, away-from-zero rule applied to its raw value. decimals is an optional integer from 0 to 6 that defaults to 2, giving more precision than money alone needs for the rate and years solvers, where an extra digit or two genuinely matters. Unsuccessful calls are never charged against prepaid balance.
Technical questions
Which inputs do I need?
Only the three required by your solve_for value; the remaining field is the one it computes.
Is it free?
Yes in the browser widget. The API is $0.002 per computation, billed only on success.