The monthly loan payment formula is M = P times r times (1 + r) to the power n, all divided by ((1 + r) to the power n minus 1), where P is the loan principal, r is the monthly interest rate, and n is the total number of monthly payments. That single equation drives every fixed-rate installment loan: mortgages, auto loans, personal loans, and student loans all follow the same math. Once you understand what each variable means and how they interact, you can calculate any payment by hand, verify a lender's quote, or model what happens if you change the rate or the term. This guide walks through the formula step by step, works a complete numeric example, and shows you how to replicate the result in any spreadsheet.
The three variables: P, r, and n
Every loan payment calculation starts with the same three inputs. Getting them right is more important than the formula itself, because a small error in any one of them changes the result significantly.
- P (principal). This is the amount you borrow, not counting any interest. If you take out a 20,000 dollar car loan, P = 20,000. If you are refinancing a mortgage with a remaining balance of 185,000 dollars, P = 185,000. Use the actual loan amount at origination, not the purchase price of the asset.
- r (monthly interest rate). Lenders quote rates as an annual percentage rate (APR). To use the formula, divide that annual rate by 12. A 6 percent annual rate becomes r = 0.06 divided by 12, which equals 0.005. A 7.2 percent annual rate becomes r = 0.072 divided by 12, which equals 0.006. If your lender quotes a rate of 5.4 percent, r = 0.054 divided by 12 = 0.0045. Always convert the percentage to a decimal before dividing.
- n (total number of payments). For a monthly loan, n is the loan term in years multiplied by 12. A 5-year loan has n = 60 payments. A 3-year loan has n = 36 payments. A 30-year mortgage has n = 360 payments. If your lender describes the term in months rather than years, you can use that number directly.
Notice that r and n must use the same time unit. Because most loans compound monthly, r is the monthly rate and n is the number of months. If you ever encounter a loan that compounds weekly or daily, you would need to adjust both variables to match that period, but standard consumer loans are always monthly.
The full formula written out
Written in plain words, the formula is:
Monthly payment = Principal times (monthly rate times (1 plus monthly rate) to the power of number of payments) divided by ((1 plus monthly rate) to the power of number of payments minus 1).
The numerator multiplies the principal by a growth factor that accounts for compounding. The denominator converts that growth factor into a fraction that spreads the repayment evenly across all n periods. Together they produce the single fixed payment that, when made every month for n months, pays off exactly P dollars of principal plus all the accumulated interest.
This formula is sometimes called the annuity formula or the amortizing payment formula. It is the same math that underlies a full loan amortization schedule, which shows how each payment splits between interest and principal month by month. The monthly payment stays constant throughout a fixed-rate loan even though the interest-to-principal split shifts with every payment.
Worked example: 20,000 dollars at 6 percent for 5 years
To make the formula concrete, follow this step-by-step calculation for a 20,000 dollar loan at a 6 percent annual interest rate over 5 years.
Step 1: Identify the inputs. P = 20,000. Annual rate = 6 percent, so r = 0.06 divided by 12 = 0.005. Term = 5 years, so n = 5 times 12 = 60.
Step 2: Calculate (1 + r) to the power n. (1 + 0.005) to the power 60 = (1.005) to the power 60. Using a calculator: 1.005 raised to the 60th power equals approximately 1.34885.
Step 3: Build the numerator. P times r times (1 + r) to the power n = 20,000 times 0.005 times 1.34885 = 20,000 times 0.0067443 = 134.885.
Step 4: Build the denominator. (1 + r) to the power n minus 1 = 1.34885 minus 1 = 0.34885.
Step 5: Divide. 134.885 divided by 0.34885 equals approximately 386.66.
The monthly payment is about 386.66 dollars. Over 60 payments you will pay 60 times 386.66, which equals 23,199.60 dollars. Subtracting the 20,000 dollar principal, the total interest paid over the life of the loan is approximately 3,199.60 dollars, or roughly 3,200 dollars. Every penny of that interest is a direct result of holding the balance over time, which is why paying down principal early reduces total interest so powerfully.
Payment vs. total paid vs. total interest
These three figures tell you different things about a loan, and confusing them is one of the most common mistakes borrowers make when comparing offers.
- Monthly payment is the fixed amount you owe each month. It is the direct output of the PMT formula. A lower monthly payment feels affordable, but it does not tell you the full cost.
- Total paid is the monthly payment multiplied by the number of payments. For the worked example: 386.66 times 60 = 23,199.60 dollars. This is the total cash that leaves your account over the life of the loan.
- Total interest is total paid minus the original principal: 23,199.60 minus 20,000 = 3,199.60 dollars. This is the true cost of borrowing. Two loans with the same monthly payment can have very different total interest figures if one has a shorter term.
When evaluating loan offers, always compare total interest rather than just the monthly payment. A lender who stretches your term from 48 months to 60 months can reduce your monthly payment by 70 dollars while adding hundreds of dollars to your total interest bill. The loan calculator below shows all three figures instantly for any set of inputs.
The zero-interest special case
When the interest rate is zero, the standard PMT formula produces a division by zero error because the denominator becomes (1 + 0) to the power n minus 1 = 1 minus 1 = 0. For a zero-interest loan the calculation is simply the principal divided by the number of payments.
For example, a 12,000 dollar interest-free financing offer over 24 months has a monthly payment of 12,000 divided by 24 = 500 dollars exactly. No formula needed. Retailers and automakers occasionally offer genuine zero-percent promotional financing for qualified buyers, and this simpler rule applies for as long as the zero rate is in effect.
How to calculate a loan payment in a spreadsheet
Spreadsheets have a built-in PMT function that does the same calculation in one step. The syntax is identical in Excel, Google Sheets, and LibreOffice Calc.
The function is: =PMT(rate, nper, pv)
- rate is the periodic interest rate. For a monthly loan, enter the annual rate divided by 12. You can type the formula directly: for a 6 percent annual rate, enter 6%/12 or 0.06/12.
- nper is the total number of payments. For a 5-year monthly loan, enter 60 or 5*12.
- pv is the present value, meaning the loan amount. Enter it as a positive number: 20000.
For the worked example, the full cell formula is =PMT(0.06/12, 60, 20000), which returns approximately negative 386.66. The negative sign means this is a cash outflow. To display the payment as a positive number, either wrap the function in ABS() or negate the principal: =PMT(0.06/12, 60, -20000) returns positive 386.66.
If you want to build a full amortization schedule alongside the payment, each row's interest column is the previous remaining balance times r, and each row's principal column is the payment minus that month's interest. The balance column decrements by the principal column each row and reaches zero exactly at payment n. The loan amortization guide shows how to structure that table in full.
How rate and term change the payment
The table below shows how the monthly payment on a 20,000 dollar loan changes across different interest rates and loan terms. All figures are rounded to the nearest cent. Notice how a higher rate has a larger effect at longer terms, because there are more months over which the compounding works against you.
| Annual rate | 24 months | 36 months | 48 months | 60 months | 72 months |
|---|---|---|---|---|---|
| 0% | $833.33 | $555.56 | $416.67 | $333.33 | $277.78 |
| 3% | $859.01 | $581.62 | $442.56 | $359.37 | $303.68 |
| 5% | $877.43 | $599.42 | $460.59 | $377.42 | $322.10 |
| 6% | $886.64 | $608.44 | $469.70 | $386.66 | $331.39 |
| 8% | $904.16 | $626.73 | $488.26 | $405.53 | $350.67 |
| 10% | $921.82 | $645.34 | $507.25 | $424.94 | $370.52 |
| 12% | $939.58 | $664.29 | $526.68 | $444.89 | $390.97 |
Two patterns stand out in this table. First, doubling the term does not halve the payment when the rate is above zero, because the extra months add interest. Compare the 6 percent row: the 24-month payment is 886.64 dollars while the 72-month payment is 331.39 dollars, a reduction of about 63 percent, not 75 percent. The interest compounding eats into the savings from the longer term. Second, the payment difference between a low rate and a high rate grows as the term lengthens. At 24 months the gap between 3 percent and 12 percent is about 80 dollars per month; at 72 months that gap widens to about 87 dollars. Small rate differences matter more when you carry a balance for longer.