# Mortgage calculator

Mortgage calculators are used to help a current or potential real estate owner determine how much they can afford to borrow on a piece of real estate. Mortgage calculators can also be used to compare the costs, interest rates, payment schedules, or help determine the change in the length of the mortgage loan by making added principal payments.

A mortgage calculator is an automated tool that enables the user to quickly determine the financial implications of changes in one or more variables in a mortgage financing arrangement. The major variables include loan principal balance, periodic compound interest rate, number of payments per year, total number of payments and the regular payment amount.

Mortgage calculation capabilities can be found on financial handheld calculators such as the HP-12C or Texas Instruments TI BA II Plus. There are also multiple free online free mortgage calculators, and software programs offering financial and mortgage calculations.

## Uses

When purchasing a new home, most buyers choose to finance a portion of the purchase price via the use of a mortgage. Prior to the wide availability of mortgage calculators, those wishing to understand the financial implications of changes to the five main variables in a mortgage transaction were forced to use compound interest rate tables. These tables generally required a working understanding of compound interest mathematics for proper use. In contrast, mortgage calculators make answers to questions regarding the impact of changes in mortgage variables available to everyone.

Mortgage calculators can be used to answer such questions as:

If one borrows $250,000 at a 7% annual interest rate and pays the loan back over thirty years, with$3,000 annual property tax payment, $1,500 annual property insurance cost and 0.5% annual private mortgage insurance payment, what will the monthly payment be? The answer is$2,142.42.

A potential borrower can use an online mortgage calculator to see how much property he or she can afford. A lender will compare the person's total monthly income and total monthly debt load. A mortgage calculator can help to add up all income sources and compare this to all monthly debt payments. It can also factor in a potential mortgage payment and other associated housing costs (property taxes, homeownership dues, etc.). One can test different loan sizes and interest rates. Generally speaking, lenders do not like to see all of a borrower's debt payments (including property expenses) exceed around 40% of total monthly pretax income. Some mortgage lenders are known to allow as high as 55%.

## Monthly payment formula

The fixed monthly payment for a fixed rate mortgage is the amount paid by the borrower every month that ensures that the loan is paid off in full with interest at the end of its term. The monthly payment formula is based on the annuity formula. The monthly payment c depends upon:

• r - the monthly interest rate, expressed as a decimal, not a percentage. Since the quoted yearly percentage rate is not a compounded rate, the monthly percentage rate is simply the yearly percentage rate divided by 12; dividing the monthly percentage rate by 100 gives r, the monthly rate expressed as a decimal.
• N - the number of monthly payments, called the loan's term, and
• P - the amount borrowed, known as the loan's principal.

In the standardized calculations used in the United States, c is given by the formula:[1]

$c = \frac{r P}{1-(1+r)^{-N}} = \frac {Pr(1+r)^N}{(1+r)^N-1}.$

For example, for a home loan for $200,000 with a fixed yearly interest rate of 6.5% for 30 years, the principal is $P=200000$, the monthly interest rate is $r=(6.5/12)/100$, the number of monthly payments is $N=30\cdot 12=360$, the fixed monthly payment equals$1,264.14. This formula is provided using the financial function PMT in a spreadsheet such as Excel. In the example, the monthly payment is obtained by entering either of the these formulas:

= PMT(6.5 / 100 / 12, 30 * 12, 200000)
= ((6.5 / 100 / 12) * 200000) / (1 - ((1 + (6.5 / 100 / 12)) ^ (-30 * 12)))
= 1264.14

The following derivation of this formula illustrates how fixed-rate mortgage loans work. The amount owed on the loan at the end of every month equals the amount owed from the previous month, plus the interest on this amount, minus the fixed amount paid every month. This fact results in the debt schedule:

Amount owed at initiation: $P$
Amount owed after 1 month: $(1+r)P-c$
Amount owed after 2 months: $(1+r)((1+r)P-c)-c = (1+r)^2P - (1+(1+r))c$
Amount owed after 3 months: $(1+r)((1+r)((1+r)P-c)-c)-c = (1+r)^3P - (1+(1+r)+(1+r)^2)c$
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Amount owed after N months: $(1+r)^NP - (1+(1+r)+(1+r)^2+ \cdots +(1+r)^{N-1})c$

The polynomial $p_N(x)=1+x+x^2+ \cdots +x^{N-1}$ appearing before the fixed monthly payment c (with $x=1+r$) is called a cyclotomic polynomial; it has a simple closed-form expression obtained from observing that $xp_N(x)-p_N(x)=x^N-1$ because all but the first and last terms in this difference cancel each other out. Therefore, solving for $p_N(x)$ yields the much simpler closed-form expression

$p_N(x)=1+x+x^2+ \cdots +x^{N-1} = \frac{x^N-1}{x-1}.$

Applying this fact about cyclotomic polynomials to the amount owed at the end of the Nth month gives (using $p_N$ to succinctly denote the function value $p_N(x)$ at argument value x = (1+r )):

Amount owed at end of month N
\begin{align} & {} = (1+r)^NP - p_Nc \\ & {} = (1+r)^NP - \frac{(1+r)^N-1}{(1+r)-1} c \\ & {} = (1+r)^NP - \frac{(1+r)^N-1}{r} c. \end{align}

The amount of the monthly payment at the end of month N that is applied to principal paydown equals the amount c of payment minus the amount of interest currently paid on the pre-existing unpaid principal. The latter amount, the interest component of the current payment, is the interest rate r times the amount unpaid at the end of month N–1. Since in the early years of the mortgage the unpaid principal is still large, so are the interest payments on it; so the portion of the monthly payment going toward paying down the principal is very small and equity in the property accumulates very slowly (in the absence of changes in the market value of the property). But in the later years of the mortgage, when the principal has already been substantially paid down and not much monthly interest needs to be paid, most of the monthly payment goes toward repayment of the principal, and the remaining principal declines rapidly.

The borrower's equity in the property equals the current market value of the property minus the amount owed according to the above formula.

With a fixed rate mortgage, the borrower agrees to pay off the loan completely at the end of the loan's term, so the amount owed at month N must be zero. For this to happen, the monthly payment c can be obtained from the previous equation to obtain:

\begin{align} c & {} = \frac{r(1+r)^N}{(1+r)^N-1}P \\ & {} = \frac{r}{1-(1+r)^{-N}}P \end{align}

which is the formula originally provided. This derivation illustrates three key components of fixed-rate loans: (1) the fixed monthly payment depends upon the amount borrowed, the interest rate, and the length of time over which the loan is repaid; (2) the amount owed every month equals the amount owed from the previous month plus interest on that amount, minus the fixed monthly payment; (3) the fixed monthly payment is chosen so that the loan is paid off in full with interest at the end of its term and no more money is owed.

While adjustable rate mortgages have been around for decades,[2] from 2002 through 2005 adjustable-rate mortgages became more complicated as did the calculations involved.[3] Lending became much more creative which complicated the calculations. Subprime lending and creative loans such as the “pick a payment”,[4] “pay option”,[5] and “hybrid” loans brought on new era of mortgage calculations. The more creative adjustable mortgages meant some changes in the calculations to specifically handle these complicated loans. To calculate the annual percentage rates (APR) many more variables needed to be added, including: the starting interest rate; the length of time at that rate; the recast; the payment change; the index; the margins; the periodic interest change cap; the payment cap; lifetime cap; the negative amortization cap; and others.[6] Many lenders created their own software programs, and World Savings even had contracted special calculators to be made by Calculated Industries specifically for their “pick a payment” program.[7] However, by the late 2000s the Great Recession brought an end to many of the creative “pick-a-payment” type of loans which left many borrowers with higher loan balances over time, and owing more than their houses were worth.[8] This also helped reduce the more complicated calculations that went along with these mortgages.

## Mortgage Analyzer

As a recent trend since 2007, in the wake of a financial crisis that was founded on many individuals' bad mortgage decision in residential borrowing, a new generation of mortgage calculation tools has emerged.[citation needed] They are better equipped to estimate the long-term cost and financial risk of various types of mortgages.[citation needed] Rather than "mortgage calculator", the new tools have become popularly known as "mortgage analyzers". Their main advantage is in the analysis of adjustable rate mortgages where the potential cost and amount owing on the mortgage are estimated under thousands, sometimes millions, of possible future mortgage rate scenarios, and then aggregate figures for average cost and risk based on all scenarios are estimated.[citation needed] Conventional mortgage calculators are capable of handling just a handful of scenarios.[citation needed]

## Total Interest Paid Formula

The total amount of interest $I$ that will be paid over the lifetime of the loan is the difference of the total payment amount ($cN$) and the loan principal ($P$):

$I = cN - P$

where $c$ is the fixed monthly payment, $N$ is the number of payments that will be made, and $P$ is the initial principal balance on the loan.

## Outside the U.S.

In the United Kingdom, the FCA - Financial Conduct Authority (formerly the FSA - Financial Services Authority) regulates loans secured on residential property. It does not prescribe any specific calculation method, however it does prescribe that for comparative purposes lenders must display an Annual Percentage Rate (as prominently as other rates).

In Spain, the regulatory authority has issued and enforced a standard calculation method, so Spanish mortgages from different lenders can be readily compared.[citation needed]