Profitability & Business Model Viability Assessment

Profitability & Business Model Viability Assessment

Enter Business Data

Provide financial data for the current and previous fiscal years, and key operational metrics.

1. Financial Performance Data ($)

Current Fiscal Year

Previous Fiscal Year (for trend analysis)

2. Business Model & Efficiency Data

Customer Acquisition & Retention (Current Year)

Cost Structure & Pricing (Current Year)

Market & Competitive Landscape

Estimate the total revenue potential of your target market.

How easily can the business grow without proportionally increasing costs?

The business has potential, but key areas need strategic focus to enhance profitability and viability.

'; } else if (strengths.length > 0 && areasForImprovement.length === 0) { overallAssessmentSummary = '

Overall Assessment: STRONG VIABILITY

The business demonstrates robust profitability and a viable business model.

'; } else if (strengths.length > 0 && areasForImprovement.length > 0) { overallAssessmentSummary = '

Overall Assessment: MIXED VIABILITY

The business has notable strengths but also areas that require attention for sustained growth and profitability.

'; } else { overallAssessmentSummary = '

Overall Assessment: NEUTRAL / INSUFFICIENT DATA

Not enough specific flags to determine a strong positive or negative trend. Please provide more detailed inputs.

'; } // Store results assessmentResults = { ratios: { grossProfitMargin, operatingProfitMargin, netProfitMargin, revenueGrowthYoY, netIncomeGrowthYoY }, metrics: { cac, cltv, cltvToCacRatio, breakEvenUnits, breakEvenRevenue, contributionMarginPerUnit }, qualitative: { market_size, competitive_advantage, scalability_potential }, strengths, areasForImprovement, criticalIssues, overallAssessmentSummary }; displayResults(); switchTab('results'); // Automatically switch to results tab }); // --- Display Results --- function displayResults() { noResultsMessage.classList.add('hidden'); downloadPdfButton.classList.remove('hidden'); if (!assessmentResults) { resultsOutputDiv.innerHTML = '

No results to display. Perform analysis first.

'; return; } let resultsHtml = `

Key Profitability Ratios

Gross Profit Margin (Current Year) ${formatPercentage(assessmentResults.ratios.grossProfitMargin)}
Operating Profit Margin (Current Year) ${formatPercentage(assessmentResults.ratios.operatingProfitMargin)}
Net Profit Margin (Current Year) ${formatPercentage(assessmentResults.ratios.netProfitMargin)}
Revenue Growth (YoY) ${formatPercentage(assessmentResults.ratios.revenueGrowthYoY)}
Net Income Growth (YoY) ${formatPercentage(assessmentResults.ratios.netIncomeGrowthYoY)}

Business Model Viability Metrics

Customer Acquisition Cost (CAC) ${formatCurrency(assessmentResults.metrics.cac)}
Customer Lifetime Value (CLTV) ${formatCurrency(assessmentResults.metrics.cltv)}
CLTV:CAC Ratio ${isNaN(assessmentResults.metrics.cltvToCacRatio) ? 'N/A' : assessmentResults.metrics.cltvToCacRatio.toFixed(2) + ':1'}
Contribution Margin Per Unit ${formatCurrency(assessmentResults.metrics.contributionMarginPerUnit)}
Break-Even Point (Units) ${isFinite(assessmentResults.metrics.breakEvenUnits) ? formatNumber(assessmentResults.metrics.breakEvenUnits) : 'N/A'}
Break-Even Point (Revenue) ${isFinite(assessmentResults.metrics.breakEvenRevenue) ? formatCurrency(assessmentResults.metrics.breakEvenRevenue) : 'N/A'}

Qualitative Insights

Addressable Market Size: ${formatCurrency(assessmentResults.qualitative.market_size)}

Competitive Advantage: ${assessmentResults.qualitative.competitive_advantage || 'Not specified'}

Scalability Potential: ${assessmentResults.qualitative.scalability_potential}

Overall Assessment Summary

${assessmentResults.overallAssessmentSummary}

Detailed Assessment Points

${assessmentResults.criticalIssues.length > 0 ? `
Critical Issues:
    ${assessmentResults.criticalIssues.map(point => `
  • ${point}
  • `).join('')}
` : ''} ${assessmentResults.areasForImprovement.length > 0 ? `
Areas for Improvement:
    ${assessmentResults.areasForImprovement.map(point => `
  • ${point}
  • `).join('')}
` : ''} ${assessmentResults.strengths.length > 0 ? `
Strengths:
    ${assessmentResults.strengths.map(point => `
  • ${point}
  • `).join('')}
` : ''} ${assessmentResults.criticalIssues.length === 0 && assessmentResults.areasForImprovement.length === 0 && assessmentResults.strengths.length === 0 ? `

No specific assessment points generated. Please ensure all relevant inputs are provided.

` : ''}
`; resultsOutputDiv.innerHTML = resultsHtml; } // --- Event Listeners --- messageBoxCloseButton.addEventListener('click', hideMessageBox); // Tab navigation tabInputButton.addEventListener('click', () => switchTab('input')); tabResultsButton.addEventListener('click', () => switchTab('results')); tabAboutButton.addEventListener('click', () => switchTab('about')); // Next/Previous buttons nextTabButton.addEventListener('click', function() { if (activeTab === 'input') { switchTab('results'); } else if (activeTab === 'results') { switchTab('about'); } }); prevTabButton.addEventListener('click', function() { if (activeTab === 'results') { switchTab('input'); } else if (activeTab === 'about') { switchTab('results'); } }); // Collapsible sections financialPerformanceHeader.addEventListener('click', () => toggleCollapsible(financialPerformanceHeader, financialPerformanceContent)); businessModelHeader.addEventListener('click', () => toggleCollapsible(businessModelHeader, businessModelContent)); // PDF Download functionality downloadPdfButton.addEventListener('click', async function() { const pdfContentDiv = document.createElement('div'); pdfContentDiv.style.position = 'absolute'; pdfContentDiv.style.left = '-9999px'; pdfContentDiv.style.width = '800px'; pdfContentDiv.style.backgroundColor = '#ffffff'; pdfContentDiv.style.padding = '20px'; const pdfTitle = document.createElement('h2'); pdfTitle.textContent = 'Profitability & Business Model Viability Assessment Report'; pdfTitle.className = 'text-2xl font-bold text-gray-800 mb-6 text-center py-4'; pdfContentDiv.appendChild(pdfTitle); // Clone and append results const resultsClone = resultsOutputDiv.cloneNode(true); resultsClone.removeAttribute('id'); resultsClone.style.overflowX = 'visible'; // Ensure content is not cut off const noResultsMsg = resultsClone.querySelector('#noResultsMessage'); if (noResultsMsg) noResultsMsg.remove(); const downloadBtn = resultsClone.querySelector('#downloadPdfButton'); if (downloadBtn) downloadBtn.remove(); pdfContentDiv.appendChild(resultsClone); // Apply consistent styling to cloned elements for PDF pdfContentDiv.querySelectorAll('table').forEach(table => { table.style.width = '100%'; table.style.borderCollapse = 'collapse'; table.style.marginBottom = '20px'; table.style.fontFamily = 'sans-serif'; }); pdfContentDiv.querySelectorAll('th, td').forEach(cell => { cell.style.border = '1px solid #e5e7eb'; cell.style.padding = '12px'; cell.style.textAlign = 'left'; cell.style.fontSize = '12px'; }); pdfContentDiv.querySelectorAll('th').forEach(th => { th.style.backgroundColor = '#f9fafb'; th.style.fontWeight = '600'; th.style.color = '#374151'; }); pdfContentDiv.querySelectorAll('h4').forEach(h4 => { h4.style.fontSize = '1.125rem'; h4.style.fontWeight = 'bold'; h4.style.color = '#374151'; h4.style.marginBottom = '0.5rem'; }); pdfContentDiv.querySelectorAll('h5').forEach(h5 => { h5.style.fontSize = '1rem'; h5.style.fontWeight = 'bold'; h5.style.color = '#374151'; h5.style.marginTop = '1rem'; h5.style.marginBottom = '0.5rem'; }); pdfContentDiv.querySelectorAll('ul').forEach(ul => { ul.style.listStyleType = 'disc'; ul.style.marginLeft = '20px'; }); pdfContentDiv.querySelectorAll('.assessment-strength').forEach(span => { span.style.color = '#16a34a'; span.style.fontWeight = 'bold'; }); pdfContentDiv.querySelectorAll('.assessment-area-for-improvement').forEach(span => { span.style.color = '#d97706'; span.style.fontWeight = 'bold'; }); pdfContentDiv.querySelectorAll('.assessment-critical-issue').forEach(span => { span.style.color = '#dc2626'; span.style.fontWeight = 'bold'; }); document.body.appendChild(pdfContentDiv); try { const canvas = await html2canvas(pdfContentDiv, { scale: 2, useCORS: true, logging: false }); const imgData = canvas.toDataURL('image/png'); const { jsPDF } = window.jspdf; const pdf = new jsPDF('p', 'mm', 'a4'); const imgWidth = 190; const pageHeight = pdf.internal.pageSize.height; const imgHeight = canvas.height * imgWidth / canvas.width; let heightLeft = imgHeight; let position = 10; pdf.addImage(imgData, 'PNG', 10, position, imgWidth, imgHeight); heightLeft -= pageHeight; while (heightLeft >= -50) { position = heightLeft - imgHeight + 10; pdf.addPage(); pdf.addImage(imgData, 'PNG', 10, position, imgWidth, imgHeight); heightLeft -= pageHeight; } pdf.save('Profitability_Viability_Assessment_Report.pdf'); } catch (error) { console.error('Error generating PDF:', error); showMessageBox('PDF Error', 'Failed to generate PDF. Please try again. Details: ' + error.message); } finally { document.body.removeChild(pdfContentDiv); } }); }); } catch (e) { if (document.getElementById('messageBoxTitle') && document.getElementById('messageBoxText')) { document.getElementById('messageBoxTitle').textContent = 'Initialization Error'; document.getElementById('messageBoxText').textContent = 'An unexpected error occurred during tool initialization: ' + e.message + '. Please refresh the page.'; document.getElementById('messageBox').style.display = 'flex'; } else { console.error("Critical Error during tool initialization:", e); alert("An critical error occurred during tool initialization: " + e.message + ". Please refresh the page. Check console for details."); } }
Scroll to Top