Calculator Basics

    Calculator Basics · Methodology

    Mortgage Calculator

    PITI amortization with loan-type fees (conventional PMI, FHA MIP, VA funding fee, USDA guarantee) and optional extra payments.

    Methodology documentation · CalculatorBasics.com · Last updated 2026-08-24

    Last verified: 2026-08-24

    Mortgage Calculator

    Overview

    Shared component MortgageCalculator.tsx mounted across /mortgage-calculator/*, loan-type hubs (FHA, VA, USDA, conventional, jumbo), embed routes, and programmatic variants. Computes PITI + loan-type fees + optional HOA from user inputs.

    Core math: src/lib/mortgage-calculator-math.tscomputeMortgageScenario() orchestrates loan-type fees and P&I.

    Formula

    Monthly principal & interest (fixed-rate amortizing loan):

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

    Where P = total loan amount (base + financed upfront fees when applicable).

    Loan-type fee methodology

    Conventional / jumbo / generic mortgage

    • PMI: 0.5%/yr on base loan when down payment < 20%
    • No upfront fee
    • Source: industry-standard borrower-paid PMI convention

    FHA — HUD Mortgagee Letter 2023-05

    • Upfront MIP: 1.75% of base loan amount, financed into loan
    • Annual MIP (30-year): 0.55%/yr when LTV > 95%; 0.50%/yr when LTV ≤ 95%
    • Duration: life of loan when LTV > 90% at origination; otherwise 11 years
    • Helper: computeFHAMIP()

    VA — 38 CFR 36.4313

    • No monthly MI
    • Upfront funding fee: financed into loan
      • First use, regular military, 0% down: 2.15%
      • 5% down: 1.75%; 10% down: 1.25%
      • Exempt veterans (Purple Heart, disability): 0% via UI toggle
    • Helper: computeVAFundingFee()
    • MVP uses first-use regular-military rates; subsequent-use tiers available in helper

    USDA — USDA RD Instruction 3555

    • Upfront guarantee fee: 1% of base loan, financed
    • Annual guarantee fee: 0.35%/yr on base loan balance (monthly = base × 0.0035 ÷ 12)
    • Helper: computeUSDAGuaranteeFee()

    Inputs

    Input Default Notes
    Home price $300,000 defaultHomePrice prop
    Down payment 20% Dollar or percent mode
    Loan term 30 years Hybrid slider 8–30
    Interest rate 6.500% Hybrid slider
    Extra monthly payment blank Primary input row
    VA funding fee exempt false Checkbox when loanType === 'va'
    Annual property tax $3,600
    Annual home insurance $1,200
    Monthly HOA $0

    loanType prop drives fee math and MRC widget variant.

    Outputs

    • Monthly P&I (on total loan including financed fees)
    • Tax, insurance, loan-type fee line (PMI / MIP / guarantee fee)
    • Fee source footnote for FHA, VA, USDA
    • Total interest, payoff with extra payment, amortization schedule

    Assumptions

    • Fixed-rate fully amortizing loans
    • FHA/VA/USDA upfront fees financed into principal unless exempt (VA)
    • Property tax and insurance are user-supplied annual totals
    • Discount points and lender overlays not modeled

    Files touched

    • src/lib/mortgage-calculator-math.ts
    • src/components/calculators/MortgageCalculator.tsx
    • docs/calculator-methodology/verification-2026-08.md

    Related

    Verification results

    ScenarioInputsOur resultReferenceDeltaSource
    S1✓ within tolerance$400k / 20% down / 6.5% / 30yr / ConvP&I $2,022.62 · PITI $2,422.62 · TI $408,142.36P&I $2,022.62 · PITI $2,422.62 · TI $408,142.36$0 (within ±$1/mo)Standard amortization
    S2✓ within tolerance$300k / 3.5% down / 6.75% / 30yr / FhaP&I $1,910.55 · PITI $2,443.24 · TI $393,232.14P&I $1,910.55 · PITI $2,443.24 · TI $393,232.14$0 (within ±$1/mo)HUD Mortgagee Letter 2023-05
    S3✓ within tolerance$450k / 0% down / 6.25% / 30yr / VaP&I $2,830.30 · PITI $3,230.30 · TI $559,232.29P&I $2,830.30 · PITI $3,230.30 · TI $559,232.29$0 (within ±$1/mo)38 CFR 36.4313
    S4✓ within tolerance$1200k / 20% down / 6.875% / 30yr / JumboP&I $6,306.52 · PITI $6,706.52 · TI $1,310,345.98P&I $6,306.52 · PITI $6,706.52 · TI $1,310,345.98$0 (within ±$1/mo)Standard amortization
    S5✓ within tolerance$400k / 20% down / 5.75% / 15yr / ConvP&I $2,657.31 · PITI $3,057.31 · TI $158,316.21P&I $2,657.31 · PITI $3,057.31 · TI $158,316.21$0 (within ±$1/mo)Standard amortization
    S6✓ within tolerance$600k / 5% down / 7% / 30yr / ConvP&I $3,792.22 · PITI $4,429.72 · TI $795,200.72P&I $3,792.22 · PITI $4,429.72 · TI $795,200.72$0 (within ±$1/mo)Standard amortization
    S7✓ within tolerance$250k / 0% down / 6.5% / 30yr / UsdaP&I $1,595.97 · PITI $2,068.89 · TI $322,049.83P&I $1,595.97 · PITI $2,068.89 · TI $322,049.83$0 (within ±$1/mo)USDA RD Instruction 3555
    S11✓ within toleranceS1 + $200/mo extraP&I $2,022.62 · TI $302,713.69 · 281 mo payoffP&I $2,022.62 · TI $302,713.69 · 281 mo payoff$0 (within ±$10 TI)Standard amortization
    S12✓ within toleranceS1 biweekly modeBiweekly P&I $1,011.31 · TI $314,145.80 · 290 moBiweekly P&I $1,011.31 · TI $314,145.80 · 290 mo$026-period biweekly simulation