E-Commerce Contribution Margin & Break-Even Unit Economics Model
Know your real profit before scaling ad spend. Calculate exact contribution margins and break-even ROAS factoring GCC payment fees and COD returns.
Problem it addresses
Build an open-source e-commerce unit economics and break-even ROAS calculation toolkit: 1) Single-file responsive HTML/JS calculator (unit_economics.html) calculating Contribution Margin 1, 2, and 3, factoring Product COGS, Shipping, Payment Fees (Mada, Credit Card, Tamara 6.5%), Return Rates, and Ad CAC, 2) Excel financial model with sensitivity tables, 3) Break-even ROAS formula guide.
Who it is for
BOTH operating in high-growth e-commerce, digital publishing, and direct-response marketing across Saudi Arabia, UAE, and Egypt.
What is inside
Key files listed in the README repository architecture:
docs/break-even-roas-formulas.mdLICENSEmodels/ecommerce-unit-economics-master.xlsxREADME.mdsrc/sku_margin_analyzer.pytests/test_calculator.pytools/unit_economics.html
How to evaluate and use it
- Read the README first and confirm that the documented problem matches your use case.
- Inspect the listed files to find the data, tools, templates, and tests relevant to your task.
- Follow the repository’s Quick Start and check prerequisites before running commands.
- Compare outputs with documented examples and review limitations before using them in a decision or client workflow.
Quick Start from the README: python -m unittest discover -s tests · python src/sku_margin_analyzer.py --help
Scope and limitations
- Fully-Loaded Landed Cost: Incorporates COGS, international freight, customs and tax assumptions, clearance fees, and Saudi VAT inputs that must be verified for the product and shipment.
- Payment Gateway & COD Surcharges: Models payment and COD fees using editable assumptions supplied by the merchant.
- Contribution Margin 3 (CM3): Calculates true profitability after deducting marketing acquisition costs (CAC) and estimated return-to-origin losses.
This page summarizes the available documentation; it does not establish performance or business results. Verify data and prerequisites before use.