TTKTheTextKit
Money and Math7 min read

The Loan Payment Formula and How an Amortization Schedule Works

The loan payment formula with a worked example, how each payment splits into interest and principal, and what extra payments save. Checked on 4,000 loans.

By TheTextKit TeamPublished

Loan payment formula checked: 4,000 loans compared with Python, 0 differences to the cent

A table of three results for the loan payment calculator. 4,000 loans, with and without extra payments, were compared with Python's exact Fraction and Decimal types. They covered terms of up to 50 years. There were 0 differences to the cent.

The loan payment formula is payment = P × r × (1 + r)ⁿ ÷ ((1 + r)ⁿ − 1). Here P is the amount borrowed, r is the interest rate for one period and n is the number of payments. For 300,000 borrowed at 6% a year over 30 years, r is 0.5% a month and n is 360, and the payment is 1,798.65. This guide shows the formula by hand, how each payment splits between interest and principal, what a shorter term or extra payments change, and how we checked our calculator on 4,000 loans. It is for information, not financial advice.

The loan payment formula, step by step

Wikipedia's article on amortizing loans gives the same formula for the fixed periodic payment. In plain words, you find the monthly rate, work out how much the loan grows over its whole life, and spread the balance evenly.

For 300,000 at 6% over 30 years:

  1. The monthly rate is 6% ÷ 12 = 0.5%, so r = 0.005.
  2. The number of payments is 30 × 12 = 360.
  3. The growth factor is 1.005³⁶⁰, which is about 6.0226.
  4. The payment is 300,000 × 0.005 × 6.0226 ÷ (6.0226 − 1) = 1,798.65.

Do it with a calculator rather than rounding the factor, because small errors in step 3 become real money by step 4. That is also why a spreadsheet and a calculator can disagree by a cent: it depends on when each one rounds.

A smaller example

Try the loan payment formula on a 5 year car loan of 20,000 at 7.5%. The monthly rate is 0.075 ÷ 12 = 0.00625, and there are 60 payments. The growth factor 1.00625⁶⁰ is about 1.45329, so the payment is 20,000 × 0.00625 × 1.45329 ÷ 0.45329 = 400.76. The first month's interest is 20,000 × 0.00625 = 125.00, so 275.76 of the first payment reduces the loan. Over 60 payments you pay 4,045.51 in interest. The last payment is 400.67, nine cents less than the others, because the payment was rounded up and the schedule ends at exactly 0.

How each payment is split

The payment never changes, but what it pays for does. Each month, the interest is the balance times the monthly rate. The rest of the payment reduces the principal, so the balance falls, so next month's interest is a bit smaller, and a bit more goes to principal.

On the first payment the balance is 300,000, so the interest is 300,000 × 0.005 = 1,500.00. Of the 1,798.65 payment, only 298.65 reduces the loan. The Consumer Financial Protection Bureau says the same thing in general terms: at the beginning of the loan term, more of your payment is generally applied toward the interest than the principal. The chart showing the split is called an amortization schedule.

Payment numberInterestPrincipalBalance after
11,500.00298.65299,701.35
601,397.82400.83279,163.14
1801,069.38729.27213,146.93
300471.821,326.8393,037.25
3608.961,791.130.00
Amortization schedule of a 300,000 loan at 6% over 30 years: payment 1 is 1,500.00 interest, payment 360 is 8.96 interest

A table of five payments from the amortization schedule of a 300,000 loan at 6% over 30 years. Payment 1 has 1,500.00 of interest and 298.65 of principal. Payment 60 has 1,397.82 and 400.83. Payment 180 has 1,069.38 and 729.27. Payment 300 has 471.82 and 1,326.83. Payment 360 has 8.96 and 1,791.13.

The interest share shrinks and the principal share grows, while the payment stays the same.

After the first year, you have paid 17,899.80 in interest and only 3,684.00 off the loan. Half of the total interest has been paid by payment 126, about 35% of the way through the term, but the balance is only half paid off at payment 252, 21 years in. If you plan to sell or refinance early, that is the number to know.

Note the last row. The payment on number 360 is 1,800.09, not 1,798.65. Every payment is rounded to the cent, so after 360 of them the balance is a few cents off, and the final payment is whatever is left.

What a shorter term or a lower rate changes

The same 300,000 at 6% over different terms:

TermMonthly paymentTotal interest
10 years3,330.6299,673.59
15 years2,531.57155,682.79
20 years2,149.29215,831.10
30 years1,798.65347,515.44
Loan term compared on 300,000 at 6%: 15 years costs 155,682.79 in interest and 30 years costs 347,515.44

A table comparing four loan terms on 300,000 at 6%. 10 years has a payment of 3,330.62 and total interest of 99,673.59. 15 years has 2,531.57 and 155,682.79. 20 years has 2,149.29 and 215,831.10. 30 years has 1,798.65 and 347,515.44.

Halving the term from 30 to 15 years raises the payment by 733 but cuts the interest by more than half.

Halving the term from 30 to 15 years raises the payment by 732.92 a month, and it cuts the interest from 347,515.44 to 155,682.79. The rate matters just as much. Here is the same 30 year loan of 300,000 at five rates:

Yearly rateMonthly paymentTotal interest
4%1,432.25215,607.20
5%1,610.46279,769.69
6%1,798.65347,515.44
7%1,995.91418,524.05
8%2,201.29492,470.60
Loan rate compared on 300,000 over 30 years: 4% costs 215,607.20 in interest and 8% costs 492,470.60

A table comparing five yearly rates on a 300,000 loan over 30 years. At 4% the payment is 1,432.25 and the total interest is 215,607.20. At 5% it is 1,610.46 and 279,769.69. At 6% it is 1,798.65 and 347,515.44. At 7% it is 1,995.91 and 418,524.05. At 8% it is 2,201.29 and 492,470.60.

Each extra point of rate adds about 64,000 to 74,000 of interest on this loan.

From 4% to 8% the payment rises by 769.04 a month and the interest more than doubles.

What extra payments do

An extra payment goes entirely to the principal, so it stops the interest that would have been charged on that money for the rest of the loan. The payment from the loan payment formula stays the same, and the loan simply ends earlier.

Extra each monthPaymentsInterest savedMonths sooner
5033529,211.3625
10031353,346.8347
20027991,173.8781
500212160,295.67148
Extra payments on a 300,000 loan at 6%: 200 a month saves 91,173.87 in interest and ends the loan 81 months sooner

A table of four extra payment amounts on a 300,000 loan at 6% over 30 years. An extra 50 a month saves 29,211.36 and ends the loan 25 months sooner. An extra 100 saves 53,346.83 and 47 months. An extra 200 saves 91,173.87 and 81 months. An extra 500 saves 160,295.67 and 148 months.

An extra 200 a month removes nearly 7 years from a 30 year loan.

With 200 extra a month the loan lasts 279 payments, which is 23 years and 3 months, and you save 91,173.87. Before you plan around it, check your loan agreement for any rule about paying early or about how extra money is applied.

How we checked the calculator

We wrote a second version in Python and compared the two on 4,000 random loans. Amounts ran from 1 cent to 100 million, rates from 0 to 100%, terms from 1 month to 50 years and extra payments from 0 to 5,000 a month. For each loan we compared the payment, the number of payments, the total interest, the total paid, the last payment and a sample of the balances and interest amounts along the schedule. Everything matched, so there were 0 differences to the cent.

The first runs didn't match, and the reason is worth knowing. At first the calculator used 60 digit fixed-point numbers and the Python side used its Decimal type. They disagreed by one cent on a handful of loans, and every one was an exact half-cent tie. For a one-month loan of 300,000 at 3.3333% the exact payment is 300,833.325, and a number with a finite count of digits lands just on one side of that tie. We moved both versions to exact fractions, which keep the tie (Python's Fraction type does the same), and rounding half up gives 300,833.33.

Limits

The loan payment formula, and so the calculator, is for fixed-rate loans paid monthly. It doesn't model variable rates, interest-only periods, fees, insurance, taxes or lenders that count days instead of months. Interest is rounded to the cent every month, and some lenders round differently. Amounts take up to two decimals, rates up to four, and terms run from 1 month to 50 years.

Frequently asked questions

How is a monthly loan payment calculated?

With the formula payment = P x r x (1 + r)^n / ((1 + r)^n - 1). Here P is the loan amount, r is the yearly rate divided by 12 as a decimal and n is the number of monthly payments. For 300,000 at 6% over 30 years it gives 1,798.65 a month.

Why is the last payment different?

Every payment is rounded to the cent, so after hundreds of payments the balance is a few cents off. The last payment absorbs that difference, which is why the schedule ends at exactly 0.

Why is so much of my early payment interest?

Interest is charged on the balance you still owe, and early on that balance is at its largest. On 300,000 at 6%, the first payment is 1,500.00 of interest and only 298.65 of principal.

Do extra payments really save that much?

Often yes, because extra money goes to the principal and stops interest being charged on it. Adding 200 a month to 300,000 at 6% over 30 years ends the loan after 23 years 3 months and saves about 91,000 in interest.

Is this financial advice?

No. It is a calculator that does the arithmetic for the settings you enter. Your lender's figures may differ because of fees, insurance, taxes and how interest is rounded, so check the loan agreement.

Work out your own loan

Open the Loan Payment Calculator to see the monthly payment, the total interest and a full month-by-month schedule for your loan, with an optional extra payment. To see how savings grow instead, use the Compound Interest Calculator, and for a change between two amounts, the Percentage Calculator. Everything runs in your browser, so nothing you type is uploaded.

Try these free tools

100% in your browser

Keep reading

All articles →