How this tool computes its result
calculateROI computes profit = revenue − cost, roi = ((revenue − cost) / cost) × 100 (0 if cost is 0), roas = revenue / cost (0 if cost is 0), profitMargin = (profit / revenue) × 100 (0 if revenue is 0), and breakEvenRevenue = cost. It then appends a canned set of text recommendations selected purely from fixed thresholds: roi < 0, roi < 100, roi < 300, roi ≥ 300 for the primary tier, plus separate bullet points if profitMargin < 10 or roas < 2 / roas ≥ 4.
