Order-level profitability analysis
For an online food brand, we analyzed profitability one order at a time. The analysis shows what is left from each order after every cost tied to it, reported by product, basket size and promotion.
- Client
- Online food brand
- Service
- Profitability analysis
- Data
- 15,000+ orders over 12 months, 100+ menu items
- Tools
- Python, pandas, SQL, Excel
The questions
- What is left from an average order once every cost tied to it is paid?
- Which orders lose money, by basket size, product and promotion?
- What would a minimum basket or a tighter discount rule do to margin?
Example outputs
Client data stays confidential, so these charts use sample numbers in the same format as the delivered reports.
- 41%of single-item orders lose money
- 11%of all orders lose money
- 47%contribution margin on baskets of five or more items
Where the order value goes
Average share of what the customer paid, across all orders.
Contribution margin by week
Margin as a share of what customers paid. Discounted orders are those placed with a discount code.
- All orders
- Discounted orders
Margin by basket size
Courier and packaging costs are charged per order, so they weigh more on small baskets.
| Basket | Share of orders | Share of sales | Contribution margin | Orders at a loss |
|---|---|---|---|---|
| 1 item | 18% | 7% | 4% | 41% |
| 2 items | 31% | 23% | 26% | 8% |
| 3 to 4 items | 36% | 42% | 40% | 2% |
| 5 or more items | 15% | 28% | 47% | 1% |
| All orders | 100% | 100% | 36% | 11% |
Approach
- 1
Build the order table
One row per order line, joined to product cost, packaging, the courier charge, payment fees, discount codes and refunds.
- 2
Write down the cost rules
Courier and outer packaging are charged once per order, so they are split across the order's lines by value. Every rule is written down so the client can check it.
- 3
Calculate contribution margin
Per order first, then rolled up by product, basket size, promotion and week. Fixed overheads such as rent and salaries stay out. The number says whether an order paid for itself.
- 4
Test the fixes on past orders
Rerun past orders under a proposed rule, such as a minimum basket or a limit on stacked discounts. Report the change in margin and the share of orders affected. The estimate assumes customers keep ordering as before, and the report says so.