Buying a home: the five mortgage decisions

The housing journey is five distinct decisions — whether (/v1/mortgage/rent-vs-buy), how much (/v1/mortgage/affordability), points or not (/v1/mortgage/points), 15 or 30 years (/v1/mortgage/term-comparison), and later, refinance? (/v1/mortgage/refinance). Each is one deterministic call.

1 · Whether: rent vs buy

A $500k home with 20% down at 7%, against $2,500 rent, over a 7-year holding period — with the down payment's opportunity cost (5% invested) and the sale costs counted.

curl -X POST https://api.numeratica.com/v1/mortgage/rent-vs-buy \
  -H "Authorization: Bearer nmr_sk_test_xxx" \
  -H "Content-Type: application/json" \
  -d '{
    "home_price": 500000, "down_payment": 100000,
    "mortgage_rate": 0.07, "loan_term_months": 360,
    "monthly_rent": 2500, "rent_growth": 0.03,
    "holding_period_months": 84,
    "investment_return": 0.05, "home_appreciation": 0.03
  }'
{
  "result_id": "rentvsbuy_1353004012303ff4",
  "engine_version": "rent-vs-buy-1.0.0",
  "result": {
    "monthly_mortgage_payment": 2661.21,
    "upfront_cost": 115000,                 /* down payment + closing */
    "home_value_at_sale": 614936.93,        /* 3%/yr appreciation, 7 yrs */
    "sale_proceeds": 213451.06,             /* after loan payoff + selling costs */
    "buy_net_present_cost": 237359.18,
    "rent_net_present_cost": 196321.05,     /* incl. investing the down payment */
    "cost_difference": -41038.13,
    "recommendation": "rent"
  },
  "disclaimer": "Calculation engine output for informational purposes only; not lending, tax, or financial advice."
}

At these numbers renting wins by $41,038 over 7 years — the invested down payment and avoided selling costs beat the equity built at a 7% mortgage rate. The engine has no thumb on the scale: stretch the holding period or drop the rate and the recommendation flips. That honesty is the point.

2 · The other four calls

How much house: $120k income, $300/mo debts, $60k down → $403,774 max price, bound by the front-end DTI, with the payment split into P&I/tax/insurance/PMI (result_id afford_3801f3bdf277d1f0). Points: 2 points for 25bps costs $8,000 and breaks even at month 120 — "worthwhile" only if you'll hold the loan ten years (points_e6dba079e99b366c). 15 vs 30: at a 5% investment return the 15-year path ends $281,665 wealthier — investing the payment difference doesn't beat a 7% mortgage (termcmp_4e65f54b0bf2421e). Refinance later: 7% → 5.5% with $6,000 closing costs pays back in 15 months (refi_742520945aa94e35).

3 · Render it

The verdict card for the featured call.

Rendered output
<div style="font-family:-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif;color:#1a2230;max-width:600px">
  <div style="font-size:14px;color:#5b6675;margin-bottom:8px">$500k home, 20% down @ 7% vs $2,500 rent · 7-year horizon</div>
  <div style="display:grid;grid-template-columns:1fr 1fr;gap:10px">
    <div style="border:2px solid #16a34a;border-radius:10px;padding:12px">
      <div style="font-size:12px;color:#16a34a;font-weight:600">Rent (and invest the down payment)</div>
      <div style="font-size:22px;font-weight:700">$196,321<span style="font-size:12px;font-weight:400;color:#5b6675"> net cost</span></div>
    </div>
    <div style="border:1px solid #e6e9ef;border-radius:10px;padding:12px">
      <div style="font-size:12px;color:#5b6675">Buy (equity net of all costs)</div>
      <div style="font-size:22px;font-weight:700">$237,359<span style="font-size:12px;font-weight:400;color:#5b6675"> net cost</span></div>
    </div>
  </div>
  <div style="margin-top:10px;border:1px solid #e6e9ef;border-radius:10px;padding:12px;display:flex;justify-content:space-between;align-items:baseline">
    <div><strong>Renting wins at these inputs</strong><span style="color:#5b6675;font-size:13px"> · longer stay or lower rate flips it</span></div>
    <div style="font-size:22px;font-weight:700;color:#16a34a">−$41,038</div>
  </div>
  <div style="color:#5b6675;font-size:12px;margin-top:6px">result_id rentvsbuy_1353004012303ff4 · not lending advice</div>
</div>

Before the house: where the next saved dollar goes (the down-payment-vs-401k question) and the generic /v1/loan/amortization schedule for any fixed-rate loan.

← All guides