You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
exports.PMT = function(rate, periods, present, future, type) {
//formula:
//PMT = PV x IR / (1 - (1 + IR) -NP)
//converted to js:
//PMT = (PV * IR) / (1 - Math.pow(1 + IR, -NP))
//(ir,np,pv) =>{//(rate, time, principle)
let pay = (present * rate) / (1 - Math.pow(1 + rate, -periods));
return -pay;
//your implementation goes on for additional work but this was all I needed for mine
I'm comparing the values to an Excel sheet calculating PMT from $100-$5000 for a time period of 1-18 months and the above PMT lines up with Excel through the whole sheet.
Also, though this isn't technically an Excel function, I also use .toMoney to format like excel:
hey, I know this is an OpenOffice port, but I noticed that the implementation doesn't return the same PMT as Excel.
(Excel Example)
rate | time | principle | pmt |
0.1 | 12 | 2000 | ($293.53) | =PMT(A2,B2,C2)
I'm comparing the values to an Excel sheet calculating PMT from $100-$5000 for a time period of 1-18 months and the above PMT lines up with Excel through the whole sheet.
Also, though this isn't technically an Excel function, I also use .toMoney to format like excel:
The text was updated successfully, but these errors were encountered: