In the U.S. and the UK, lenders are required to disclose the APR before the loan (or credit application) is finalized (although the definition of "APR" is not the same in these two countries – see below). Credit card companies can advertise monthly interest rates, but they are required to clearly state the annual percentage rate before an agreement is signed. APR is a term used with regard to deposit accounts as well. However, when dealing with deposit accounts, the annual percentage yield (APY) or annual equivalent rate (AER) is quoted to consumers for comparison purposes.
These rates are all equivalent, but to a consumer who is not trained in the mathematics of finance, this can be confusing. APR helps to standardize how interest rates are compared, so that a 10% loan is not made to look cheaper by calling it a loan at "9.1% annually in advance".
The APR does not necessarily convey the total amount of interest paid over the course of a year: if one pays part of the interest prior to the end of the year, the total amount of interest paid is less.
In the case of a loan with no fees, the amortization schedule would be worked out by taking the principal left at the end of each month, multiplying by the monthly rate and then subtracting the monthly payment. This can be expressed mathematically by
$p\; =\; frac\{P\_0*r^\{(n+1)\}\}\{sum\_\{l=1\}^n\; r^l\}$
This also explains why a 15 year mortgage and a 30 year mortgage with the same APR would have different monthly payments and a different total amount of interest paid. There are many more periods over which to spread the principal, which makes the payment smaller, but there are just as many periods over which to charge interest at the same rate, which makes the total amount of interest paid much greater. For example, $100,000 mortgaged (without fees, since they add into the calculation in a different way) over 15 years costs a total of $193,429.80 (interest is 93.430% of principal), but over 30 years, costs a total of $315,925.20 (interest is 215.925% of principal).
In addition the APR takes costs into account. Suppose for instance that $100,000 is borrowed with $1000 onetime fees paid in advance. If, in the second case, equal monthly payments are made of $946.01 against 9.569% compounded monthly then it takes 240 months to pay the loan back. If the $1000 onetime fees are taken into account then the yearly interest rate paid is effectively equal to 10.31%.
The APR concept can also be applied to savings accounts: imagine a savings account with 1% costs at each withdrawal and again 9.569% interest compounded monthly. Suppose that the complete amount including the interest is withdrawn after exactly one year. Then, taking this 1% fee into account, the savings effectively earned 8.9% interest that year.
While the difference between APR and EAR may seem trivial, because of the exponential nature of interest these small differences can have a large effect over the life of a loan. For example, consider a 30year loan of $200,000 with a stated APR of 10.00%, i.e., 10.0049% APR or the EAR equivalent of 10.4767%. The monthly payments, using APR, would be $1755.80. However, using an EAR of 10.00% the monthly payment would be $1691.78. The difference between the EAR and APR amounts to a difference of $64.09 per month. Over the life of a 30year loan, this amounts to $23,070.90, which is over 11% of the original loan amount.
Some classes of fees are deliberately not included in the calculation of APR. Because these fees are not included, some consumer advocates claim that the APR does not represent the total cost of borrowing. Excluded fees may include:
Lenders argue that the real estate attorney's fee, for example, is a passthrough cost, not a cost of the lending. In effect, they are arguing that the attorney's fee is a separate transaction and not a part of the loan. Consumer advocates argue that this would be true if the customer is free to select which attorney is used. If the lender insists on using a specific attorney however, then the cost should be looked at as a component of the total cost of doing business with that lender. This area is made more complicated by the practice of contingency fees – for example, when the lender receives money from the attorney and other agents to be the one used by the lender. Because of this, U.S. regulators require all lenders to produce an affiliated business disclosure form which shows the amounts paid between the lender and the appraisal firms, attorneys, etc.
Lenders argue that including late fees and other conditional charges would require them to make assumptions about the consumer's behavior — assumptions which would bias the resulting calculation and create more confusion than clarity.
Consumers can, of course, use the nominal interest rate and any costs on the loan (or savings account) and compute the APR themselves, for instance using one of the calculators on the internet.
In the example of a mortgage loan, the following kinds of fees are:
Generally included:

Sometimes included:

Generally not included:

With respect to items that may be sold with vendor financing, for example, automobile leasing, the notional cost of the good may effectively be hidden and the APR subsequently rendered meaningless. An example is a case where an automobile is leased to a customer based on a "manufacturer's suggested retail price" with a low APR: the vendor may be accepting a lower lease rate as a tradeoff against a higher sale price. Had the customer selffinanced, a discounted sales price may have been accepted by the vendor; in other words, the customer has received cheap financing in exchange for paying a higher purchase price, and the quoted APR understates the true cost of the financing. In this case, the only meaningful way to establish the "true" APR would involve arranging financing through other sources, determining the lowestacceptable cash price and comparing the financing terms (which may not be feasible in all circumstances). For leases where the lessee has a purchase option at the end of the lease term, the cost of the APR is further complicated by this option. In effect, the lease includes a put option back to the manufacturer (or, alternatively, a call option for the consumer), and the value (or cost) of this option to the consumer is not transparent.
Furthermore, most APR calculators assume that an individual will keep a particular loan until it is completely paid off resulting in the upfront fixed closing costs being amortized over the full term of the loan. If the consumer pays the loan off early, the effective interest rate achieved will be significantly higher than the APR initially calculated. This is especially problematic for mortgage loans where typical loan durations are 15 or 30 years but where many borrowers move or refinance before the loan period runs out.
In theory, this factor should not affect any individual consumer's ability to compare the APR of the same product (same duration loan) across vendors. APR may not, however, be particularly helpful when attempting to compare different products.
Three lenders with identical information may still calculate different APRs. The calculations can be quite complex and are poorly understood even by most financial professionals. Most users depend on software packages to calculate APR and are therefore dependent on the assumptions in that particular software package. While differences between software packages will not result in large variations, there are several acceptable methods of calculating APR, each of which returns a slightly different result.
The calculation for "closeended credit" (such as a home mortgage or auto loan) can be found here The calculation for "openended credit" (such as a credit card, home equity loan or other line of credit) can be found here
A single method of calculating the APR was introduced in directive 98/7/EC and is required to be published for the major part of loans. The basic equation for calculation of APR in the EU is:
Note that neither the amounts nor the periods between transactions are necessarily equal. For the purposes of this calculation, a year is presumed to have 365 days (366 days for leap years), 52 weeks or 12 equal months. An equal month is presumed to have 30.41666 days regardless of whether or not it is a leap year. The result is to be expressed to at least one decimal place. This algorithm for APR is required for some but not all forms of consumer debt in the EU. For example, this EU directive is limited to agreements of €50,000 and below and excludes all mortgages.
In the Netherlands the formula above is also used for mortgages. In many cases the mortgage is not always paid back completely at the end of period $N$, but for instance when the borrower sells his house or dies. In addition there is usually only one payment of the lender to the borrower: in the beginning of the loan. In that case the formula becomes:
If the length of the periods are equal (monthly payments) then the summations can be simplified using the formula for a geometric series. Either way the APR can only be solved iteratively from the formulas above, apart from trivial cases such as $N=1$.
The method used to calculate APRs in the EU and UK is different from that used in the U.S. and will often produce different (higher) results. This is because the U.S. method (regulation "Z") produces what would, in the UK, be called a nominal annual rate whereas the UK/EU method results in an effective annual rate.