{
  "id": "mortgage-comparison",
  "version": "2d8c3817239f",
  "status": "published",
  "name": "Mortgage Comparison Calculator",
  "question": "Mortgage comparison: which wins?",
  "summary": "Compares two mortgage offers on the same home: the monthly principal and interest, points, fees and interest over the years you keep the loan, the APR, and which one costs less.",
  "category": "finance",
  "subcategory": "loans",
  "url": "https://www.acalculator.org/finance/mortgage-comparison-calculator",
  "markdown": "https://www.acalculator.org/finance/mortgage-comparison-calculator.md",
  "kind": "function",
  "method": "Loan L = price − down; for each mortgage: payment = L × r ÷ (1 − (1 + r)^−n), r = rate ÷ 1200, n = years × 12; cost = points × L ÷ 100 + fees + interest paid in the months kept; APR = 1200 × j where the payments at monthly rate j are worth L − points − fees.",
  "assumptions": [
    "Both mortgages are for the same loan, at a fixed rate, with monthly payments at the end of each month.",
    "Points and fees are paid in cash at closing; they are not added to the loan.",
    "The payment is principal and interest only: no property tax, insurance or mortgage insurance.",
    "The cost over the years kept counts points, fees and interest, not the principal you repay. Type the rates you are offered; no live rates."
  ],
  "inputs": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "price": {
        "title": "Home price",
        "description": "The price of the home.",
        "type": "number",
        "x-unit": "USD",
        "minimum": 1000,
        "maximum": 100000000
      },
      "down": {
        "title": "Down payment",
        "description": "The cash you put down; the loan is the price minus this.",
        "type": "number",
        "x-unit": "USD",
        "minimum": 0,
        "maximum": 100000000
      },
      "ratea": {
        "title": "Mortgage A rate",
        "description": "The fixed yearly interest rate of mortgage A.",
        "type": "number",
        "x-unit": "percent",
        "minimum": 0,
        "maximum": 30
      },
      "yearsa": {
        "title": "Mortgage A term (years)",
        "description": "The length of mortgage A in years, for example 15 or 30.",
        "type": "integer",
        "minimum": 1,
        "maximum": 40
      },
      "pointsa": {
        "title": "Mortgage A points",
        "description": "Discount points paid for mortgage A; 1 point is 1% of the loan.",
        "type": "number",
        "minimum": 0,
        "maximum": 10
      },
      "feesa": {
        "title": "Mortgage A lender fees",
        "description": "Origination and other lender fees for mortgage A, paid at closing.",
        "type": "number",
        "x-unit": "USD",
        "minimum": 0,
        "maximum": 10000000
      },
      "rateb": {
        "title": "Mortgage B rate",
        "description": "The fixed yearly interest rate of mortgage B.",
        "type": "number",
        "x-unit": "percent",
        "minimum": 0,
        "maximum": 30
      },
      "yearsb": {
        "title": "Mortgage B term (years)",
        "description": "The length of mortgage B in years, for example 15 or 30.",
        "type": "integer",
        "minimum": 1,
        "maximum": 40
      },
      "pointsb": {
        "title": "Mortgage B points",
        "description": "Discount points paid for mortgage B; 1 point is 1% of the loan.",
        "type": "number",
        "minimum": 0,
        "maximum": 10
      },
      "feesb": {
        "title": "Mortgage B lender fees",
        "description": "Origination and other lender fees for mortgage B, paid at closing.",
        "type": "number",
        "x-unit": "USD",
        "minimum": 0,
        "maximum": 10000000
      },
      "keep": {
        "title": "Years you keep the mortgage",
        "description": "Compare the cost over this many years, for example until you expect to sell or refinance. Leave empty for each loan’s full term.",
        "type": "number",
        "minimum": 0.1,
        "maximum": 40
      }
    }
  },
  "outputs": {
    "saving": {
      "label": "The cheaper mortgage saves",
      "description": "The difference between the two costs.",
      "format": "money"
    },
    "best": {
      "label": "Cheaper mortgage",
      "description": "The mortgage with the lower points, fees and interest.",
      "format": "text"
    },
    "loan": {
      "label": "Loan amount",
      "description": "Home price − down payment.",
      "format": "money"
    },
    "paymentA": {
      "label": "Mortgage A monthly payment",
      "description": "Principal and interest: L × r ÷ (1 − (1 + r)^−n).",
      "format": "money"
    },
    "paymentB": {
      "label": "Mortgage B monthly payment",
      "description": "Principal and interest: L × r ÷ (1 − (1 + r)^−n).",
      "format": "money"
    },
    "costA": {
      "label": "Mortgage A cost",
      "description": "Points + fees + interest paid over the years kept.",
      "format": "money"
    },
    "costB": {
      "label": "Mortgage B cost",
      "description": "Points + fees + interest paid over the years kept.",
      "format": "money"
    },
    "pointsA": {
      "label": "Mortgage A points",
      "description": "Points × loan ÷ 100.",
      "format": "money"
    },
    "pointsB": {
      "label": "Mortgage B points",
      "description": "Points × loan ÷ 100.",
      "format": "money"
    },
    "interestA": {
      "label": "Mortgage A interest",
      "description": "Interest paid over the years kept.",
      "format": "money"
    },
    "interestB": {
      "label": "Mortgage B interest",
      "description": "Interest paid over the years kept.",
      "format": "money"
    },
    "aprA": {
      "label": "Mortgage A APR",
      "description": "The yearly rate with points and fees counted (Regulation Z).",
      "format": "percent"
    },
    "aprB": {
      "label": "Mortgage B APR",
      "description": "The yearly rate with points and fees counted (Regulation Z).",
      "format": "percent"
    },
    "balanceA": {
      "label": "Mortgage A balance left",
      "description": "What you still owe on mortgage A when you stop comparing.",
      "format": "money"
    },
    "balanceB": {
      "label": "Mortgage B balance left",
      "description": "What you still owe on mortgage B when you stop comparing.",
      "format": "money"
    },
    "months": {
      "label": "Months compared",
      "description": "The months the costs cover.",
      "format": "integer"
    }
  },
  "defaultAnswer": {
    "inputs": {
      "price": 400000,
      "down": 80000,
      "ratea": 6.5,
      "yearsa": 30,
      "pointsa": 0,
      "feesa": 0,
      "rateb": 6.125,
      "yearsb": 30,
      "pointsb": 1,
      "feesb": 0
    },
    "outputs": {
      "saving": 24975.021466937265,
      "best": "Mortgage B",
      "loan": 320000,
      "paymentA": 2022.6176751774838,
      "paymentB": 1944.3537266582139,
      "costA": 408142.3630638942,
      "costB": 383167.34159695695,
      "pointsA": 0,
      "pointsB": 3200,
      "interestA": 408142.3630638942,
      "interestB": 379967.34159695695,
      "aprA": 6.5,
      "aprB": 6.219701914698137,
      "balanceA": 0,
      "balanceB": 0,
      "months": 360
    },
    "text": "Mortgage B costs $24,975.02 less over 360 months: $408,142.36 for mortgage A against $383,167.34 for mortgage B."
  },
  "examples": [
    {
      "given": {
        "price": 400000,
        "down": 80000,
        "ratea": 6.5,
        "yearsa": 30,
        "pointsa": 0,
        "feesa": 0,
        "rateb": 6.125,
        "yearsb": 30,
        "pointsb": 1,
        "feesb": 0
      },
      "expect": {
        "loan": 320000,
        "paymentA": 2022.6176751774892,
        "paymentB": 1944.3537266582107,
        "pointsb": 3200,
        "costA": 408142.3630638961,
        "costB": 383167.3415969559,
        "aprB": 6.21970191469815,
        "best": "Mortgage B"
      },
      "source": "hand calculation in content.mdx; Consumer Financial Protection Bureau, What are (discount) points and lender credits and how do they work? https://www.consumerfinance.gov/ask-cfpb/what-are-discount-points-and-lender-credits-and-how-do-they-work-en-136/ (retrieved 2026-10-05); Consumer Financial Protection Bureau, Regulation Z, 12 CFR 1026, Appendix J: annual percentage rate computations for closed-end credit transactions (actuarial method), https://www.consumerfinance.gov/rules-policy/regulations/1026/j/ (retrieved 2026-10-05)"
    },
    {
      "given": {
        "price": 400000,
        "down": 80000,
        "ratea": 6.5,
        "yearsa": 30,
        "pointsa": 0,
        "feesa": 0,
        "rateb": 6.125,
        "yearsb": 30,
        "pointsb": 1,
        "feesb": 0,
        "keep": 3
      },
      "expect": {
        "costA": 61349.4104005227,
        "costB": 60939.50265409048,
        "balanceA": 308535.1740941331,
        "months": 36
      },
      "source": "hand calculation in content.mdx; Consumer Financial Protection Bureau, What are (discount) points and lender credits and how do they work? https://www.consumerfinance.gov/ask-cfpb/what-are-discount-points-and-lender-credits-and-how-do-they-work-en-136/ (retrieved 2026-10-05)"
    },
    {
      "given": {
        "price": 300000,
        "down": 60000,
        "ratea": 6,
        "yearsa": 15,
        "pointsa": 0,
        "feesa": 1500,
        "rateb": 6.75,
        "yearsb": 30,
        "pointsb": 0,
        "feesb": 1500
      },
      "expect": {
        "paymentA": 2025.2563873163097,
        "paymentB": 1556.6354317637174,
        "costA": 126046.14971693576,
        "costB": 321888.75543493824,
        "aprA": 6.098065653873787,
        "aprB": 6.811288851547493
      },
      "source": "hand calculation in content.mdx; Consumer Financial Protection Bureau, Regulation Z, 12 CFR 1026, Appendix J: annual percentage rate computations for closed-end credit transactions (actuarial method), https://www.consumerfinance.gov/rules-policy/regulations/1026/j/ (retrieved 2026-10-05)"
    }
  ],
  "sources": [
    "Consumer Financial Protection Bureau, What are (discount) points and lender credits and how do they work? https://www.consumerfinance.gov/ask-cfpb/what-are-discount-points-and-lender-credits-and-how-do-they-work-en-136/ (retrieved 2026-10-05)",
    "Consumer Financial Protection Bureau, Regulation Z, 12 CFR 1026, Appendix J: annual percentage rate computations for closed-end credit transactions. https://www.consumerfinance.gov/rules-policy/regulations/1026/j/ (retrieved 2026-10-05)"
  ],
  "related": [
    "loan-comparison",
    "mortgage",
    "mortgage-points",
    "refinance"
  ],
  "changelog": []
}
