Rate of interest (per period)
Number of compounding periods (e.g., number of payments)
Present value (e.g., an amount borrowed)
Future value (e.g., 0)
When payments are due
the (fixed) periodic payment
v0.0.12
What is the monthly payment needed to pay off a $200,000 loan in 15 years at an annual interest rate of 7.5%?
import { pmt } from 'financial'
pmt(0.075/12, 12*15, 200000) // -1854.0247200054619
In order to pay-off (i.e., have a future-value of 0) the $200,000 obtained
today, a monthly payment of $1,854.02 would be required. Note that this
example illustrates usage of fv
having a default value of 0.
The payment 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 pmt
.
Note that computing a monthly mortgage payment is only
one use for this function. For example, pmt
returns the
periodic deposit one must make to achieve a specified
future balance given an initial deposit, a fixed,
periodically compounded interest rate, and the total
number of periods.
Generated using TypeDoc
Compute the payment against loan principal plus interest.