function calculateAppraisal() {
// Get input values using var
var priceInput = document.getElementById('contractPrice');
var appraisalInput = document.getElementById('appraisedValue');
var downPaymentInput = document.getElementById('downPaymentPercent');
var closingCostInput = document.getElementById('closingCostEst');
var price = parseFloat(priceInput.value);
var appraisal = parseFloat(appraisalInput.value);
var downPercent = parseFloat(downPaymentInput.value);
var closingPercent = parseFloat(closingCostInput.value);
// Validation
if (isNaN(price) || isNaN(appraisal) || price <= 0 || appraisal = Price: Cash = DownPayment (on Price) + Closing Costs
// If Appraisal 0) {
// Low Appraisal Scenario
cashShortfall = gap; // Buyer often has to pay the difference out of pocket
totalCashNeeded = baseDownPayment + gap + closingCostsAmount;
} else {
// Appraisal matches or exceeds price
cashShortfall = 0;
totalCashNeeded = (price * (downPercent / 100)) + closingCostsAmount;
// Recalculate max loan based on price since appraisal is higher/equal
maxLoan = price * (loanToValueRatio / 100);
}
// Formatting currency
var formatter = new Intl.NumberFormat('en-US', {
style: 'currency',
currency: 'USD',
minimumFractionDigits: 0,
maximumFractionDigits: 0,
});
// Display Results
document.getElementById('resultsSection').style.display = 'block';
document.getElementById('resRate').innerHTML = rate.toFixed(2) + '%';
document.getElementById('resGap').innerHTML = (gap > 0) ? "-" + formatter.format(gap) + " (Under)" : "+" + formatter.format(Math.abs(gap)) + " (Over)";
if (gap > 0) {
document.getElementById('resGap').className = 'result-value warning-value';
document.getElementById('resShortfall').innerHTML = formatter.format(cashShortfall);
document.getElementById('statusMessage').innerHTML = "Alert: Low Appraisal. The property appraised for less than the contract price. This creates an 'Appraisal Gap'. Lenders will generally calculate your LTV based on the lower appraised value, not your offer price. You may need to cover the gap in cash.";
} else {
document.getElementById('resGap').className = 'result-value highlight-value';
document.getElementById('resShortfall').innerHTML = "$0";
document.getElementById('resShortfall').className = 'result-value highlight-value';
document.getElementById('statusMessage').innerHTML = "Success: Sufficient Appraisal. The property appraised at or above the contract price. Your loan-to-value ratio will be based on the purchase price, and no appraisal gap coverage is required.";
}
document.getElementById('resMaxLoan').innerHTML = formatter.format(maxLoan);
document.getElementById('resTotalCash').innerHTML = formatter.format(totalCashNeeded);
}
Understanding Appraisal Rates and Gaps
In real estate transactions, the Appraisal Rate (or Appraisal-to-Value Ratio) is a critical metric that determines whether a mortgage lender will finance a property at the agreed-upon contract price. This calculator helps homebuyers and investors quantify the difference between market offers and appraised values.
What is the Appraisal Rate?
The Appraisal Rate represents the percentage of the contract price that the professional appraiser validates as the true market value. It is calculated using the formula:
100% or higher: The home appraised at or above the selling price. This is the ideal scenario.
Below 100%: The home appraised for less than the selling price, creating an "Appraisal Gap."
The Impact of an Appraisal Gap
When the appraisal comes in lower than the purchase price, lenders change how they calculate the Loan-to-Value (LTV) ratio. Mortgage lenders almost universally use the lesser of the Purchase Price or the Appraised Value to determine the maximum loan amount.
If you encounter an appraisal gap, you typically have three options:
Pay the Difference: Bring extra cash to the closing table to cover the shortfall (calculated in the tool above).
Renegotiate: Ask the seller to lower the contract price to match the appraised value.
Dispute or Walk Away: Challenge the appraisal with new data or cancel the contract if you have an appraisal contingency.
Example Calculation
Imagine you offer $500,000 for a home, but the appraiser values it at $480,000.
Appraisal Rate: 96% ($480k / $500k)
Appraisal Gap: $20,000
Loan Impact: If you planned a 20% down payment, the bank will base the loan on $480,000, not $500,000. You would need to cover the $20,000 gap in cash on top of your standard closing costs.