PHP 98/7/EC Compliant APR Calculator (download)

This class resolves the APR value for a stream of payments and fees in accordance with the 98/7/EC directive. The PHP class can resolve an APR value for a simple annuity or more complex deals with variable repayments at unequal intervals.

This is a free script released under the terms of the General Public License & you can download this class by clicking here

This method for calculating the APR of a loan is the method used by all member states of the European Union and is not the same as the method used in the USA. The UK, France, Germany and other member states use the effective annual rate and not the nominal annual rate used in America to represent the Annual Percentage Rate.


Example 1

The Sum loaned is €1,000 and repayable in two amounts, each of €600 paid after one and two years respectively.

$apr = new APR(1000, 365);
$apr->AddPayment(365, 600);
$apr->AddPayment(730, 600);
$aprValue = APR::ResolveAPR($apr);
echo $aprValue;
// Output is 13.06623

Example 2

The Sum loaned is €6,990 and is repaid by 60 monthly payments of €145.63.

echo APR::APR_Simple_Annuity(6990, 145.63, 60);
// Output is 9.54995

Example 3

The Sum loaned is €6,990 and is repaid by 60 monthly payments of €145.63 with a backend fee of €199.

echo APR::APR_Simple_Annuity(6990, 145.63, 60, 0, 199);
// Output is 10.37226