Calculator Methodology

Last updated: May 11, 2026

This page documents the exact formulas, constants, and data sources used by every MortgageMath calculator. If you find a discrepancy between our output and an official agency calculator, please contact us.

Monthly Mortgage Payment

Used by: FHA Loan Calculator, VA Loan Calculator, Rent vs. Buy Calculator, and all amortization-based tools.

The standard fixed-rate monthly payment formula:

M = P × [r(1+r)^n] / [(1+r)^n − 1]

Where:

M = monthly payment

P = principal loan amount

r = monthly interest rate = annual rate ÷ 12

n = total number of payments = loan term in years × 12

When the annual rate is 0%, the formula simplifies to M = P / n (principal divided equally across all payments).

Amortization Schedule

Each month's interest and principal split is computed as:

Interest payment = remaining_balance × r

Principal payment = M − interest_payment

Remaining balance = remaining_balance − principal_payment

The closed-form remaining balance after m payments (used in the Rent vs. Buy model for efficiency):

B(m) = P × [(1+r)^n − (1+r)^m] / [(1+r)^n − 1]

Source: Standard mortgage amortization mathematics, consistent with CFPB amortization definition .

FHA Mortgage Insurance Premium (MIP)

Used by: FHA Loan Calculator.

Upfront MIP (UFMIP)

UFMIP = loan_amount × 0.0175 (1.75%)

Financed loan amount = loan_amount + UFMIP

UFMIP is typically rolled into the loan balance at closing. Source: HUD Mortgagee Letter 2023-05 .

Annual MIP Rate Schedule (2026)

The annual MIP rate depends on loan term, loan amount, and loan-to-value (LTV) ratio at origination:

Term Loan Amount LTV Annual MIP Rate
> 15 years ≤ $726,200 ≤ 90% 0.50%
> 15 years ≤ $726,200 90.01–95% 0.50%
> 15 years ≤ $726,200 > 95% 0.55%
> 15 years > $726,200 ≤ 90% 0.70%
> 15 years > $726,200 > 90% 0.75%
≤ 15 years ≤ $726,200 ≤ 90% 0.15%
≤ 15 years ≤ $726,200 > 90% 0.40%

Monthly MIP = (financed_loan_amount × annual_mip_rate) / 12

Source: HUD Mortgagee Letter 2023-05 (effective March 20, 2023).

MIP Duration

  • Down payment < 10%: MIP for full loan term
  • Down payment ≥ 10%: MIP cancelled after 11 years

Private Mortgage Insurance (PMI)

Used by: PMI Calculator.

PMI rates are set by private insurers (primarily Radian, MGIC, Essent, and Arch MI) and vary by credit score, LTV, loan term, and property type. We use representative rates from published Fannie Mae and Freddie Mac rate cards:

Credit Score LTV 95–97% LTV 90–95% LTV 85–90% LTV 80–85%
760+ 0.41% 0.28% 0.20% 0.14%
720–759 0.59% 0.44% 0.32% 0.23%
680–719 0.82% 0.62% 0.46% 0.33%
640–679 1.15% 0.90% 0.70% 0.52%
620–639 1.35% 1.10% 0.88% 0.70%

Monthly PMI = (loan_amount × annual_pmi_rate) / 12

LTV = loan_amount / home_price

PMI removal month = month when scheduled balance reaches 80% LTV

PMI is automatically cancelled under the Homeowners Protection Act (HPA) when the loan balance reaches 78% of the original purchase price, or upon borrower request at 80% LTV with a good payment history. Source: CFPB — When can I stop paying PMI?

VA Loan Funding Fee

Used by: VA Loan Calculator.

The VA funding fee is a one-time fee paid to the Department of Veterans Affairs. It is typically financed into the loan amount. The rate depends on service type, down payment percentage, and whether it is the borrower's first VA loan use.

2026 Funding Fee Schedule

Service Type Down Payment First Use Subsequent Use
Active / Veteran < 5% 2.15% 3.30%
Active / Veteran 5–10% 1.50% 1.50%
Active / Veteran ≥ 10% 1.25% 1.25%
Reserves / Guard < 5% 2.15% 3.30%
Reserves / Guard 5–10% 1.50% 1.50%
Reserves / Guard ≥ 10% 1.25% 1.25%

Veterans with a service-connected disability rating of 10% or more are exempt from the funding fee. Surviving spouses of veterans who died in service or from a service-connected disability are also exempt.

Funding fee amount = loan_amount × funding_fee_rate

Financed loan amount = loan_amount + funding_fee_amount

Monthly payment = standard amortization on financed_loan_amount

Source: VA.gov — VA Funding Fee and Closing Costs

HELOC Payment Calculation

Used by: HELOC Payment Calculator.

A HELOC (Home Equity Line of Credit) has two phases: a draw period (typically 10 years) and a repayment period (typically 10–20 years).

Draw Period (Interest-Only)

Monthly draw payment = draw_amount × (annual_rate / 12)

Total draw interest = monthly_draw_payment × (draw_period_years × 12)

During the draw period, only interest accrues on the outstanding balance. No principal is repaid. Most HELOCs are variable-rate; our calculator uses the rate you enter as a fixed rate for illustration purposes.

Repayment Period (Fully Amortizing)

At the end of the draw period, the outstanding balance is fully amortized over the repayment term:

Monthly repayment = B × [r(1+r)^n] / [(1+r)^n − 1]

Where:

B = outstanding balance at end of draw period (= draw_amount)

r = monthly rate = annual_rate / 12

n = repayment_period_years × 12

Note: If the HELOC rate adjusts, the actual repayment payment will differ from our estimate. Source: CFPB — What is a HELOC?

Rent vs. Buy Model

Used by: Rent vs. Buy Calculator.

The model computes a "net cost" for each option over a user-selected analysis period and finds the break-even year — the first year buying becomes less expensive than renting on a net basis.

Buyer Net Cost

Each year, the buyer's cumulative outflows accumulate:

Initial outflow = down_payment + (home_price × 0.03) // 3% buying closing costs

Annual outflow = mortgage_payments + property_tax + maintenance

where maintenance = home_value × 0.01 // 1% annually

Home value (year y) = home_price × (1 + appreciation_rate)^y

Home equity (year y) = max(0, home_value × (1 − 0.06) − remaining_balance)

where 0.06 = 6% hypothetical selling costs

Buyer net cost = cumulative_outflows − home_equity

Renter Net Cost

Annual rent = monthly_rent × 12 × (1 + rent_inflation)^(year−1)

Renter cumulative rent = sum of annual rent payments

Investment portfolio = down_payment × (1 + investment_return)^year

Portfolio gain = investment_portfolio − down_payment

Renter net cost = renter_cumulative_rent − portfolio_gain

The renter invests the equivalent of the buyer's down payment at the specified investment return rate, representing the opportunity cost of the down payment.

Break-Even Year

Break-even year = first year where buyer_net_cost ≤ renter_net_cost

Fixed costs not modeled (for simplicity): HOA fees, homeowner's insurance, PMI (for down payments below 20%), and renter's insurance. These can shift the break-even year by 1–3 years depending on location and property type. Sources: CFPB Owning a Home ; Census Bureau American Housing Survey .

Data Sources and Update Schedule

Data Point Source Update Frequency Last Updated
Default mortgage rate (6.89%) Freddie Mac PMMS Monthly May 2026
FHA loan limits ($498,257 / $1,149,825) HUD Mortgagee Letter Annual (January) January 2026
FHA MIP rates HUD Mortgagee Letter 2023-05 Per HUD schedule March 2023
VA funding fee rates VA.gov (Blue Water Navy Act) Per legislation Jan 2020 (current)
Conforming loan limit ($766,550) FHFA Annual (November) November 2025
PMI rate tables Fannie Mae / Freddie Mac rate cards Per insurer schedule Q1 2026
Default property tax rate (1.1%) Tax Foundation / Census ACS Annual 2025 data

Constants are stored in /src/lib/constants.ts and updated in each relevant calculation module. If you believe any value is out of date, please contact us.