Future Value (FV)
Present Value (PV)
Periodic Payment (PMT)
Number of Periods (NPER)
Rate per Period (RATE)
End of Period (Ordinary)
Beginning of Period (Due)
Result
Understanding Time Value of Money (TVM)
The Time Value of Money (TVM) is a core financial principle stating that a sum of money is worth more now than the same sum will be at a future date due to its potential earning capacity. This calculator allows you to solve for any of the five key variables in financial equations: Rate, Nper, Pmt, Pv, and Fv.
The Five Variables Defined
PV (Present Value): The current value of a future sum of money or stream of cash flows given a specified rate of return.
FV (Future Value): The value of a current asset at a specified date in the future based on an assumed rate of growth.
RATE: The interest rate or discount rate per period. Note that if you are doing monthly calculations, this should be the monthly rate.
NPER: The total number of payment periods in an investment or loan.
PMT: The payment made each period. In the cash flow convention, money you pay out is typically entered as a negative number.
Cash Flow Convention
This calculator follows standard accounting conventions. Money leaving your pocket (investments, loan payments) should be entered as a negative number. Money coming into your pocket (loan proceeds, withdrawals) should be positive. For example, if you start with $1,000 in the bank (PV = -1000) and save $100 every month (PMT = -100), your Future Value (FV) will be a positive number.
Calculation Examples
Example 1: Future Savings
If you invest 1,000 today (PV = -1000) at an 8% annual rate (0.667% monthly) for 5 years (NPER = 60), and contribute 100 per month (PMT = -100), what is the FV? Result: Approximately 8,834.79
Example 2: Loan Payment
If you borrow 25,000 (PV = 25000) at 5% annual interest (0.4167% monthly) to be paid off in 4 years (NPER = 48) with zero balance remaining (FV = 0), what is the monthly PMT? Result: -575.73 (The amount you pay each month)
function updateFields() {
var solveFor = document.getElementById("solveFor").value;
var fields = ["rate", "nper", "pmt", "pv", "fv"];
for (var i = 0; i < fields.length; i++) {
var row = document.getElementById("row_" + fields[i]);
if (fields[i] === solveFor) {
row.style.display = "none";
} else {
row.style.display = "block";
}
}
document.getElementById("tvm_result_area").style.display = "none";
}
function calculateTVM() {
var solveFor = document.getElementById("solveFor").value;
var r = parseFloat(document.getElementById("input_rate").value) / 100;
var nper = parseFloat(document.getElementById("input_nper").value);
var pmt = parseFloat(document.getElementById("input_pmt").value);
var pv = parseFloat(document.getElementById("input_pv").value);
var fv = parseFloat(document.getElementById("input_fv").value);
var type = parseInt(document.getElementById("input_type").value);
var result = 0;
var label = "";
try {
if (solveFor === "fv") {
label = "Future Value (FV)";
if (r === 0) {
result = -(pv + pmt * nper);
} else {
var term = Math.pow(1 + r, nper);
result = -(pv * term + pmt * (1 + r * type) * (term – 1) / r);
}
}
else if (solveFor === "pv") {
label = "Present Value (PV)";
if (r === 0) {
result = -(fv + pmt * nper);
} else {
var term = Math.pow(1 + r, nper);
result = -(fv + pmt * (1 + r * type) * (term – 1) / r) / term;
}
}
else if (solveFor === "pmt") {
label = "Periodic Payment (PMT)";
if (r === 0) {
result = -(pv + fv) / nper;
} else {
var term = Math.pow(1 + r, nper);
result = -(fv + pv * term) / ((1 + r * type) * (term – 1) / r);
}
}
else if (solveFor === "nper") {
label = "Number of Periods (NPER)";
if (r === 0) {
result = -(pv + fv) / pmt;
} else {
var num = (pmt * (1 + r * type) – fv * r) / (pmt * (1 + r * type) + pv * r);
result = Math.log(num) / Math.log(1 + r);
}
}
else if (solveFor === "rate") {
label = "Rate per Period (RATE)";
result = calculateRate(nper, pmt, pv, fv, type) * 100;
}
if (isNaN(result) || !isFinite(result)) {
throw "Invalid calculation";
}
document.getElementById("tvm_value").innerText = (solveFor === "nper" || solveFor === "rate") ? result.toFixed(4) + (solveFor === "rate" ? "%" : "") : result.toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2});
document.getElementById("tvm_label").innerText = label;
document.getElementById("tvm_result_area").style.display = "block";
} catch (e) {
alert("Please ensure all inputs are valid. For RATE and NPER, ensure cash flows (PV, PMT, FV) have correct signs.");
}
}
function calculateRate(nper, pmt, pv, fv, type) {
var rate = 0.1;
var iteration = 0;
var maxIterations = 100;
var precision = 0.0000001;
for (var i = 0; i < maxIterations; i++) {
var f = 0;
var df = 0;
var term = Math.pow(1 + rate, nper);
var termMinusOne = Math.pow(1 + rate, nper – 1);
if (rate === 0) {
f = pv + pmt * nper + fv;
df = pv * nper + pmt * nper * (nper – 1) / 2; // approximation
} else {
f = pv * term + pmt * (1 + rate * type) * (term – 1) / rate + fv;
// Derivative of f with respect to rate
df = nper * pv * termMinusOne +
pmt * ( (1 + rate * type) * (nper * rate * termMinusOne – term + 1) / (rate * rate) + type * (term – 1) / rate );
}
var nextRate = rate – f / df;
if (Math.abs(nextRate – rate) < precision) return nextRate;
rate = nextRate;
}
return rate;
}