Rate of interest (per period)
Number of compounding periods
Payment
Future value
When payments are due
the present value of a payment or investment
v0.0.15
What is the present value (e.g., the initial investment) of an investment that needs to total $15692.93 after 10 years of saving $100 every month? Assume the interest rate is 5% (annually) compounded monthly.
import { pv } from 'financial'
pv(0.05/12, 10*12, -100, 15692.93) // -100.00067131625819
By convention, the negative sign represents cash flow out (i.e., money not available today). Thus, to end up with $15,692.93 in 10 years saving $100 a month at 5% annual interest, one's initial deposit should also be $100.
The present value is computed by solving the equation:
fv + pv * (1 + rate) ** nper + pmt * (1 + rate * when) / rate * ((1 + rate) ** nper - 1) = 0
or, when rate = 0
:
fv + pv + pmt * nper = 0
for pv
, which is then returned.
Generated using TypeDoc
Calculates the present value of an annuity investment based on constant-amount periodic payments and a constant interest rate.