(636) 898-0888 Toll Free: (877) 456-2900
import { useState, useEffect, useCallback } from "react"; const formatCurrency = (val) => new Intl.NumberFormat("en-US", { style: "currency", currency: "USD", maximumFractionDigits: 0 }).format(val); const formatNumber = (val) => new Intl.NumberFormat("en-US", { maximumFractionDigits: 0 }).format(val); const CREDIT_RATES = { "760+": 6.5, "720-759": 6.875, "680-719": 7.125, "640-679": 7.5, "580-639": 8.0, }; const COUNTY_TAXES = { "Los Angeles, CA": 1.19, "Cook County, IL": 2.1, "Harris County, TX": 2.0, "Maricopa, AZ": 0.63, "King County, WA": 0.93, "Miami-Dade, FL": 0.97, "Denver, CO": 0.54, "New York, NY": 1.72, "Travis County, TX": 1.8, "Fulton County, GA": 1.02, }; const INSURANCE_RATE = 0.005; const PMI_RATE = 0.008; function calculate({ income, debts, downPayment, creditScore, county, extraSavings = 0 }) { const rate = CREDIT_RATES[creditScore] / 100 / 12; const taxRate = (COUNTY_TAXES[county] || 1.1) / 100; const dp = downPayment + extraSavings; const maxFrontEnd = income * 0.28; const maxBackEnd = income * 0.43 - debts; const maxMonthly = Math.min(maxFrontEnd, maxBackEnd); if (maxMonthly <= 0) return null; const estimatePriceFromMonthly = (monthly) => { let lo = 50000, hi = 2000000; for (let i = 0; i < 60; i++) { const mid = (lo + hi) / 2; const loanAmt = mid - dp; if (loanAmt <= 0) { hi = mid; continue; } const n = 360; const pmt = loanAmt * (rate * Math.pow(1 + rate, n)) / (Math.pow(1 + rate, n) - 1); const tax = (mid * taxRate) / 12; const ins = (mid * INSURANCE_RATE) / 12; const pmi = loanAmt / mid > 0.8 ? (loanAmt * PMI_RATE) / 12 : 0; const total = pmt + tax + ins + pmi; if (total < monthly) lo = mid; else hi = mid; } return Math.round((lo + hi) / 2); }; const price = estimatePriceFromMonthly(maxMonthly); const loanAmt = Math.max(0, price - dp); const n = 360; const pmt = loanAmt > 0 ? loanAmt * (rate * Math.pow(1 + rate, n)) / (Math.pow(1 + rate, n) - 1) : 0; const tax = (price * taxRate) / 12; const ins = (price * INSURANCE_RATE) / 12; const pmi = loanAmt / price > 0.8 ? (loanAmt * PMI_RATE) / 12 : 0; const totalPITI = pmt + tax + ins + pmi; const dti = ((debts + totalPITI) / income) * 100; const ltv = (loanAmt / price) * 100; return { price, loanAmt, pmt, tax, ins, pmi, totalPITI, dti, ltv, dp }; } function Slider({ label, min, max, step, value, onChange, prefix = "", suffix = "" }) { const pct = ((value - min) / (max - min)) * 100; return (
); } function DTIBar({ dti }) { const capped = Math.min(dti, 60); const color = dti < 28 ? "#4a9e6b" : dti < 36 ? "#c4922a" : dti < 43 ? "#e07b2a" : "#c0392b"; return (
Know your number before you fall in love with a house
Based on your {formatCurrency(income * 12)}/year gross income and {formatCurrency(downPayment)} down payment, you could afford a home up to {formatCurrency(result.price)}.
Your total monthly payment of {formatCurrency(result.totalPITI)} includes your mortgage, property taxes, insurance{result.pmi > 0 ? ", and PMI" : ""}. Your debt-to-income ratio is {dtiOnly.toFixed(1)}% — {dtiOnly < 36 ? "you're in solid shape to qualify with most lenders." : dtiOnly < 43 ? "you're near the upper limit most lenders accept." : "this may be challenging; consider paying down debts first."}
{result.ltv > 80 && (💡 Pro tip: Saving {formatCurrency(result.price * 0.2 - result.dp)} more would bring you to a 20% down payment, eliminating the {formatCurrency(result.pmi)}/mo PMI charge and saving you {formatCurrency(result.pmi * 360)} over 30 years.
)}See how additional savings unlock more home
{[ { label: "Current", extra: 0, r: result, accent: "#8b7355" }, { label: "+ $5,000", extra: 5000, r: result5k, accent: "#c4922a" }, { label: "+ $10,000", extra: 10000, r: result10k, accent: "#4a9e6b" }, ].map(({ label, extra, r, accent }) => r && (Saving an extra $5,000 could unlock an additional {formatCurrency(result5k.price - result.price)} in purchasing power.
)} {result10k && (Saving an extra $10,000 could unlock an additional {formatCurrency(result10k.price - result.price)} in purchasing power — and may even eliminate PMI.
)}Head to the Calculator tab and tap "Save This Scenario" to track your numbers over time.
Your last {savedScenarios.length} saved scenario{savedScenarios.length > 1 ? "s" : ""}
{savedScenarios.map((s, i) => (16647 Chesterfield Grove Rd
Suite 115
Chesterfield, MO 63005
Phone: (636) 898-0888
Fax: (636) 898-3701
Toll Free: (877) 456-2900
| Equal Housing Lender © Frontier Financial, Inc. dba Frontier Mortgage. |
All Rights reserved. Rates and Terms Subject to Change without notice. Currently licensed in: Florida, Illinois, Iowa, Missouri, Nebraska & Texas Florida Mortgage Lender License # MLD1564 Illinois License: MB.0006528 Iowa Mortgage Banker License # 2018-0013 Nebraska Mortgage Banker License Date: 03/21/2018 Texas Mortgage Banker Registration Date: 06/04/2010 Consumers wishing to file a complaint against a mortgage company or a licensed residential mortgage loan originator should complete and send a complaint form to the Texas Department of Savings and Mortgage Lending, 2601 North Lamar, Suite 201, Austin, Texas 78705. Complaint forms and instructions may be obtained from the department’s website at www.sml.texas.gov. A toll-free consumer hotline is available at 1-877-276-5550. The department maintains a recovery fund to make payments of certain actual out of pocket damages sustained by borrowers caused by acts of licensed mortgage company residential mortgage loan originators. A written application for reimbursement from the recovery fund must be filed with and investigated by the department prior to the payment of a claim. For more information about the recovery fund, please consult the department’s web site at www.sml.texas.gov. NMLS# 12182 |
