From grimoire
Calculates maximum home purchase price using the 28/36 rule, stress-testing at rate +2%, and computing total cash needed for down payment, closing costs, and reserves.
How this skill is triggered — by the user, by Claude, or both
Slash command
/grimoire:calculate-mortgage-affordabilityThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Apply the 28/36 rule to gross income, stress-test at rate +2%, calculate total required cash, and derive a maximum purchase price that leaves financial margin.
Apply the 28/36 rule to gross income, stress-test at rate +2%, calculate total required cash, and derive a maximum purchase price that leaves financial margin.
Adopted by: The 28/36 rule is the standard underwriting guideline used by Fannie Mae, Freddie Mac, and FHA — the three institutions that back the majority of US residential mortgages. Lenders use it as the primary affordability screen. The CFPB's "Know Before You Owe" framework (implemented by the Dodd-Frank Act) requires lenders to verify borrower's ability to repay using these or similar ratios. The rule predates the 2008 housing crisis and is the stress-tested standard for sustainable homeownership.
Impact: Buying based on what the bank will approve vs. what you can sustainably afford are different things. Banks approved loans up to 45% DTI in the run-up to 2008; those borrowers frequently became house-poor or defaulted when rates rose. The 28/36 rule leaves margin for savings, car payments, and unexpected expenses. Lenders approve your maximum borrowing capacity; you should choose a significantly lower purchase price.
Why best: The 28/36 framework is conservative by design. It prevents the single most common financial mistake in homeownership: buying at the absolute ceiling of approval and having no margin for job loss, rate increases, or major repairs. The stress test (+2% rate scenario) accounts for adjustable-rate mortgages and future refinancing risk. Total cash calculation prevents buyers from arriving at closing without enough funds.
Sources: CFPB, Know Before You Owe (2023) — borrower protection guidelines; FHA Handbook 4000.1 — 28/36 underwriting standard; Urban Institute, Housing Finance at a Glance (2023) — debt-to-income risk data; Redfin Research (2023) — closing cost ranges by state
Use gross income (before taxes), not take-home pay. Include:
Example: $120,000 annual salary + $40,000 partner salary = $160,000 combined = $13,333 gross monthly income
Front-end ratio: PITI (Principal + Interest + Taxes + Insurance) must not exceed 28% of gross monthly income.
PITI = mortgage payment + property tax + homeowner's insurance + (HOA fees if applicable)
Maximum PITI = gross monthly income × 0.28
Example: $13,333 × 0.28 = $3,733/month maximum PITI
To estimate property taxes and insurance before you have a specific property:
Back-end ratio (DTI — Debt-to-Income): All monthly debt payments (PITI + car loans + student loans + credit card minimum payments + any other obligations) must not exceed 36% of gross monthly income.
Maximum total monthly debt = gross monthly income × 0.36
Example: $13,333 × 0.36 = $4,800 maximum total monthly debt
If you have existing debt obligations: subtract them from the total debt limit to find what's left for housing.
Example: $500/month car payment + $400/month student loans = $900 existing debt. $4,800 − $900 = $3,900 available for PITI — which is more constrained than the front-end limit in this case. The more restrictive limit governs.
From your maximum PITI, subtract estimated taxes, insurance, and PMI to get your maximum principal + interest (P&I) payment. Then reverse-calculate the loan amount using current rates.
Formula for loan amount from monthly payment:
Loan = P&I × [(1+r)^n − 1] / [r × (1+r)^n]
Where r = monthly rate (annual rate ÷ 12) and n = number of payments (360 for 30-year).
Or use the shortcut: At 7% interest on a 30-year mortgage, each $1,000 of loan amount costs approximately $6.65/month in P&I. Divide your maximum P&I by 6.65 × 1,000 to get approximate loan amount.
Example:
Mortgage rates can rise. If you take an adjustable-rate mortgage, or if you are planning to refinance later, you need to verify you can afford the payment at a higher rate.
Recalculate P&I payment using rate + 2% on the same loan amount. If the resulting PITI exceeds 28% of gross income, the purchase is not affordable under stress conditions — reduce the purchase price.
Example: $463,000 loan at 9% (stress test): monthly P&I ≈ $3,726. PITI = $3,726 + $500 + $150 = $4,376 — exceeds the $3,733 limit. Reduce loan amount to ~$340,000 to remain safe under stress conditions.
Maximum purchase price = loan amount + down payment.
Down payment options:
| Down payment | PMI required? | Notes |
|---|---|---|
| < 20% | Yes (adds cost) | FHA allows 3.5%; conventional allows 3–5% |
| 20% | No | Eliminates PMI; standard recommendation |
| > 20% | No | Lower monthly payment; improves debt ratios |
Example (20% down): $463,000 loan ÷ 0.80 = $578,750 maximum purchase price
Knowing your purchase price isn't enough — you need the total cash required to close.
| Item | Amount |
|---|---|
| Down payment | 20% of purchase price |
| Closing costs | 2–5% of purchase price (varies by state; avg ~3%) |
| Pre-paid items | 2–3 months property tax + insurance escrow (~$2,000–5,000) |
| Moving costs | $1,000–5,000 depending on distance |
| Immediate repairs reserve | Recommend 1% of purchase price |
| Emergency fund (post-purchase) | Maintain 3–6 months expenses |
Example (on $578,750 purchase):
If you don't have this cash, reduce your purchase price — not your down payment (lower down payment adds PMI and increases monthly payment).
Your affordable purchase price is the lowest of:
Household income $180k, 30-year at 7%, 20% down, $1,200/yr existing debt:
First-time buyer, $75k income, renting, no existing debt:
Buying at maximum pre-approval: Pre-approval is based on what you can technically qualify for, not what is financially sustainable. Lenders don't account for your other goals (retirement savings, college, travel).
Forgetting closing costs: Many first-time buyers budget for the down payment but arrive at closing underfunded. Closing costs of 2–5% on a $400k home = $8,000–20,000.
Ignoring PMI: At less than 20% down, PMI costs $100–400/month and is pure cost with no equity benefit. Model its impact before accepting a low-down-payment loan.
Not stress-testing the rate: A $400k loan at 6.5% costs $2,528/month. At 8.5%, the same loan costs $3,076/month — a $548/month increase. If your budget is tight at 6.5%, you cannot afford this home.
Buying based on "what we can afford now": A home purchase is a 30-year commitment. Model your payment assuming income stays flat (job loss, parental leave, career change) — not assuming it grows.
Financial disclaimer: This skill encodes professional best practices for educational purposes. It is not financial or legal advice. Mortgage affordability depends on your specific financial situation, local tax rates, credit score, and lender guidelines. Consult a licensed mortgage professional and financial advisor before making a purchase decision.
npx claudepluginhub jeffreytse/grimoire --plugin grimoireAnalyzes mortgages, HELOCs, and personal loans with amortization schedules, payment calculations, comparisons, and qualification tools.
Provides mortgage lending knowledge: loan products (conventional, FHA, VA, USDA, ARM, Non-QM), rate structures, underwriting guidelines, compliance (TRID, RESPA, HMDA), and closing procedures.
Plans a house hacking strategy to reduce housing costs by renting out part of a primary residence. Covers property types, FHA financing, and rental income calculations.