1

i am using PHP financial class

http://www.phpclasses.org/package/892-PHP-Financial-functions-with-the-Excel-function-names-.html

the PPMT function is calculating in 360 days but i need in 365 days.

the function in the class looks like this:

function PPMT($rate, $per, $nper, $pv, $fv = 0.0, $type = 0)
{
    if (($per < 1) || ($per >= ($nper + 1)))
        return null;
    else {
        $pmt = $this->_calculate_pmt ($rate, $nper, $pv, $fv, $type);
        $ipmt = $this->_calculate_interest_part ($pv, $pmt, $rate, $per - 1);
        return ((is_finite($pmt) && is_finite($ipmt)) ? $pmt - $ipmt: null);
    }
}

cannot find any documentation nor the someone has the same issue on the internet.

M0ng0lZ
  • 11
  • 1
  • Fast research in google shows that PPMT doesn't use 360 nor 365 days. It's about the formula. [Check this post](http://answers.microsoft.com/en-us/msoffice/forum/msoffice_excel-mso_other/pmt-function-use-360-days-convention-or-365-days/8b14a4be-1b24-4a54-bfbb-290ae4e7f8f4). Another forum suggest that If you want to calculate a 365-day basis: `=PMT(APR/365, nyears*365, PV, FV)` – S.I. Nov 10 '16 at 13:52

0 Answers0