Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Mortgage Loan Formula in Excel: Step-by-Step Guide

· 7 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

You can build a working mortgage payment calculator in Excel in about five minutes using one function: PMT. It takes your interest rate, number of payments and loan amount and returns the fixed monthly payment, so you can see exactly what a home loan costs before you sign anything. You do not need an add-in, a template or any macros — a plain sheet with three or four input cells is enough, and once it is built you can change one number and watch the payment update instantly.

The same sheet can be extended to show how much of each payment goes to interest versus principal, and how much total interest you will pay over the whole term. That is where a mortgage calculator in Excel beats a website calculator: you keep the model, you can compare two loans side by side, and you can add extra payments to see the savings.

What You'll Need

  • Excel on Windows, Mac, or the free web version at office.com — the PMT function is identical in all of them. Google Sheets also works with the same formula.
  • Four numbers from your loan offer or estimate: the loan amount (principal), the annual interest rate, the term in years, and how often payments are made (monthly, biweekly, etc.).
  • A blank worksheet. Nothing else. Labels and formatting are cosmetic; the math works without them.

Step-by-Step

  1. Set up four input cells. In cell A1 type Loan amount and put the principal in B1, for example 250000. In A2 type Annual rate and put the rate as a decimal in B2, for example 0.065 for 6.5%. In A3 type Years and put the term in B3, for example 30. In A4 type Payments per year and put 12 in B4 for monthly. Keep each input in its own cell — hard-coding numbers inside the formula later makes the sheet hard to adjust.
  2. Convert the annual rate to a periodic rate. Mortgage interest is quoted per year but charged per payment. In B5 enter =B2/B4. At 6.5% monthly that gives 0.0054167. Do not skip this: using the annual rate directly produces a payment roughly twelve times too high.
  3. Calculate the total number of payments. In B6 enter =B3*B4. A 30-year monthly loan gives 360 payments.
  4. Write the PMT formula. In B7 enter =PMT(B5,B6,B1). The syntax is PMT(rate, nper, pv), where rate is the periodic rate, nper is the number of periods and pv is the present value — the amount borrowed. The result appears as a negative number because Excel treats the payment as money leaving your account. On a 250,000 loan at 6.5% over 30 years you should see about -1,580.17.
  5. Make the payment positive. Either put a minus sign in front of the loan amount, =PMT(B5,B6,-B1), or wrap the whole thing in ABS: =ABS(PMT(B5,B6,B1)). The first is the conventional approach because it keeps the sign convention meaningful if you later add other cash flows.
  6. Check the answer against a known figure. Before trusting the sheet, test it with simple numbers. 100,000 at 6% over 30 years (0.005 monthly, 360 periods) should give 599.55. If you get something wildly different, a rate or period is wrong, not the function.
  7. Add a total-interest figure. In B8 enter =B7*B6-B1 (using the positive payment). On the example above this gives about 318,861 of interest over the life of the loan — usually more than people expect. Label it clearly so you do not confuse it with the monthly payment.
  8. Build an amortization split for any single payment. To see how much of payment number n is interest, use =IPMT(B5,n,B6,B1) and for principal use =PPMT(B5,n,B6,B1). Replace n with a cell reference, such as a period number in D1, so you can change it freely. In the early years almost all of the payment is interest; this formula shows that plainly.
  9. Compare scenarios side by side. Copy the input rows into a second column and change one variable — a shorter term, a lower rate, a smaller loan. Two columns of results make the trade-off between payment size and total interest obvious. A 15-year loan at the same rate raises the payment but cuts total interest sharply.
  10. Format the outputs. Select the payment and interest cells and apply a currency format with two decimals. If PMT returns a decimal with many places, that is normal — formatting only changes the display, not the stored value.

Common Mistakes

Entering the rate as a whole number. Typing 6.5 instead of 0.065 makes the payment absurdly large. If your cell is formatted as a percentage, typing 6.5% stores the correct 0.065 automatically; if it is formatted as General, you must divide by 100 yourself.

Forgetting to divide by payments per year. The rate argument must match the period. Monthly payments use rate/12 and nper = years × 12; biweekly payments use rate/26 and nper = years × 26. Mixing an annual rate with a monthly period count is the single most common error.

Leaving out taxes, insurance and fees. PMT calculates principal and interest only. Property tax, homeowner's insurance, mortgage insurance and HOA dues are added on top, so the real monthly outlay is higher than the formula result. Add those monthly amounts separately.

Using the purchase price instead of the loan amount. If you put 20% down on a 300,000 home, the principal is 240,000, not 300,000.

Assuming the quoted rate is what you pay. The interest rate and the APR differ because APR includes fees. Use the interest rate in PMT and compare APRs when judging offers.

Tips

Name your input cells (select the cell, type a name in the Name Box to the left of the formula bar) so formulas read as =PMT(rate/12,years*12,-loan) instead of cell addresses. It makes the sheet far easier to audit later.

Model extra payments by adding a monthly principal column to an amortization table rather than editing PMT — PMT assumes a fixed payment for the whole term and cannot handle irregular overpayments on its own.

Use data validation on the rate cell to keep entries between 0 and 1, which catches the whole-number mistake before it spreads.

Keep a copy of the original sheet before you experiment. Small edits to the input cells are easy to lose track of when comparing many scenarios.

Troubleshooting

You see #NUM! or #DIV/0!. One of the arguments is zero or negative in a way PMT cannot handle. Check that payments per year is greater than zero and that the term is a positive number.

The result is a text string instead of a number. Your input cell is probably formatted as Text, or contains a space or currency symbol typed directly. Reformat the cell as Number or Currency and re-enter the value.

The payment looks about twelve times too high. You passed the annual rate without dividing by 12. Fix the rate cell, not the formula.

Excel shows ###### in the cell. The column is too narrow for the formatted number. Widen it; the value itself is fine.

A zero rate gives a strange answer. PMT handles a zero rate correctly and returns principal divided by the number of payments, but only if the rate cell truly contains 0, not an empty cell or text.

Results differ from your lender's. Small differences usually come from rounding, payment timing (beginning versus end of period) or fees included in the lender's figure. The optional fourth argument of PMT, type, set to 1, treats payments as due at the start of each period; leave it out or set it to 0 for the normal end-of-period convention.

Frequently Asked Questions

What does the PMT function do?

It returns the constant payment needed to repay a loan over a set number of periods at a fixed interest rate, assuming the rate does not change.

Why is my PMT result negative?

Excel treats money paid out as negative. Put a minus sign before the loan amount or wrap the formula in ABS to display it as a positive figure.

Can I calculate a payment for an adjustable-rate mortgage?

Not with a single PMT formula. PMT assumes one fixed rate for the whole term, so for an adjustable loan you would need to recalculate at each rate change or build a period-by-period schedule.

How do I work out the loan amount I can afford?

Use PV instead of PMT: =PV(rate,nper,-payment) returns the principal that a given monthly payment supports. Keep the rate and period arguments in the same units as before.

Does this work the same in Google Sheets?

Yes. PMT, IPMT, PPMT and PV use the same argument order in Google Sheets, so formulas can be copied across without changes.

Is the PMT payment the same as my monthly mortgage bill?

No. It covers principal and interest only. Taxes, insurance, mortgage insurance and any HOA fee are separate and must be added to get your actual monthly cost.