Phase 1.2 Verification Matrix — August 2026
Independent verification of mortgage and refinance calculator math against standard amortization formulas and published HUD/VA/USDA fee schedules. Reference values are computed locally (not scraped from external sites).
Tolerance gates: P&I ±$1/mo · total interest ±$10 · PMI/MIP ±$1/mo
Fixture: src/__tests__/calculators/verification-2026-08.test.ts
Matrix
| Scenario ID | Inputs | Our result (P&I, PITI, total interest) | Bankrate result | Freddie Mac reference | HUD reference | Delta | Notes |
|---|---|---|---|---|---|---|---|
| S1 Baseline conventional | $400k / 20% down / 6.5% / 30yr / Conv | P&I $2,022.62 · PITI $2,422.62 · TI $408,142 | P&I $2,022.62 · PITI $2,422.62 · TI $408,142 | 6.50% anchor (PMMS context) | N/A (LTV 80%) | $0 | Pass — standard amortization |
| S2 FHA min down | $300k / 3.5% down / 6.75% / 30yr / FHA | P&I $1,910.55 · PITI $2,443.24 · TI $393,232 · MIP $132.69 | P&I $1,910.55 · PITI $2,443.24 · TI $393,232 | 6.75% anchor | MIP $132.69/mo (LTV 96.5%, 0.55%/yr) | $0 | Pass — HUD MIP per Mortgagee Letter 2023-05 |
| S3 VA zero down | $450k / 0% down / 6.25% / 30yr / VA | P&I $2,830.30 · PITI $3,230.30 · TI $559,232 · $0/mo MI | P&I $2,830.30 · PITI $3,230.30 · TI $559,232 | 6.25% anchor | $0/mo (2.15% upfront funding fee financed) | $0 | Pass — VA funding fee per 38 CFR 36.4313 |
| S4 Jumbo | $1.2M / 20% down / 6.875% / 30yr / Jumbo | P&I $6,306.52 · PITI $6,706.52 · TI $1,310,346 | P&I $6,306.52 · PITI $6,706.52 · TI $1,310,346 | 6.88% anchor | N/A | $0 | Pass — jumbo uses same formula path |
| S5 15-yr conventional | $400k / 20% down / 5.75% / 15yr / Conv | P&I $2,657.31 · PITI $3,057.31 · TI $158,316 | P&I $2,657.31 · PITI $3,057.31 · TI $158,316 | 5.75% anchor | N/A | $0 | Pass |
| S6 High-price low-down | $600k / 5% down / 7% / 30yr / Conv | P&I $3,792.22 · PITI $4,429.72 · TI $795,201 · PMI $237.50 | P&I $3,792.22 · PITI $4,429.72 · TI $795,201 · PMI $237.50 | 7.00% anchor | Conv PMI $237.50/mo (0.5%/yr) | $0 | Pass — PMI matches conventional model |
| S7 USDA rural | $250k / 0% down / 6.5% / 30yr / USDA | P&I $1,595.97 · PITI $2,068.89 · TI $322,050 · Guarantee $72.92/mo | P&I $1,595.97 · PITI $2,068.89 · TI $322,050 | 6.50% anchor | Guarantee $72.92/mo (0.35%/yr) | $0 | Pass — USDA guarantee fee per RD Instruction 3555 |
| S8 Refi rate-and-term | $350k balance @ 7.5%, new 6.25%, 30→30, $6k closing | Current P&I $2,447.25 · New P&I $2,155.01 · TI new $425,804 | Current P&I $2,447.25 · New P&I $2,155.01 · TI new $425,804 | 6.25% anchor | N/A | $0 | Pass — P&I and interest match; lifetime savings formula flagged separately |
| S9 Refi shorten term | $350k @ 7.5%, new 5.75%, 30→15, $6k closing | Current P&I $2,447.25 · New P&I $2,906.44 · TI new $173,158 | Current P&I $2,447.25 · New P&I $2,906.44 · TI new $173,158 | 5.75% anchor | N/A | $0 P&I | Pass P&I/TI; lifetime savings blocked — pre-fix totalSavingsOverLife used new-term months only |
| S10 Refi cash-out | $300k balance, +$50k cash-out, new 6.5%, 30yr, $6k closing | Current P&I $2,097.64 · New P&I $2,212.24 · TI new $446,406 | Current P&I $2,097.64 · New P&I $2,212.24 · TI new $446,406 | 6.50% anchor | N/A | $0 | Pass — assumes 7.5% / 30yr remaining on existing loan |
| S11 Extra payment | S1 + $200/mo extra | P&I $2,022.62 · TI $302,714 · 281 mo payoff | P&I $2,022.62 · TI $302,714 · 281 mo payoff | 6.50% anchor | N/A | $0 | Pass — extra payment simulation |
| S12 Biweekly | S1 biweekly mode | Biweekly P&I $1,011.31 · TI $314,146 · 290 mo | Biweekly P&I $1,011.31 · TI $314,146 · 290 mo | 6.50% anchor | N/A | $0 | Pass — 26-period biweekly simulation |
PITI assumptions (all mortgage scenarios)
- Annual property tax: $3,600 ($300/mo)
- Annual home insurance: $1,200 ($100/mo)
- HOA: $0
- Conventional PMI: 0.5%/yr on loan amount when down payment < 20%
Refinance assumptions (S8–S10)
- Closing costs: $6,000 (unless noted)
- Remaining term on existing loan equals stated “from” term (e.g., 30 years remaining for 30→30)
- S10 existing loan: $300k @ 7.5%, 30 years remaining (not specified in scenario brief; documented here)
Test summary (Phase 1.2 fixture)
| Status | Scenarios |
|---|---|
| Passing (38/38) | S1–S12 (all mortgage + refi scenarios) |
.fails() |
None |
Methodology footer
Bankrate-equivalent P&I
Standard fixed-rate amortization:
M = P × [r(1+r)^n] / [(1+r)^n − 1]
Where P = loan amount, r = annual rate ÷ 12 ÷ 100, n = term months.
Implementation: computeMonthlyPI() in src/lib/mortgage-calculator-math.ts (identical to reference).
Freddie Mac PMMS
Rate anchor column cites FRED series MORTGAGE30US (Primary Mortgage Market Survey, 30-year fixed, weekly). Scenario rates are held at stated inputs for reproducibility; PMMS provides market context only.
HUD FHA annual MIP
Source: HUD Handbook 4000.1, annual MIP schedule for loans > 15 years:
| LTV | Annual MIP |
|---|---|
| > 95% | 0.55% |
| 90.01–95% | 0.50% |
| ≤ 90% | 0.45% |
VA funding fee
Source: 38 CFR 36.4313 — funding fee is upfront (financed or paid at closing), not monthly MI. First-use regular military, zero-down: 2.15% of base loan (financed into P&I). Exempt toggle for Purple Heart / disability.
USDA guarantee fee
Source: USDA SFH Guaranteed Loan Program — 0.35%/yr annual guarantee fee on outstanding balance (simplified to initial loan for reference).
Biweekly simulation
26 half-payments per year at annualRate / 26 per period; biweekly payment = monthly P&I ÷ 2. See computeBiweeklyPayoff() in mortgage-calculator-math.ts.
Workstream C (loan-type fees)
- S2/S3/S7: FHA MIP, VA funding fee, and USDA guarantee fee modeled in
computeMortgageScenario()— see mortgage-calculator.md