Affordability Calculator (28/36 Rule)
Overview
Reverse affordability calculator at /affordability-calculator and /affordability-calculator/[loanType]/*. Accepts annual income and monthly debts, applies the 28/36 rule, and returns the maximum affordable home price (not a forward price → payment calc).
Formula
28/36 caps:
grossMonthly = annualIncome / 12
frontEndCap = grossMonthly × 0.28
backEndCap = grossMonthly × 0.36 − monthlyDebts
maxMonthlyPITI = min(frontEndCap, backEndCap)
Max home price: binary search on homePrice until monthlyPITI(homePrice) ≤ maxMonthlyPITI.
PITI components per candidate price use the same formulas as the mortgage calculator (P&I amortization, property tax at configurable rate, insurance at 0.35%/yr, PMI at 0.5%/yr when down < 20%).
Source: src/lib/affordability-calculator-math.ts
Inputs
| Input | Default | Notes |
|---|---|---|
| Annual gross income | $90,000 | |
| Monthly debts (non-housing) | $500 | Car, student loans, credit cards |
| Down payment % | 20% | Overridable per loan-type page |
| Loan term | 30 years | |
| Interest rate | 6.5% | Loan-type pages use typical_rate |
| Property tax rate | 1.10% | % of home value; state pages may override |
Calculation steps
- Compute front-end (28%) and back-end (36%) monthly caps.
- Take the lower cap as
maxMonthlyPITI; record which ratio limits (28%or36%). - Binary-search home prices until PITI fits within cap.
- Derive down payment, loan amount, and PITI breakdown at max price.
Outputs
| Output | Description |
|---|---|
| Maximum home price | Primary result |
| Est. monthly PITI | At max price |
| Down payment / loan amount | Derived from max price |
| 28% / 36% caps | Shown for transparency |
| Limiting ratio | Which rule bound the result |
Assumptions
- Fixed-rate conventional-style PITI model (same PMI/tax/insurance simplifications as mortgage calculator).
- Does not include HOA, closing costs, or maintenance.
- Property tax entered as effective rate (% of value), not dollar amount.
Data sources
- Interest rate defaults from loan-type metadata (
useLoanType/ fallback) on variant pages. - Property tax rate defaults from state data when on state variant pages.
Known limitations
- State variant pages do not yet pull live FRED rates (uses loan-type typical rate).
- Does not model FHA MIP tiers separately (uses 0.5% PMI simplification).
Files touched
src/components/calculators/AffordabilityCalculator.tsxsrc/lib/affordability-calculator-math.tsapp/affordability-calculator/page.tsxsrc/pages_old/LoanTypeAffordabilityCalculatorPage.tsx
Fixed in Phase 1.1b (2026-06-13)
Replaced forward MortgageCalculator with reverse AffordabilityCalculator so page copy and calculator logic both use the 28/36 rule. Commit pending review.