Home Flipping Profitability Calculator
Property Acquisition Costs
Renovation Costs
Monthly Holding Costs
Sale Projection
Financing for Flip (Optional)
Enter details if you're using financing for the purchase or renovation. These costs will be factored into total project costs and profitability.
Profitability Summary
Please fill in the details in previous tabs and click "Next" or "Calculate" to see the summary.
Please calculate the results first before downloading the PDF.
'; modalContainer.appendChild(modalContent); document.body.appendChild(modalContainer); modalContent.querySelector('button').onclick = () => { document.body.removeChild(modalContainer); }; return; } const { jsPDF } = window.jspdf; const doc = new jsPDF(); const res = window.currentFlipResultsForPdf; doc.setFontSize(18); doc.setTextColor(59, 130, 246); // Blue doc.text("Home Flipping Profitability Summary", 105, 20, null, null, "center"); doc.setFontSize(10); doc.setTextColor(0,0,0); // Black doc.text(`Date: ${new Date().toLocaleDateString()}`, 105, 28, null, null, "center"); let yPos = 40; const lineSpacing = 7; const sectionSpacing = 9; const indent = 15; const valueCol = 120; // X position for right-aligned values const sectionTitleColor = [31, 41, 55]; // gray-800 const addSectionTitle = (title) => { if (yPos > 260) { doc.addPage(); yPos = 20; } doc.setFontSize(14); doc.setFont(undefined, 'bold'); doc.setTextColor(sectionTitleColor[0], sectionTitleColor[1], sectionTitleColor[2]); doc.text(title, indent, yPos); yPos += lineSpacing * 1.5; doc.setFont(undefined, 'normal'); doc.setFontSize(10); doc.setTextColor(0,0,0); }; const addItem = (label, value, isCurrency = true, isPercent = false) => { if (yPos > 275) { doc.addPage(); yPos = 20; } doc.text(label, indent + 5, yPos); let valText = isCurrency ? formatCurrency(value) : (isPercent ? formatPercentage(value) : value.toString()); doc.text(valText, valueCol, yPos, {align: 'right'}); yPos += lineSpacing; }; const addBoldItem = (label, value, isCurrency = true, isPercent = false) => { if (yPos > 275) { doc.addPage(); yPos = 20; } doc.setFont(undefined, 'bold'); addItem(label, value, isCurrency, isPercent); doc.setFont(undefined, 'normal'); }; const addSeparator = () => { if (yPos > 270) { doc.addPage(); yPos = 20; } doc.setLineWidth(0.2); doc.line(indent + 5, yPos - 3, valueCol, yPos - 3); // separator yPos += lineSpacing / 2; } // Acquisition Costs addSectionTitle("Acquisition Costs"); addItem("Property Purchase Price:", res.purchasePrice); addItem("Buyer Closing Costs:", res.buyerClosingCosts); addSeparator(); addBoldItem("Total Acquisition Cost:", res.totalAcquisitionCost); yPos += sectionSpacing; // Renovation Costs addSectionTitle("Renovation Costs"); addItem("Materials Budget:", res.materialsBudget); addItem("Labor Budget:", res.laborBudget); addItem("Permit Costs:", res.permitCosts); addItem(`Contingency (${formatPercentage(res.renoContingencyPercent)}):`, res.renoContingencyAmount); addSeparator(); addBoldItem("Total Renovation Cost:", res.totalRenovationCost); yPos += sectionSpacing; // Holding Costs addSectionTitle("Holding Costs"); addItem("Total Monthly Holding Costs:", res.totalMonthlyHoldingCosts); addItem("Holding Period (Months):", res.holdingPeriod, false, false); addSeparator(); addBoldItem("Total Holding Costs for Period:", res.totalHoldingCostsOverPeriod); yPos += sectionSpacing; // Financing Costs if (res.flipLoanAmount > 0 || res.totalFinancingCosts > 0) { addSectionTitle("Financing Costs"); if (res.flipLoanAmount > 0) addItem("Loan Amount for Flip:", res.flipLoanAmount); if (res.flipAnnualInterestRate > 0) addItem("Annual Interest Rate:", res.flipAnnualInterestRate, false, true); addItem(`Interest for Period (${res.holdingPeriod} mo):`, res.totalInterestForPeriod); addItem("Loan Origination/Points:", res.flipLoanOrigination); addItem("Other Financing Costs:", res.otherFinancingCosts); addSeparator(); addBoldItem("Total Financing Costs:", res.totalFinancingCosts); yPos += sectionSpacing; } // Total Project Cost addSectionTitle("Total Project Cost"); addBoldItem("Total Estimated Project Cost:", res.totalProjectCost); yPos += sectionSpacing; // Sale Projection if (yPos > 200) { doc.addPage(); yPos = 20; } // Check for page break before this large section addSectionTitle("Sale Projection & Profit"); addItem("After Repair Value (ARV):", res.arv); addSeparator(); addItem("Seller Closing Costs (Excl. Commission):", res.sellerClosingCosts); addItem(`Agent Commission (${formatPercentage(res.agentCommissionPercent)} of ARV):`, res.agentCommissionAmount); addBoldItem("Total Selling Costs:", res.totalSellingCosts); addSeparator(); addBoldItem("Net Sale Proceeds (ARV - Selling Costs):", res.netSaleProceeds); yPos += lineSpacing / 2; doc.setLineWidth(0.4); doc.line(indent, yPos, valueCol + 5, yPos); // Thicker separator yPos += lineSpacing; addBoldItem("Estimated Net Profit:", res.finalNetProfit); yPos += sectionSpacing; // Key Metrics addSectionTitle("Key Profitability Metrics"); addBoldItem("Return on Investment (ROI on Total Project Cost):", res.returnOnInvestment, false, true); addBoldItem("Profit Margin (Net Profit / ARV):", res.profitMargin, false, true); doc.save("HomeFlip_Profitability_Summary.pdf"); }); } updateTabs(); // Initialize first tab });