Closing Cost Calculator Formula
Understand the math behind the closing cost calculator. Each variable explained with a worked example.
Formulas Used
Total Closing Costs
total_closing_costs = lender_fees + title_and_gov + prepaidsClosing Costs as % of Price
closing_cost_pct = (lender_fees + title_and_gov + prepaids) / home_price * 100Total Lender Fees
lender_fees_total = lender_feesTitle & Government Fees
title_gov_total = title_and_govTotal Prepaids / Escrow
prepaids_total = prepaidsVariables
| Variable | Description | Default |
|---|---|---|
home_price | Home Purchase Price(USD) | 350000 |
loan_amount | Loan Amount(USD) | 280000 |
origination_fee_pct | Loan Origination Fee(%) | 1 |
appraisal_fee | Appraisal Fee(USD) | 500 |
title_insurance | Title Insurance(USD) | 1500 |
attorney_fee | Attorney / Settlement Fee(USD) | 800 |
recording_fee | Recording Fee(USD) | 200 |
prepaid_taxes_months | Prepaid Property Tax (months) | 3 |
monthly_tax | Monthly Property Tax(USD) | 350 |
prepaid_insurance_months | Prepaid Insurance (months) | 14 |
monthly_insurance | Monthly Homeowner Insurance(USD) | 125 |
origination_fee | Derived value= loan_amount * origination_fee_pct / 100 | calculated |
prepaid_taxes | Derived value= prepaid_taxes_months * monthly_tax | calculated |
prepaid_insurance | Derived value= prepaid_insurance_months * monthly_insurance | calculated |
lender_fees | Derived value= origination_fee + appraisal_fee | calculated |
title_and_gov | Derived value= title_insurance + attorney_fee + recording_fee | calculated |
prepaids | Derived value= prepaid_taxes + prepaid_insurance | calculated |
How It Works
Understanding Closing Costs
Closing costs are fees and expenses paid at settlement when a real estate transaction is finalized. They typically range from 2% to 5% of the home purchase price.
Major Categories
Who Pays What
Buyers typically pay lender fees, prepaids, and a portion of title costs. Sellers often cover agent commissions and transfer taxes, though everything is negotiable.
Worked Example
A $350,000 home with a $280,000 loan. Origination fee 1%, appraisal $500, title insurance $1,500, attorney $800, recording $200, 3 months tax at $350/mo, 14 months insurance at $125/mo.
home_price = 350000loan_amount = 280000origination_fee_pct = 1appraisal_fee = 500title_insurance = 1500attorney_fee = 800recording_fee = 200prepaid_taxes_months = 3monthly_tax = 350prepaid_insurance_months = 14monthly_insurance = 125
- 01Origination fee: $280,000 x 1% = $2,800
- 02Lender fees: $2,800 + $500 = $3,300
- 03Title & government: $1,500 + $800 + $200 = $2,500
- 04Prepaid taxes: 3 x $350 = $1,050
- 05Prepaid insurance: 14 x $125 = $1,750
- 06Total prepaids: $1,050 + $1,750 = $2,800
- 07Total closing costs: $3,300 + $2,500 + $2,800 = $8,600
- 08As percentage of price: $8,600 / $350,000 = 2.46%
Ready to run the numbers?
Open Closing Cost Calculator