Mortgage Terms Comparison
compare_mortgage_termsCalculation, not advice. Verify with a professional before acting. Compare two fixed-rate mortgage options side-by-side:
15 vs 30 year,
different rates,
points vs no points, or
any two terms.
Shows total interest, monthly payment breakdown (with tax, insurance, PMI, HOA), equity buildup, and, critically, what happens if you take the cheaper mortgage and invest the monthly savings. Finds the break-even investment return rate.
Includes tax deduction analysis (itemizing vs standard deduction), PMI auto-removal tracking per the Homeowners Protection Act, and, when invest_the_difference is on (the default) and filing_status and annual_gross_income are given, an after-tax net worth comparison.
Pick this to compare two mortgage structures on a purchase, such as 15 versus 30 year or points versus no points; pick calculate_refi_breakeven when the comparison is against your existing loan and a refinance offer, and pick compare_payoff_strategies when the question is payoff strategy on revolving debt, not a mortgage term.
Note: ARM (adjustable-rate) mortgages are not yet supported.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| option_a | Yes | The first fixed-rate mortgage option to compare. Required. | |
| option_b | Yes | The second fixed-rate mortgage option to compare, same shape as option_a. Required. Must differ from option_a on at least one of term_years, annual_rate_pct, or points. | |
| tax_year | No | Tax year, 2025 or 2026, selecting the IRS standard-deduction table for the itemize-vs-standard analysis. The after-tax view counts it as year 1 of the horizon, so the assumed sale of the investments falls in tax year tax_year + time_horizon_years - 1. Optional; defaults to 2026 when omitted. | |
| home_price | Yes | Home purchase price in dollars. Required. Must be positive and no more than $1,000,000,000. | |
| hoa_monthly | No | Monthly homeowners association dues in dollars. Optional; defaults to 0 when omitted. Must be zero or more and no more than $1,000,000,000. | |
| pmi_monthly | No | Monthly PMI (private mortgage insurance) in dollars, charged when down payment is below 20%. Optional; defaults to 0 when omitted. Must be zero or more and no more than $1,000,000,000. | |
| filing_status | No | Tax filing status: 'single', 'married', or 'head_of_household'. Optional; matched case-insensitively. Required, with annual_gross_income, for the after-tax comparison. | |
| full_schedule | No | Whether to return the full month-by-month amortization schedule instead of the compact default. Optional; defaults to false when omitted. | |
| tax_bracket_pct | No | Marginal tax bracket as a percentage, 0-50. Optional; values the mortgage-interest deduction (interest_deduction_value) and the yearly deduction savings credited to each option's investments in the after-tax comparison. It is never applied to investment gains. | |
| closing_cost_pct | No | Closing costs as a percentage of the loan amount, 0-20, points excluded. Optional; defaults to the Urban Institute loan-size regressive schedule (about 4.6% at a $97K loan down to about 1.4% at a $679K loan) when omitted. Pass 0 to model zero closing costs. | |
| down_payment_pct | No | Down payment as a percent of home_price, e.g. 20 for 20%. Optional; defaults to 20 when omitted. Range 0-100 applies only when down_payment_amount is absent; when down_payment_amount is supplied, down_payment_pct is ignored entirely, including in provenance. | |
| standard_deduction | No | Standard deduction in dollars, compared against itemized mortgage-interest deductions. Optional; defaults to the IRS basic standard deduction for tax_year and filing_status when omitted (TY2026: 16100 single, 32200 married, 24150 head_of_household; TY2025: 15750 single, 31500 married, 23625 head_of_household; source Rev. Proc. 2025-32). Must be zero or more. | |
| time_horizon_years | No | Number of years to project the invest-the-difference comparison, 1-40. Optional; defaults to the maximum of both options' term_years when omitted. | |
| annual_gross_income | No | Annual gross income in dollars, used as adjusted gross income for the tax on investment gains at the horizon. Optional; with filing_status it enables the after-tax comparison. Held at this amount in the year of the assumed investment sale. Must be zero or more and no more than $1,000,000,000. | |
| down_payment_amount | No | Down payment in dollars. Optional; overrides down_payment_pct entirely, including its provenance row, when supplied. Must be at least $0 and strictly below home_price. | |
| pmi_removal_ltv_pct | No | Loan-to-value percentage at which to model borrower-requested PMI removal, 50-100. Optional; when omitted, PMI is modeled as removed at the 78% HPA automatic-termination threshold instead. The rejection guard applies only when pmi_monthly is above 0 and the loan's own initial LTV is above 80 percent, the range where PMI applies: there, a value at or above that initial LTV is rejected, because the requested removal point would already be met at the first payment, so no PMI would be modeled for any month of the loan. When pmi_monthly is omitted or 0, no such check runs, whatever the LTV, and the supplied value is accepted but changes nothing in the response, because no PMI is modeled in that case. Either way PMI also stops at the statutory amortization midpoint of each option's own term (12 U.S.C. §4901(7), §4902(c)), which this value cannot postpone. | |
| property_tax_annual | No | Annual property tax in dollars, for true monthly cost. Optional; defaults to 0 when omitted. Must be zero or more. | |
| extra_monthly_payment | No | Extra principal payment in dollars, applied equally to BOTH options every month. Optional; defaults to 0 when omitted. Must be zero or more and no more than $1,000,000,000. | |
| home_insurance_annual | No | Annual home insurance in dollars. Optional; defaults to 0 when omitted. Must be zero or more. | |
| invest_the_difference | No | Whether both options deploy the same total budget every month: the higher option's P&I plus any extra_monthly_payment plus the month-1 PMI both carry. The cheaper-mortgage holder invests the payment gap each month; an option that stops paying PMI earlier invests the freed cash; the option with the lower upfront points cost invests the difference at month 0; after payoff the full budget goes to investments. See comparison_basis in the response. Optional; defaults to true when omitted. | |
| investment_return_pct | No | Assumed investment return on the invested payment gap, as a percentage, an EFFECTIVE ANNUAL rate; the monthly compounding step is (1+pct/100)^(1/12)-1. Optional; defaults to the cited Senaro long-run S&P 500 nominal return, about 10%, when omitted. Range 0-30. |