Methodology
Last updated: November 15, 2026
This page documents the mathematics behind every calculator on HomeLoan Calc Hub. The formulas are standard lending mathematics; we publish them so you can reproduce any number with a spreadsheet. The code that runs in your browser is the same code that writes the worked examples on each page, and an automated test suite checks it against known figures.
Notation
- P: the amount borrowed, in dollars.
- r: the monthly interest rate, equal to the annual rate divided by 12 (for example 6.50% gives r = 0.065 ÷ 12 = 0.0054167).
- n: the number of monthly payments, equal to the term in years times 12.
- M: the scheduled monthly payment of principal and interest.
Fixed-rate payment
M = P × r(1 + r)ⁿ ÷ [(1 + r)ⁿ − 1]
This is the level payment that repays the loan exactly after n months when interest is charged monthly on the remaining balance. When the rate is zero the formula is undefined, so the calculators use M = P ÷ n. We compute it in the equivalent form P × r ÷ (1 − (1 + r)⁻ⁿ), which behaves better with large exponents. As a check, $400,000 at 6.50% for 30 years gives $2,528.27 a month.
Amortization schedule
For each month k, starting from the balance B₀ = P:
interestₖ = Bₖ₋₁ × r
principalₖ = M − interestₖ
Bₖ = Bₖ₋₁ − principalₖ − extraₖ
The final payment is trimmed so the balance ends at exactly zero, which absorbs floating-point residue and, with extra payments, the last partial payment. Interest and principal are not rounded inside the schedule; they are rounded to the cent only when displayed. Because every displayed row is rounded independently, a column may differ from its exact sum by a few cents. Your servicer rounds each payment to the cent, so its schedule can differ from ours by small amounts.
Taxes, insurance, HOA and PMI
- Property tax is either an annual dollar amount or a percentage of the home value, divided by 12. We hold it constant; real assessments change over time.
- Homeowners insurance is the annual premium divided by 12, also held constant.
- HOA dues are added as entered each month.
- PMI applies when the down payment is under 20% of the price (loan-to-value above 80%). The monthly charge is the annual PMI rate times the original loan amount, divided by 12. Under the federal Homeowners Protection Act you may ask your servicer to cancel PMI when your balance is scheduled to reach 80% of the original value, and it must end automatically when the balance is scheduled to reach 78%, if you are current. We mark the first payment after which the balance is at or below 80%, and stop charging PMI after the payment that brings the balance to 78% or less. Extra payments lower the balance sooner, so PMI ends sooner in the schedule; the "scheduled" date on the original amortization is what the law uses for automatic termination. Real PMI premiums depend on your credit score and loan type, and some loans (for example FHA) have mortgage insurance with different rules.
Extra payments
Extra principal is applied in the same month as the scheduled payment, after interest for that month is charged. A monthly extra is applied every month, a yearly extra in the loan-year month you pick, and a one-time lump sum with the payment number you pick. An extra payment is capped at the remaining balance. Interest saved is the total interest of the original schedule minus the total interest of the schedule with extras, and the payoff date is counted in months from today.
15-year versus 30-year
Each loan uses its own rate and term. Total interest is M × n − P. Equity built is principal repaid, the loan amount minus the balance after 60 or 120 payments. We do not model changes in the home’s value, because the term of the loan does not control them.
Biweekly payments
The biweekly payment is M ÷ 2 paid every 14 days, 26 times a year, which equals 13 monthly payments a year. The simulation charges interest at the annual rate ÷ 26 each period and ends when the balance reaches zero. The standard comparison loan uses the monthly convention above. Servicers differ in how and when they apply biweekly payments (some hold the first half until the second arrives), so the result is an estimate of the best case.
Refinance breakeven
The simple breakeven is closing costs divided by monthly payment savings, rounded up. The net breakeven is the first month in which the cash you have paid plus the balance you still owe is lower after refinancing than if you had kept your current loan. It counts the faster principal paydown that a lower rate provides and the effect of a different term. When closing costs are rolled in, they are added to the new principal; otherwise they are counted as cash paid at month zero. Lifetime savings is interest remaining on the current loan minus interest on the new loan, minus any cash closing costs.
Auto loan payoff versus investing
Both strategies use the same monthly cash: the scheduled loan payment plus your extra amount. If you prepay, all of it goes to the loan until it is repaid and then to investing. If you invest, only the scheduled payment goes to the loan and the extra is invested each month. Investments grow monthly at the assumed return times (1 − tax rate), which treats tax as an annual drag on returns; real tax treatment depends on the account and holding period. The tools compare wealth on the original payoff date. The breakeven return is found by bisection. A result in favor of investing depends entirely on the return you assume, and investment returns are not guaranteed.
Interest rate versus APR
The interest rate (note rate) determines your monthly payment and is what you enter in these calculators. The annual percentage rate (APR) is a disclosure figure that also spreads certain lender fees and discount points over the loan, so it is higher than the rate when you pay fees. Use APR to compare offers from different lenders, and use the interest rate to compute a payment. Calculators that ask for an "APR" for a car loan generally mean the rate that determines the payment; check your loan paperwork.
Benchmark rates: Freddie Mac PMMS via FRED
The 30-year and 15-year averages come from the Freddie Mac Primary Mortgage Market Survey (PMMS), published weekly on Thursdays and republished by the Federal Reserve Bank of St. Louis in its FRED database (series MORTGAGE30US and MORTGAGE15US). The 10-year Treasury figure is FRED series DGS10, shown as context. The latest observation here is for the week of November 12, 2026: 30-year 7.11%, 15-year 6.45%, 10-year Treasury 5.10%. Our automated job last checked FRED on November 15, 2026.
In November 2022 Freddie Mac changed how the PMMS is produced. It had been a survey of lenders; it is now calculated from rate information on loan applications submitted to Freddie Mac’s Loan Product Advisor system. The weekly figure therefore reflects applications from borrowers for conventional loans in that system, not a quote available to every borrower, and the two eras are not strictly comparable. See Freddie Mac’s own PMMS page for the current definition.
Safeguards: the update script reads the series directly from FRED, uses the latest valid observation and the one before it to compute the week-over-week change in basis points, and refuses to write any value outside 0.5% to 25%. If FRED is unreachable or returns bad data the previous values stay in place. The survey average is only a starting point: your rate depends on credit score, down payment, loan type, points and lender.
- https://fred.stlouisfed.org/graph/fredgraph.csv?id=MORTGAGE30US
- https://fred.stlouisfed.org/graph/fredgraph.csv?id=MORTGAGE15US
- https://fred.stlouisfed.org/graph/fredgraph.csv?id=DGS10
What these calculators do not model
- Adjustable rates, interest-only periods, balloon payments, buydowns or negative amortization.
- Daily-simple-interest loans, which are common for auto loans and compute interest by the day. Results for them are close but not exact.
- Changes in taxes, insurance or HOA dues, escrow shortages, or lender fees other than those you enter.
- Income taxes on mortgage interest, capital gains beyond the simple rate you enter, or inflation.
Spotted an error? Email us from the contact page, with the inputs you used, and we will check it and publish a correction.