Rate of interest (per period)
Payment
Present value
Future value
When payments are due
The number of periodic payments
v0.0.12
If you only had $150/month to pay towards the loan, how long would it take to pay-off a loan of $8,000 at 7% annual interest?
import { nper } from 'financial'
Math.round(nper(0.07/12, -150, 8000), 5) // 64.07335
So, over 64 months would be required to pay off the loan.
The number of periods nper
is computed by solving the equation:
fv + pv * (1+rate) ** nper + pmt * (1+rate * when) / rate * ((1+rate) ** nper-1) = 0
but if rate = 0
then:
fv + pv + pmt * nper = 0
Generated using TypeDoc
Compute the number of periodic payments.