← Back to Interaction Rule Set

Clarity Engine — Mortgage Math Skill

Version: 1.0 | Status: Implementation-Ready — Gear 1

Table of Contents SKILL PURPOSE FUNCTION LIBRARY INVOCATION FORMAT EXECUTION RULES ROUNDING POLICY FUNCTION SPECIFICATIONS COMBINED SCENARIO EXAMPLE OUTPUT FORMAT IMPLEMENTATION GUARDRAILS SCOPE BOUNDARIES

Clarity Engine — Mortgage Math Skill

Version: 1.0 | Status: Implementation-Ready — Gear 1

Scope: Core mortgage math functions. Family-agnostic unless noted. No program underwriting rules.

Confidential: PreFi, Inc. / Purpose Technology, Inc. d/b/a Purlend

SKILL PURPOSE

When invoked, this skill computes any of the following core mortgage math functions with full

intermediate steps, rounding rules, input validation, and output suitable for:

This skill does NOT apply underwriting rules, program eligibility, or overlays.

Those are handled by family-specific skills (VA, FHA, Conventional, DSCR).

This skill IS the calculation engine those family skills call.

FUNCTION LIBRARY

Function IDNameCategory
MATH-PMT-001Monthly Payment (PMT)Core
MATH-PV-001Present Value / Max Loan (PV)Core
MATH-NPER-001Term Solve (NPER)Core
MATH-FV-001Future Value (FV)Core
MATH-RATE-001Rate Solve (RATE)Core
MATH-DTI-001Debt-to-Income RatioQualifying
MATH-GMI-001Gross Monthly IncomeQualifying
MATH-PITI-001PITI Monthly PaymentQualifying
MATH-LTV-001LTV / CLTV / HCLTVCollateral
MATH-AMORT-001Amortization ScheduleAnalysis
MATH-BUYDOWN-0012-1 Temporary BuydownOptimization
MATH-DISC-001Discount Point BreakevenOptimization
MATH-RECAPTURE-001Recapture PeriodOptimization
MATH-DELTA-001Payment DeltaComparison
MATH-CASHOUT-001Cash-Out AvailableEquity
MATH-RESERVES-001Reserves CalculatorAssets
MATH-UTIL-001Credit UtilizationCredit
MATH-DSCR-001Debt Service Coverage RatioDSCR
MATH-CASHTOCLOSE-001Cash-to-Close StackClosing
MATH-MIP-001FHA MIP (Upfront + Annual)FHA
MATH-MI-001Conventional PMI EstimateConventional

INVOCATION FORMAT

State which function to execute and provide the required inputs.

Ask for missing required inputs before computing.

Always show full intermediate steps.

Example invocations:

EXECUTION RULES

  1. Always show intermediate steps. Never output only the final number.
  2. State rounding policy for every computed value (see rounding table below).
  3. Validate inputs before computing. Flag out-of-range values.
  4. Label every output with its function ID, inputs used, and formula applied.
  5. For optimization functions, present the result as an economic comparison.
  6. For Nova outputs, translate the math into plain borrower language after the computation block.

ROUNDING POLICY

Value TypeRounding Rule
Monthly payment (PMT)Round UP to nearest cent
Loan amountRound DOWN to nearest dollar
Interest rate (periodic)10 decimal places internally; display 4 decimal places
DTI ratioDisplay as percentage, 1 decimal place (e.g., 43.2%)
LTVDisplay as percentage, 2 decimal places (e.g., 89.74%)
Dollar savings / deltaRound to nearest dollar
Funding fee amountRound to nearest dollar
Breakeven monthsRound UP to nearest whole month
DSCRDisplay 2 decimal places (e.g., 1.24)
All intermediate valuesCarry full precision; round only at final output

FUNCTION SPECIFICATIONS

MATH-PMT-001 — Monthly Payment

Purpose: Compute the fixed monthly principal + interest payment for a fully amortizing loan.

Formula:


monthly_rate = annual_rate / 12
n = term_months
PMT = loan_amount × (monthly_rate × (1 + monthly_rate)^n) / ((1 + monthly_rate)^n - 1)

Required Inputs:


loan_amount:    decimal   (principal balance)
annual_rate:    decimal   (e.g., 0.0675 for 6.75%)
term_years:     integer   (e.g., 30)

Derived:


term_months = term_years × 12
monthly_rate = annual_rate / 12

Output:


monthly_pi:     decimal   (round UP to nearest cent)

Worked Example:


Inputs:  loan_amount = $425,000 | annual_rate = 6.75% | term_years = 30
Step 1:  monthly_rate = 0.0675 / 12 = 0.005625
Step 2:  term_months = 30 × 12 = 360
Step 3:  numerator = 0.005625 × (1.005625)^360 = 0.005625 × 7.68609 = 0.043234
Step 4:  denominator = 7.68609 - 1 = 6.68609
Step 5:  PMT = $425,000 × (0.043234 / 6.68609) = $425,000 × 0.006467 = $2,748.49
Output:  monthly_pi = $2,748.49

Validation:

MATH-PV-001 — Maximum Loan / Present Value

Purpose: Solve for the maximum loan amount given a fixed monthly payment, rate, and term.

Used for payment-neutral cash-out and max purchase power calculations.

Formula:


monthly_rate = annual_rate / 12
n = term_months
PV = PMT × ((1 - (1 + monthly_rate)^-n) / monthly_rate)

Required Inputs:


target_monthly_payment:  decimal
annual_rate:             decimal
term_years:              integer

Worked Example:


Inputs:  target_payment = $2,528 | annual_rate = 5.75% | term_years = 30
Step 1:  monthly_rate = 0.0575 / 12 = 0.004792
Step 2:  term_months = 360
Step 3:  discount_factor = (1 - (1.004792)^-360) / 0.004792
         = (1 - 0.17317) / 0.004792 = 0.82683 / 0.004792 = 172.558
Step 4:  PV = $2,528 × 172.558 = $436,227
Output:  max_loan_amount = $436,227
Cash available (if current balance = $391,400): $436,227 - $391,400 = $44,827

MATH-NPER-001 — Term Solve

Purpose: Solve for the number of payments needed to pay off a loan at a fixed payment and rate.

Used for term-reduction analysis when keeping the same payment after a rate drop.

Formula:


NPER = -ln(1 - (monthly_rate × PV / PMT)) / ln(1 + monthly_rate)

Required Inputs:


loan_amount:    decimal
annual_rate:    decimal
monthly_payment: decimal

Worked Example:


Inputs:  loan_amount = $391,400 | annual_rate = 5.75% | monthly_payment = $2,528
Step 1:  monthly_rate = 0.004792
Step 2:  ratio = 0.004792 × 391,400 / 2,528 = 1,875.29 / 2,528 = 0.74182
Step 3:  NPER = -ln(1 - 0.74182) / ln(1.004792)
         = -ln(0.25818) / ln(1.004792)
         = -(-1.35427) / 0.004781 = 283.2 months
Output:  term_months = 284 (round UP)
         term_years_months = "23 years, 8 months"
         Payoff acceleration vs. 30-yr: 360 - 284 = 76 months = 6.3 years early

MATH-DTI-001 — Debt-to-Income Ratio

Purpose: Compute front-end DTI, back-end DTI, and DTI gap for qualification analysis.

Formula:


front_end_dti = monthly_housing_payment / gross_monthly_income
back_end_dti = (monthly_housing_payment + monthly_debt_obligations) / gross_monthly_income
dti_gap = back_end_dti - dti_limit

Required Inputs:


gross_monthly_income:         decimal   (see MATH-GMI-001)
monthly_housing_payment:      decimal   (see MATH-PITI-001)
monthly_debt_obligations:     decimal   (all non-housing recurring debts)
dti_limit:                    decimal   (program-specific: 0.36, 0.43, 0.45, 0.50, 0.41)

Liability Inclusion Rules:


INCLUDE in monthly_debt_obligations:
  - Revolving minimum payments (credit cards)
  - Installment loan payments (auto, student, personal)
  - Other mortgage payments (investment properties)
  - Co-signed debt payments (unless third-party payment documented ≥12 months)
  - Lease payments

EXCLUDE from monthly_debt_obligations (flag reason):
  - Installment debts with ≤10 payments remaining [EXCL-10PMT]
  - Co-signed debts with ≥12 months documented third-party payment [EXCL-COSIGN]
  - Business debts on business tax return with CPA letter [EXCL-BIZ]
  - Deferred student loans: use 1% of balance OR actual payment (program-specific)

Worked Example:


Inputs:
  gross_monthly_income = $8,500
  monthly_housing_payment = $2,847 (PITI)
  monthly_debt_obligations = $640 (auto $340 + CC minimums $300)
  dti_limit = 0.45 (conventional with conditions)

Step 1:  front_end_dti = $2,847 / $8,500 = 33.5%
Step 2:  back_end_dti = ($2,847 + $640) / $8,500 = $3,487 / $8,500 = 41.0%
Step 3:  dti_gap = 41.0% - 45.0% = -4.0% (UNDER limit — PASS)
Step 4:  dti_headroom = $8,500 × 0.45 - $3,487 = $3,825 - $3,487 = $338/month headroom

Output:
  front_end_dti:   33.5%
  back_end_dti:    41.0%  → PASS (under 45.0% limit)
  dti_headroom:    $338/month additional obligations before hitting limit

DTI Limit Reference by Program:


Conventional (manual):    36% back-end (hard), 45% with conditions
Conventional (DU/LP):     50% maximum (automated)
FHA:                       43% standard, 57% with strong compensating factors
VA:                        41% benchmark (NOT a hard stop — triggers 120% residual test)
DSCR:                      Not applicable (uses DSCR ratio, not personal DTI)

MATH-GMI-001 — Gross Monthly Income

Purpose: Compute total qualifying Gross Monthly Income (GMI) from all eligible income streams.

Income Type Rules:


W-2 SALARY/HOURLY:
  gmi_contribution = annual_salary / 12
  Documentation: VOE + paystubs (30 days)

BONUS / OVERTIME / COMMISSION:
  gmi_contribution = 2-year average / 12
  Requirement: 2-year history, employer continuity letter
  Flag: If declining trend, use lower year or exclude
  Formula: (year1_amount + year2_amount) / 24

SELF-EMPLOYED (Schedule C):
  Step 1: net_profit (Line 31 of Schedule C, 2-year avg)
  Step 2: add_backs = depreciation + depletion + business_use_of_home
           + meals_and_entertainment_excess + non_recurring_losses
           - non_recurring_gains
  Step 3: gmi_contribution = (net_profit + add_backs) / 12 (2-year avg)

RENTAL INCOME:
  Agency: gmi_contribution = gross_rent × 0.75 (25% vacancy factor)
  Requires: Executed lease or appraiser market rent
  Investment property: use Schedule E, 2-year average

SOCIAL SECURITY / PENSION / DISABILITY (non-taxable):
  For DTI: gmi_contribution = monthly_amount × 1.25 (25% gross-up)
  For VA Residual: gmi_contribution = monthly_amount (NO gross-up — net only)
  Flag income as tax_free = true

ASSET DEPLETION:
  Eligible assets = liquid_assets + 0.60 × retirement_assets
  gmi_contribution = eligible_assets / term_months (typically 360)
  Flag: Program-specific — not all lenders allow

BOARDER INCOME (FHA only):
  gmi_contribution = monthly_boarder_rent × 0.75 (if ≤30% of total GMI)

Output:


gmi_total:              decimal   (sum of all qualifying income streams)
gmi_breakdown:          list      (each stream: type, amount, documentation flag)
gross_up_applied:       boolean
gross_up_streams:       list      (which streams received gross-up and at what factor)

MATH-PITI-001 — Monthly PITI Payment

Purpose: Compute the full monthly housing payment including all components.

Formula:


PITI = P&I + property_tax_monthly + hazard_insurance_monthly
     + hoa_monthly + mi_or_mip_monthly

Required Inputs:


principal_and_interest:         decimal   (from MATH-PMT-001)
annual_property_tax:            decimal   (or monthly_property_tax directly)
annual_hazard_insurance:        decimal   (or monthly directly)
hoa_monthly:                    decimal   (0 if none)
mi_type:                        none | pmi | fha_mip | va_ff_financed | usda_gfee
mi_monthly:                     decimal   (from MATH-MI-001 or MATH-MIP-001)

Worked Example:


Inputs:
  P&I:                $2,424 (from PMT calculation)
  property_tax:       $8,400/year → $700/month
  hazard_insurance:   $1,800/year → $150/month
  HOA:                $0
  PMI (0.65% on $340k): $340,000 × 0.0065 / 12 = $184/month

Step 1:  PITI = $2,424 + $700 + $150 + $0 + $184 = $3,458
Output:  monthly_piti = $3,458
         component_breakdown:
           P&I:        $2,424  (70.1%)
           Tax:        $700    (20.2%)
           Insurance:  $150    (4.3%)
           HOA:        $0      (0.0%)
           PMI:        $184    (5.3%)

MATH-LTV-001 — LTV / CLTV / HCLTV

Purpose: Compute all three LTV variants and identify PMI thresholds.

Formulas:


LTV   = first_mortgage_balance / property_value
CLTV  = (first_mortgage + heloc_balance + second_mortgage) / property_value
HCLTV = (first_mortgage + full_heloc_line_limit + second_mortgage) / property_value

PMI Threshold Flags:


IF LTV > 0.80 AND loan_type = conventional → pmi_required = true
IF LTV <= 0.80 → pmi_required = false
IF LTV <= 0.78 → pmi_auto_cancellation_reached (Homeowners Protection Act)
FHA: MIP required regardless of LTV (see MATH-MIP-001)
VA: No PMI — funding fee replaces it

Worked Example:


Inputs:
  purchase_price = $500,000
  down_payment = $50,000 (10%)
  heloc_line = $0
  second_mortgage = $0

Step 1: first_mortgage = $500,000 - $50,000 = $450,000
Step 2: LTV   = $450,000 / $500,000 = 90.00%
Step 3: CLTV  = $450,000 / $500,000 = 90.00%
Step 4: HCLTV = $450,000 / $500,000 = 90.00%

Flags:
  pmi_required:              TRUE (LTV 90% > 80%)
  pmi_cancellation_at_ltv:   78% → at $390,000 balance
  conforming_eligible:       TRUE (under $806,500)
  high_balance_eligible:     check county limit

MATH-AMORT-001 — Amortization Schedule

Purpose: Generate full or partial amortization table. Show interest/principal split by period.

Formula (per period):


interest_payment[n]   = remaining_balance[n-1] × monthly_rate
principal_payment[n]  = monthly_payment - interest_payment[n]
remaining_balance[n]  = remaining_balance[n-1] - principal_payment[n]

Output Options:


full_schedule:     All 360 rows
year_summary:      Annual totals (interest paid, principal paid, balance)
milestone_points:  LTV=80%, LTV=78%, halfway point, 5yr/10yr/15yr
total_interest:    Sum of all interest payments

Worked Example (first 3 payments):


Loan: $400,000 | Rate: 6.75% | Term: 30 years
monthly_rate = 0.005625 | PMT = $2,594.28

Pmt 1: Interest = $400,000 × 0.005625 = $2,250.00 | Principal = $344.28 | Balance = $399,655.72
Pmt 2: Interest = $399,655.72 × 0.005625 = $2,248.06 | Principal = $346.22 | Balance = $399,309.50
Pmt 3: Interest = $399,309.50 × 0.005625 = $2,246.12 | Principal = $348.16 | Balance = $398,961.34

LTV=80% milestone: Balance = $320,000 → Month 246 (20.5 years)
Total interest (30 years): $533,940.48

MATH-BUYDOWN-001 — 2-1 Temporary Buydown

Purpose: Compute the full cost and payment schedule for a seller-funded 2-1 temporary buydown.

Rules:


Year 1 rate: note_rate - 0.02
Year 2 rate: note_rate - 0.01
Year 3+:     note_rate (fully amortizing at note rate for remaining term)

Buydown fund = sum of monthly payment subsidy for 24 months
  = Σ(month 1-12): [PMT(note_rate) - PMT(year1_rate)]
  + Σ(month 13-24): [PMT(note_rate) - PMT(year2_rate)]

Borrower qualifies at: note_rate (not the reduced rate)

Required Inputs:


loan_amount:    decimal
note_rate:      decimal
term_years:     integer (typically 30)

Worked Example:


Inputs: loan_amount = $400,000 | note_rate = 7.25% | term_years = 30

Step 1: PMT at note_rate (7.25%):   $2,729.76/month
Step 2: PMT at year1_rate (5.25%):  $2,209.29/month  → monthly subsidy yr1 = $520.47
Step 3: PMT at year2_rate (6.25%):  $2,463.42/month  → monthly subsidy yr2 = $266.34

Step 4: Buydown fund:
  Year 1: $520.47 × 12 = $6,245.64
  Year 2: $266.34 × 12 = $3,196.08
  Total buydown cost: $9,441.72

Output:
  year1_payment:        $2,209.29
  year2_payment:        $2,463.42
  year3_plus_payment:   $2,729.76
  buydown_fund_required: $9,441.72
  year1_savings_total:   $6,245.64
  year2_savings_total:   $3,196.08

Nova Output:
  "Year 1 payment: $2,209/month (saves $521/month vs. full payment)
   Year 2 payment: $2,463/month (saves $267/month)
   Year 3+ payment: $2,730/month (full rate)
   Total buyer savings over 2 years: $9,442
   Seller funds this upfront — cost to seller same as $9,442 price reduction,
   but buyer gets $521/month breathing room in year one."

MATH-DISC-001 — Discount Point Breakeven

Purpose: Calculate whether buying down the rate is economically justified given expected tenure.

Formula:


point_cost = loan_amount × 0.01 (per point)
monthly_savings = PMT(original_rate) - PMT(bought_down_rate)
breakeven_months = point_cost / monthly_savings  (round UP)

Required Inputs:


loan_amount:          decimal
original_rate:        decimal
bought_down_rate:     decimal
points_purchased:     decimal   (e.g., 1.5 = 1.5 points)
term_years:           integer
expected_tenure_years: integer  (how long borrower plans to keep loan)

Worked Example:


Inputs: $450,000 loan | 7.25% → 7.00% with 1 point | 30 yr | borrower staying 7 years

Step 1: Point cost = $450,000 × 0.01 = $4,500
Step 2: PMT at 7.25% = $3,070.47
Step 3: PMT at 7.00% = $2,994.86
Step 4: Monthly savings = $3,070.47 - $2,994.86 = $75.61
Step 5: Breakeven = $4,500 / $75.61 = 59.5 → 60 months (5 years)

Tenure check: 7 years (84 months) > 60 months → ECONOMICALLY JUSTIFIED
Post-breakeven savings: (84 - 60) × $75.61 = $1,814.64 net gain
Total 7-year interest savings: $75.61 × 84 = $6,351.24 - $4,500 cost = $1,851.24 net

Output:
  point_cost:           $4,500
  monthly_savings:      $75.61
  breakeven_months:     60
  recommendation:       JUSTIFIED (tenure 84 mo > breakeven 60 mo)
  net_gain_over_tenure: $1,851

MATH-RECAPTURE-001 — Recapture Period (Refinance)

Purpose: Calculate how long it takes to recover refinance closing costs from monthly savings.

Formula:


monthly_savings = old_payment - new_payment
recapture_months = total_closing_costs / monthly_savings  (round UP)
net_savings_at_year_N = (monthly_savings × tenure_months) - closing_costs

Required Inputs:


old_payment:          decimal
new_payment:          decimal
total_closing_costs:  decimal
expected_tenure_months: integer

Worked Example:


Old payment: $2,847 | New payment: $2,528 | Closing costs: $6,400 | Staying 7 years

Monthly savings: $2,847 - $2,528 = $319/month
Recapture: $6,400 / $319 = 20.1 → 21 months (1 year 9 months)
Net at 7 years: ($319 × 84) - $6,400 = $26,796 - $6,400 = $20,396 net savings

Output:
  monthly_savings:      $319
  recapture_months:     21
  recapture_date:       "approximately 1 year 9 months"
  net_7yr_savings:      $20,396
  recommendation:       "Strong case for refinance — recoups costs in under 2 years"

MATH-DELTA-001 — Payment Delta

Purpose: Compare two scenarios and quantify the monthly and lifetime economic difference.

Formula:


monthly_delta = scenario_a_payment - scenario_b_payment
annual_delta = monthly_delta × 12
lifetime_interest_a = total_paid_a - loan_amount_a
lifetime_interest_b = total_paid_b - loan_amount_b
lifetime_interest_delta = lifetime_interest_a - lifetime_interest_b

Use Cases:

MATH-CASHOUT-001 — Cash-Out Available

Purpose: Calculate available cash-out given LTV limits.

Formula:


max_new_loan = property_value × max_ltv_pct
available_cashout = max_new_loan - current_balance - estimated_closing_costs

LTV Caps by Program:


Conventional cash-out:    80% LTV (standard)
FHA cash-out:             80% LTV
VA cash-out Type II:      90% LTV (lender-specific, may vary)
DSCR cash-out:            75% LTV (typical — lender overlay applies)

Worked Example:


Inputs: property_value = $620,000 | current_balance = $391,400
        program = conventional | closing_costs = $8,200

Step 1: max_new_loan = $620,000 × 0.80 = $496,000
Step 2: available_cashout = $496,000 - $391,400 - $8,200 = $96,400

Output:
  max_new_loan:        $496,000
  available_cashout:   $96,400
  new_ltv_at_max:      80.00%
  new_payment_at_max:  [run MATH-PMT-001 with $496,000]

MATH-RESERVES-001 — Reserves Calculator

Purpose: Compute required and available post-closing reserves.

Reserve Requirement Rules:


Conventional (primary, 1-unit):     0-2 months PITI (DU/LP determines)
Conventional (investment):          6 months PITI
FHA (standard):                     0 months (no minimum)
VA:                                 0 months (no minimum)
DSCR:                               6-12 months PITIA (lender-specific)

Asset counting for reserves:
  Checking / savings:          100% of balance
  Money market / CDs:          100%
  Vested 401(k) / IRA:         60% of balance
  Stocks / mutual funds:       70% of balance
  Crypto:                      50% of balance (if seasoned 60+ days)
  Gift funds:                  NOT eligible for reserves
  Funds needed for closing:    SUBTRACT first

Worked Example:


Borrower assets: Checking $18,000 | 401(k) $95,000 | Closing costs needed $14,500
PITI: $2,847/month | Required: 2 months

Available reserves:
  Checking (post-closing): $18,000 - $14,500 = $3,500
  401(k): $95,000 × 0.60 = $57,000
  Total eligible: $60,500

Required reserves: 2 × $2,847 = $5,694
Reserve surplus: $60,500 - $5,694 = $54,806 → PASS (strong reserves)

MATH-UTIL-001 — Credit Utilization

Purpose: Calculate utilization per card and overall, and model score improvement from paydown.

Formula:


card_utilization = card_balance / card_limit
overall_utilization = sum(all_balances) / sum(all_limits)

Score improvement estimates (guidelines, not guarantees):
  Per-card utilization: >90% → 30%:   +35–55 points
  Per-card utilization: >30% → 30%:   +20–40 points
  Per-card utilization: 30% → 10%:    +10–20 points additional
  Per-card utilization: 10% → 0%:     +5–15 points additional

Worked Example:


Cards:
  Discover:  $4,200 balance / $4,200 limit = 100% utilization
  Chase:     $1,800 balance / $6,000 limit = 30% utilization
  AMEX:      $0 balance / $8,000 limit = 0% utilization

Overall: $6,000 / $18,200 = 33.0%

Paydown to reach 30% per-card:
  Discover: Need $4,200 × 0.30 = $1,260 target. Pay down $2,940.
  Chase:    Already at 30%. No action needed.

Post-paydown utilization:
  Discover: 30% | Chase: 30% | AMEX: 0%
  Overall: $3,060 / $18,200 = 16.8%

Projected score improvement: +28–40 points (Discover paydown, 100%→30%)
Cash required: $2,940

MATH-DSCR-001 — Debt Service Coverage Ratio

Purpose: Compute DSCR for investment property / non-QM qualification.

Formula:


monthly_gross_rent:    from lease or market rent appraisal
monthly_pitia:         P&I + tax + insurance + HOA (no PMI for DSCR — typically 20%+ down)

DSCR = monthly_gross_rent / monthly_pitia

DSCR Tier Interpretation:


DSCR >= 1.25:   Strong — most DSCR lenders approve without conditions
DSCR 1.20–1.24: Good — approval with standard DSCR program
DSCR 1.10–1.19: Acceptable — some lenders require larger reserve
DSCR 1.00–1.09: Break-even — lender-dependent, typically 25–30% down required
DSCR 0.75–0.99: Negative cashflow — select lenders only, higher rate
DSCR < 0.75:    Typically ineligible for DSCR program

Worked Example:


Inputs: purchase = $375,000 | down = 25% ($93,750) | rate = 7.875% | term = 30yr
        monthly_rent = $2,650 | tax = $420/mo | insurance = $130/mo | HOA = $0

Step 1: loan_amount = $375,000 - $93,750 = $281,250
Step 2: P&I = PMT($281,250, 7.875%, 360) = $2,033.91
Step 3: PITIA = $2,033.91 + $420 + $130 + $0 = $2,583.91
Step 4: DSCR = $2,650 / $2,583.91 = 1.026

Output:
  dscr:           1.03
  tier:           Break-even
  monthly_cashflow: $2,650 - $2,583.91 = $66.09
  recommendation: "Marginal DSCR. Most programs require 1.20+. Suggest 30% down or higher
                   rent property. At 30% down: loan $262,500, PITIA $2,440, DSCR = 1.09."

MATH-CASHTOCLOSE-001 — Cash-to-Close Stack

Purpose: Compute the complete cash-to-close requirement from all components.

Components:


down_payment:                   purchase_price × down_payment_pct
origination_fee:                typically 0.5–1.0% of loan
title_and_escrow:               $1,500–$3,500 (property-value dependent)
appraisal:                      $500–$800 (SFR standard)
credit_report:                  $50–$75
prepaid_interest:               P&I × days_to_month_end
prepaid_hazard_insurance:       typically 14 months upfront
escrow_setup_property_tax:      2–6 months depending on close date
upfront_mip_or_funding_fee:     program-specific (if not financed)
other_fees:                     (recording, transfer tax, survey, etc.)

LESS:
  seller_concessions:           negotiated amount (program caps apply)
  lender_credits:               from rate adjustment
  dpa_grants:                   applied grants
  earnest_money_applied:        deposit already paid

Worked Example:


$450,000 purchase | 5% down | Conventional | Seller credit $9,000

Down payment:         $22,500  (5% of $450,000)
Loan amount:          $427,500
Origination (0.75%):  $3,206
Title/escrow:         $2,800
Appraisal:            $650
Credit report:        $60
Prepaid interest:     $760  (15 days × $50.68/day)
Insurance (14 mo):    $2,100
Tax escrow (3 mo):    $1,800
Total gross:          $33,876

Less seller credit:  -$9,000
Net cash to close:    $24,876

Output:
  gross_cash_required:   $33,876
  credits_applied:       $9,000
  net_cash_to_close:     $24,876
  as_pct_of_purchase:    5.5%

MATH-MIP-001 — FHA MIP (Upfront + Annual)

Purpose: Calculate both FHA mortgage insurance components.

Rules (current FHA schedule):


UPFRONT MIP:
  All FHA loans: 1.75% of base loan amount
  Can be financed into loan

ANNUAL MIP (converted to monthly):
  LTV > 90%, term > 15yr:    0.55% annually → divide by 12
  LTV ≤ 90%, term > 15yr:    0.50% annually → divide by 12
  LTV > 78%, term ≤ 15yr:    0.15% annually
  LTV ≤ 78%, term ≤ 15yr:    0.00% (no MIP)

MIP CANCELLATION:
  LTV > 90% at origination:   Life of loan (never cancels)
  LTV ≤ 90% at origination:   Cancels after 11 years
  → This is the core argument for switching to conventional once score allows.

Worked Example:


Inputs: loan = $320,000 | LTV = 96.5% | term = 30yr

Upfront MIP: $320,000 × 0.0175 = $5,600 (add to loan if financed)
Annual MIP: $320,000 × 0.0055 = $1,760/yr → $146.67/month
Total loan if financed: $325,600

MIP cancellation: NEVER (LTV > 90%)
Conventional switch point: When score/equity reaches conventional threshold
  → Run MATH-DELTA-001 comparing FHA with permanent MIP vs. conventional with PMI

MATH-MI-001 — Conventional PMI Estimate

Purpose: Estimate monthly PMI cost for conventional loans with LTV > 80%.

PMI Rate Matrix (estimated — actual rates are lender/insurer specific):


Credit Score  |  LTV 80–85%  |  LTV 85–90%  |  LTV 90–95%  |  LTV 95–97%
760+          |    0.19%      |    0.26%      |    0.36%      |    0.46%
740–759       |    0.23%      |    0.32%      |    0.43%      |    0.54%
720–739       |    0.31%      |    0.41%      |    0.55%      |    0.65%
700–719       |    0.44%      |    0.57%      |    0.71%      |    0.83%
680–699       |    0.56%      |    0.72%      |    0.88%      |    1.05%
660–679       |    0.77%      |    0.95%      |    1.16%      |    1.37%

Cancellation:


Borrower-requested cancellation:  LTV reaches 80% (based on original schedule or appraisal)
Automatic cancellation:            LTV reaches 78% on original schedule

Worked Example:


Inputs: loan = $427,500 | property = $450,000 | LTV = 95% | score = 720

PMI rate: 0.55% (score 720-739, LTV 90-95%)
Monthly PMI: $427,500 × 0.0055 / 12 = $1,951.88 / 12 = $195.83/month

Cancellation at 80% LTV:
  Target balance: $450,000 × 0.80 = $360,000
  Run MATH-AMORT-001 to find month LTV hits 80%

COMBINED SCENARIO EXAMPLE

Scenario: Borrower considering refinance. Current loan $391,400 at 7.25% / 27 years remaining.

New rate available: 5.75% / 30 years. Closing costs: $6,400.


Step 1 — MATH-PMT-001 (current loan):
  PMT($391,400, 7.25%, 27yr) = $2,758.34/month

Step 2 — MATH-PMT-001 (new loan):
  PMT($391,400, 5.75%, 30yr) = $2,284.39/month

Step 3 — MATH-DELTA-001:
  Monthly savings = $2,758.34 - $2,284.39 = $473.95/month

Step 4 — MATH-RECAPTURE-001:
  Recapture = $6,400 / $473.95 = 13.5 → 14 months

Step 5 — Lifetime analysis:
  Current: 324 payments × $2,758.34 = $893,702 remaining
  New:     360 payments × $2,284.39 = $822,380 total
  Net savings (30yr horizon): $893,702 - $822,380 - $6,400 = $64,922

Step 6 — MATH-NPER-001 (keep same payment):
  If borrower keeps $2,758.34 payment at 5.75%:
  NPER = 253 months (21 years 1 month)
  Payoff acceleration: 360 - 253 = 107 months earlier
  Total interest savings vs. full 30yr: $270,000+ (run full MATH-AMORT-001)

OUTPUT FORMAT

For every computation, present in this structure:


CLARITY ENGINE — MATH COMPUTATION
Function: [MATH-XXX-001]
Date: [Date]

INPUTS:
  [labeled list of all inputs with values]

COMPUTATION:
  Step 1: [formula + numbers]
  Step 2: [formula + numbers]
  ...
  Final: [result with rounding applied]

OUTPUT:
  [primary result]
  [supporting values]
  [flags or threshold notes]

LINEAGE RECORD:
  formula_id:      [MATH-XXX-001]
  input_hash:      [deterministic hash of inputs]
  rounding_policy: [policy applied]
  version:         1.0

NOVA EXPLANATION:
  "[plain language translation for borrower or advisor]"

IMPLEMENTATION GUARDRAILS

ProhibitedReason
Rounding intermediate valuesAccumulates error across multi-step computations
Using annual rate directly in PMT formula without dividing by 12Produces wrong payment
Mixing gross and net income in same DTI and residual computationViolates VA rules; also incorrect for other programs
Applying FHA MIP rates to VA loansNo MIP on VA — funding fee is different mechanism
Using conventional DTI hard stop for VAVA DTI 41% is a benchmark, not a hard gate
Computing DSCR using personal incomeDSCR qualification uses property cash flow only
Applying 100% of retirement assets as reservesStandard is 60% of vested balance
Treating LTV=80% as PMI cancellation trigger for FHAFHA MIP does not cancel at 80% LTV
Computing seller concession cap on full closing costs for VA4% cap applies to concessions only

SCOPE BOUNDARIES

This skill DOES:

This skill DOES NOT: