Side Hustle Profit Margin Analyzer

Side Hustle Details

$

Enter the name of your side hustle, the period you are analyzing, and the total revenue earned during that period.

Direct Costs (Cost of Goods Sold - COGS)

List all costs directly related to producing your product or delivering your service (e.g., raw materials, direct labor for production, specific software consumed per sale).

$
DescriptionAmount ($)Action
Total Direct Costs (COGS)$0.00

Operating Expenses (Overheads)

List all general business expenses not directly tied to a single sale (e.g., marketing, general software, bank fees, office supplies).

$
DescriptionAmount ($)Action
Total Operating Expenses$0.00

Profitability Analysis for Your Hustle

Enter revenue and costs in previous tabs to see analysis.

"What-If" Projections

See how changes might impact your profit margins. Enter percentage changes for Revenue/COGS and dollar change for Operating Expenses.

%
%
$

Download Your Profitability Report

This will generate a PDF summary of your side hustle's financial analysis, including revenue, itemized costs, profit margins, and any projections you've calculated.

Gross Profit Margin: ${currentHustle.grossProfitMargin.toFixed(1)}%

Total Operating Expenses: $${currentHustle.totalOpex.toFixed(2)}

Net Profit: $${currentHustle.netProfit.toFixed(2)}

Net Profit Margin: ${currentHustle.netProfitMargin.toFixed(1)}%

`; if (currentHustle.cogsItems.length > 0) { pdfHtml += `

Itemized Direct Costs (COGS)

`; currentHustle.cogsItems.forEach(item => { pdfHtml += ``; }); pdfHtml += `
DescriptionAmount ($)
${item.description}${item.amount.toFixed(2)}
Total COGS$${currentHustle.totalCogs.toFixed(2)}
`; } if (currentHustle.opexItems.length > 0) { pdfHtml += `

Itemized Operating Expenses

`; currentHustle.opexItems.forEach(item => { pdfHtml += ``; }); pdfHtml += `
DescriptionAmount ($)
${item.description}${item.amount.toFixed(2)}
Total OpEx$${currentHustle.totalOpex.toFixed(2)}
`; } pdfHtml += `
`; // End Actual Performance Section if (currentHustle.projections) { pdfHtml += `

"What-If" Projection

`; pdfHtml += `

Projection Assumptions:
Revenue Change: ${currentHustle.projections.inputs.revChange}%
COGS Change: ${currentHustle.projections.inputs.cogsChange}%
Operating Expenses Change: $${currentHustle.projections.inputs.opexChange.toFixed(2)}

`; pdfHtml += `

Projected Revenue: $${currentHustle.projections.revenue.toFixed(2)}

Projected Direct Costs (COGS): $${currentHustle.projections.cogs.toFixed(2)}

Projected Gross Profit: $${currentHustle.projections.grossProfit.toFixed(2)}

Projected Gross Profit Margin: ${currentHustle.projections.grossProfitMargin.toFixed(1)}%

Projected Operating Expenses: $${currentHustle.projections.opex.toFixed(2)}

Projected Net Profit: $${currentHustle.projections.netProfit.toFixed(2)}

Projected Net Profit Margin: ${currentHustle.projections.netProfitMargin.toFixed(1)}%

`; } pdfHtml += `
`; // Close shpa-pdf-output pdfOutputEl.innerHTML = pdfHtml; const opt = { margin: [0.5, 0.5, 0.5, 0.5], filename: `Profit_Margin_Report_${(currentHustle.name || "SideHustle").replace(/[^a-zA-Z0-9]/g, '_')}.pdf`, image: { type: 'jpeg', quality: 0.98 }, html2canvas: { scale: 2, useCORS: true, logging: false }, jsPDF: { unit: 'in', format: 'letter', orientation: 'portrait' } }; if (html2pdf && pdfOutputEl) { html2pdf().from(pdfOutputEl).set(opt).save() .catch(err => { console.error("PDF generation failed:", err); alert("PDF generation error. See console."); }); } else { alert("PDF library not loaded or output element missing."); } }); // --- Tab Navigation --- window.shpa_openTab = function(evt, tabName) { tabs.forEach(tab => { if(tab) tab.style.display = 'none'; }); tabLinks.forEach(link => { if(link) link.classList.remove('active'); }); const activeTabContent = toolContainer.querySelector('#' + tabName); if(activeTabContent) activeTabContent.style.display = 'block'; else { console.error(`Tab content for ${tabName} not found.`); return; } let clickedIndex = -1; if (evt && evt.currentTarget) { evt.currentTarget.classList.add('active'); clickedIndex = tabLinks.indexOf(evt.currentTarget); } else { clickedIndex = tabLinks.findIndex(link => { const onclickAttr = link.getAttribute('onclick'); return onclickAttr && onclickAttr.includes(tabName); }); if (clickedIndex !== -1 && tabLinks[clickedIndex]) tabLinks[clickedIndex].classList.add('active'); } currentTabIndex = clickedIndex !== -1 ? clickedIndex : 0; shpa_updateNavButtons(); // If opening analysis tab, ensure calculations are fresh if (tabName === 'shpa-tab3') { shpa_performFullAnalysis(); } } window.shpa_navigateTab = function(direction) { let newIndex = currentTabIndex; if (direction === 'next' && currentTabIndex < tabs.length - 1) newIndex++; else if (direction === 'prev' && currentTabIndex > 0) newIndex--; if (tabLinks[newIndex] && newIndex !== currentTabIndex) tabLinks[newIndex].click(); } function shpa_updateNavButtons() { if(prevButton) prevButton.disabled = currentTabIndex === 0; if(nextButton) nextButton.disabled = currentTabIndex >= tabs.length - 1; } // --- Initialization --- function initializeTool() { shpa_renderCostTablesAndTotals(); // Initial render for empty tables shpa_openTab(null, 'shpa-tab1'); // Open first tab // Load any persisted helper data if implemented (e.g., last hustle name) // const lastHustleName = localStorage.getItem(`${toolId}_lastHustleName`); // if (lastHustleName && hustleNameEl) hustleNameEl.value = lastHustleName; } let attempts = 0; function checkLibrariesAndInit_shpa() { if (typeof html2pdf !== 'undefined') { initializeTool(); } else if (attempts < 20) { attempts++; setTimeout(checkLibrariesAndInit_shpa, 100); } else { alert("Error: PDF generation library (html2pdf.js) could not be loaded. PDF export will not work."); initializeTool(); } } checkLibrariesAndInit_shpa(); })();
Scroll to Top