Time value of money calculator
1,000 invested at 5% a year, compounded monthly for 10 years, grows to 1,647.01 over 120 periods. Switch to present value to see what a future lump is worth today at the same rate. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Calculation mode
- Future
- Principal amount
- 1,000
- Interest rate
- 5
- Frequency
- 12
- Years
- 10
- Value
- 1,647.01
- Periods
- 120
The time value of money is the idea that a dollar in hand today is not the same as a dollar promised later, because money that is invested can earn a return and money that arrives later must be discounted back. Students, planners, and product teams meet the same two closed forms again and again: future value equals the known principal times one plus the annual rate divided by compounding frequency, raised to frequency times years; present value is that same principal divided by the same growth factor. This time value of money calculator accepts a lump-sum principal, a nominal annual percent, compounding periods per year, a time horizon in years, and a mode that selects present or future, then returns the computed value. It does not amortize a loan, discount a stream of cash flows, invert a rate, or schedule extra deposits.
What the time value of money means and how the two closed forms work
The time value of money is the textbook identity that a lump of cash today and a lump of cash later are comparable only after you grow or discount at a stated rate with a stated posting frequency. Future value compounds a present principal forward: FV equals PV times one plus r over n, raised to n times t. Present value does the inverse: PV equals FV divided by that same factor, so a promised future amount is restated in today's units.
P is the lump you already know—today's principal when you ask for future value, or the future amount when you ask for present value. r is the nominal annual rate as a decimal, so a five percent quote is r equals 0.05. n is the compounding frequency, how many times per year interest is posted, and t is the horizon in years. Common n values are one for annual, two for semiannual, four for quarterly, twelve for monthly, fifty-two for weekly, and three hundred sixty-five for daily.
More frequent compounding, holding the nominal rate fixed, produces a slightly larger future value because interest starts earning sooner, and a slightly smaller present value because the discount factor is larger. This capability does not add regular contributions, subtract fees, or switch to continuous compounding with e to the r t; those are different identities and different search intents. A zero-year horizon returns the original principal because any finite factor to the power zero is one.
A zero rate likewise leaves the principal unchanged. Negative rates are allowed when they stay finite, which models a contracted decline rather than a typing error, but if one plus r over n is not a usable base and the power is not a real finite number the task fails instead of returning NaN.
When comparing money across time helps
Households and students use a time value of money calculator when a savings goal, a promised balloon, or a homework problem asks what a lump is worth today or later at a stated annual rate with a stated posting frequency. Personal-finance coaches need a deterministic oracle that rejects a compounding frequency that is not a positive integer instead of silently showing NaN that a buggy form might treat as success.
Keep requests small, pin the rounded value in tests, and you get reproducible present and future figures for worksheets, LMS plugins, and edge workers without standing up a spreadsheet service of your own. When you later need regular deposits, switch to an annuity identity rather than stretching this lump-sum contract.
What you can do with it
Savings goals and promised balloons
Grow a present lump into a future target, or discount a future balloon back to today's units, from principal, annual percent, compounding frequency, and years.
Classroom and homework oracles
Generate reproducible FV = PV(1+r/n)^(nt) and PV = FV/(1+r/n)^(nt) answer keys that reject a non-integer compounding frequency instead of inventing a figure.
FAQ
How is time value of money calculated?
Future value is FV = PV × (1 + r/n)^(n×t). Present value is PV = FV / (1 + r/n)^(n×t). P is the known lump, r is the annual rate as a decimal (percent divided by 100), n is compounding periods per year, and t is years.
What is the difference between present value and future value?
Future value grows a lump you have today to a later date. Present value discounts a lump you will receive later back to today. Set mode to future or present; principal is PV in the first case and FV in the second.
What happens if compounding frequency is not a positive integer?
Zero, fractions, and non-numeric values are rejected and are not billed.
Is the interest rate a percent or a decimal?
A percent. Send 5 for five percent per year. Sending 0.05 would be treated as five hundredths of a percent, not five percent.
Does this handle annuities, extra deposits, or a series of cash flows?
No. It moves a single lump between present and future with discrete compounding. Regular contributions, NPV of a stream, and continuous compounding are different identities.
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/fin/time-value-of-money \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"mode":"future","principal":1000,"rate":5,"frequency":12,"years":10}'const res = await fetch("https://api.kit.forhosting.com/fin/time-value-of-money", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"mode": "future",
"principal": 1000,
"rate": 5,
"frequency": 12,
"years": 10
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/fin/time-value-of-money",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"mode": "future",
"principal": 1000,
"rate": 5,
"frequency": 12,
"years": 10
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/fin/time-value-of-money", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"mode":"future","principal":1000,"rate":5,"frequency":12,"years":10}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"mode":"future","principal":1000,"rate":5,"frequency":12,"years":10}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/fin/time-value-of-money", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"mode": "future",
"principal": 1000,
"rate": 5,
"frequency": 12,
"years": 10
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "fin.time_value_of_money",
"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
Input contract, response shape, and error behaviour
On success the body echoes mode, principal, rate, frequency, and years, reports periods as n times t, and returns value rounded half-up to two decimal places plus a formula string restating FV equals PV times one plus r over n to the n t, or the inverse present-value identity. Example: one thousand principal, five percent, twelve compounds per year, ten years, and mode future yields one hundred twenty periods and a value of one thousand six hundred forty-seven point zero one. The same principal discounted as a future lump at six percent quarterly for five years with mode present yields a smaller present value. Failed validation does not consume balance. POST a JSON body with five required fields. mode is the enum future or present and selects which identity to evaluate; aliases solve_for and direction are accepted. principal is the known lump in one currency; when mode is future it is PV, and when mode is present it is FV. Aliases amount, p, and lump map to the same field, and the value must sit between zero and one trillion inclusive. rate is the nominal annual percent—five means five percent per year—not a decimal 0.05 unless you truly intend five hundredths of a percent; aliases interest_rate, annual_rate, and annual_percent map to the same field. frequency is n, compounding periods per year, and it must be a positive integer from one through three hundred sixty-five. That is the contracted error: if frequency is missing, not an integer, zero, negative, or larger than three hundred sixty-five, the task fails with invalid_input naming frequency and is not billed. Aliases n, compounds_per_year, and compounding_frequency are accepted. years is t, a finite number from zero through one hundred twenty; fractional years such as two point five are allowed, and aliases t, time, period, and time_period are accepted. Each numeric field may arrive as a JSON number or a numeric string. Successful API calls use the published $0.002 base price.
Where a time value of money API earns its keep
Product teams wire the same contract into onboarding demos so a user who picks present or future, types a principal, a percent, monthly compounding, and a horizon sees the identical value the API will later return in production tests.
Integration use cases
Product demos and CI fixtures
Seed planning apps and automated tests with a deterministic value that matches the free browser widget byte-for-byte on the same five inputs.