Wholesale – Novations – Buy & Lists Calculator
function calculateResults() {
// Get input values
const sellerPrice = parseFloat(document.getElementById(‘sellerPrice’).value) || 0;
const arv = parseFloat(document.getElementById(‘arv’).value);
const ccrv = parseFloat(document.getElementById(‘ccrv’).value);
const arvPercent = parseFloat(document.getElementById(‘arvPercent’).value) / 100;
const wholesaleProfit = parseFloat(document.getElementById(‘wholesaleProfit’).value);
const wholesaleRepairs = parseFloat(document.getElementById(‘wholesaleRepairs’).value);
const novationRepairs = parseFloat(document.getElementById(‘novationRepairs’).value);
const profitPercent = parseFloat(document.getElementById(‘profitPercent’).value) / 100;
// Wholesale Calculations
const mao = arv * arvPercent – wholesaleRepairs;
const wholesaleOfferPrice = mao – wholesaleProfit;
// Show wholesale results
document.getElementById(‘mao’).innerHTML = `MAO: $${mao.toFixed(2)}`;
document.getElementById(‘wholesalePotential’).innerHTML = `Potential Profit: $${wholesaleProfit.toFixed(2)}`;
document.getElementById(‘wholesaleOffer’).innerHTML = `Seller Offer Price: $${wholesaleOfferPrice.toFixed(2)}`;
// Handle seller price difference for Wholesale
if (sellerPrice > 0 && wholesaleOfferPrice < sellerPrice) {
const difference = sellerPrice – wholesaleOfferPrice;
document.getElementById('wholesaleDifference').style.display = 'block';
document.getElementById('wholesaleDifference').innerHTML = `Difference: $${difference.toFixed(2)}`;
const agreedProfit = mao – sellerPrice;
document.getElementById('wholesaleAgreedProfit').style.display = 'block';
document.getElementById('wholesaleAgreedProfit').innerHTML = `Potential Profit If We Agree to Sellers Price: $${agreedProfit.toFixed(2)}`;
}
// Novation Calculations
const novationListPrice = ccrv;
const novationClosingCosts = ccrv * 0.07;
const novationPotentialProfit = (ccrv – novationClosingCosts) * profitPercent – novationRepairs;
const novationOfferPrice = ccrv – novationPotentialProfit – novationRepairs – novationClosingCosts;
// Show Novation results
document.getElementById(‘novationListPrice’).innerHTML = `List Price: $${novationListPrice.toFixed(2)}`;
document.getElementById(‘novationClosingCosts’).innerHTML = `Closing Costs: $${novationClosingCosts.toFixed(2)}`;
document.getElementById(‘novationRepairsResult’).innerHTML = `Repairs: $${novationRepairs.toFixed(2)}`;
document.getElementById(‘novationPotentialProfit’).innerHTML = `Potential Profit: $${novationPotentialProfit.toFixed(2)}`;
document.getElementById(‘novationOfferPrice’).innerHTML = `Seller Offer Price: $${novationOfferPrice.toFixed(2)}`;
// Handle seller price difference for Novation
if (sellerPrice > 0 && novationOfferPrice < sellerPrice) {
const difference = sellerPrice – novationOfferPrice;
document.getElementById('novationDifference').style.display = 'block';
document.getElementById('novationDifference').innerHTML = `Difference: $${difference.toFixed(2)}`;
const agreedProfit = sellerPrice – novationOfferPrice – novationPotentialProfit;
document.getElementById('novationAgreedProfit').style.display = 'block';
document.getElementById('novationAgreedProfit').innerHTML = `Potential Profit If We Agree to Sellers Price: $${agreedProfit.toFixed(2)}`;
}
// Buy & List Calculations
const buyListListPrice = ccrv;
const buyListClosingCosts = ccrv * 0.11;
const buyListPotentialProfit = (ccrv – buyListClosingCosts) * profitPercent – novationRepairs;
const buyListOfferPrice = ccrv – buyListPotentialProfit – novationRepairs – buyListClosingCosts;
// Show Buy & List results
document.getElementById(‘buyListListPrice’).innerHTML = `List Price: $${buyListListPrice.toFixed(2)}`;
document.getElementById(‘buyListClosingCosts’).innerHTML = `Closing Costs: $${buyListClosingCosts.toFixed(2)}`;
document.getElementById(‘buyListRepairs’).innerHTML = `Repairs: $${novationRepairs.toFixed(2)}`;
document.getElementById(‘buyListPotentialProfit’).innerHTML = `Potential Profit: $${buyListPotentialProfit.toFixed(2)}`;
document.getElementById(‘buyListOfferPrice’).innerHTML = `Seller Offer Price: $${buyListOfferPrice.toFixed(2)}`;
// Handle seller price difference for Buy & List
if (sellerPrice > 0 && buyListOfferPrice < sellerPrice) {
const difference = sellerPrice – buyListOfferPrice;
document.getElementById('buyListDifference').style.display = 'block';
document.getElementById('buyListDifference').innerHTML = `Difference: $${difference.toFixed(2)}`;
const agreedProfit = sellerPrice – buyListOfferPrice – buyListPotentialProfit;
document.getElementById('buyListAgreedProfit').style.display = 'block';
document.getElementById('buyListAgreedProfit').innerHTML = `Potential Profit If We Agree to Sellers Price: $${agreedProfit.toFixed(2)}`;
}
// Best Exit Strategy Calculation
const profits = {
Wholesale: wholesaleProfit,
Novation: novationPotentialProfit,
BuyList: buyListPotentialProfit
};
const bestExit = Object.keys(profits).reduce((a, b) => profits[a] > profits[b] ? a : b);
document.getElementById(‘bestExitStrategy’).innerHTML = `The best exit strategy for this deal is a ${bestExit} with a profit of $${profits[bestExit].toFixed(2)}.`;
// Show all result sections
document.querySelectorAll(‘.result-section’).forEach(el => el.style.display = ‘block’);
}