RATE, PV, PMT, FV, IPMT & PPMT Excel functions implemented in Apex.
Includes a utility class with the functions and unit tests. All values are returned as Doubles so you may want to cast them as Decimal so you can set the decimal scale.
Calculated values were checked against the same function in Google Sheets.
See A Guide to the PMT, FV, IPMT and PPMT Functions for through documentation on each function.