# Payment calculations for fixed rate loans (Excel PMT func?)

**URL:** <https://www.ruby-forum.com/t/payment-calculations-for-fixed-rate-loans-excel-pmt-func/72779>\
**Category:** Rails\
**Created:** [October 18, 2006, 10:09pm UTC](https://www.ruby-forum.com/t/payment-calculations-for-fixed-rate-loans-excel-pmt-func/72779 "2006-10-18T22:09:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![weyus](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/7ab992/32.png) [@weyus](https://www.ruby-forum.com/u/weyus)\
**Post date:** [October 18, 2006, 10:09pm UTC](https://www.ruby-forum.com/t/payment-calculations-for-fixed-rate-loans-excel-pmt-func/72779/1 "2006-10-18T22:09:26Z")

</div>

All,

I need the Ruby equivalent of the Excel PMT function which will  
calculate a monthly payment amount given an interest rate, a number of  
months, and a present value of the loan amount.

Anyone know where I can find such a beast?

If someone can point me to the formula that Excel uses internally,  
that’s fine too. I know it isn’t very complicated, but I def. don’t  
know it off hand.

Thanks,  
Wes
