Net Margin
net_margin
Overview
Net Margin represents the percentage of total order revenue that remains as net profit after deducting all associated costs, including refunds, advertising spend, cost of goods, shipping costs, payment gateway costs, handling fees, taxes, and other operational expenses.
Net Margin = (Order Revenue − Refunds − Ad Spend − Total Costs) / Order Revenue
The calculation is based on data in the Blended Stats table.
Detailed Breakdown
The formula above is derived from the following components:
- Order Revenue =
SUM(order_revenue)
--> Orders table - Refunds =
SUM(refund_money)
, whererefund_money
=ABS(SUM(total_refunded_price))
--> Refunds table
- Ad Spend =
spend + custom_ad_spend
, wherespend
=SUM(spend)
--> Ads tablecustom_ad_spend
=SUM(IF(is_ad_spend, amount, 0))
--> Custom Spend table
- Total Costs =
cogs - total_refunded_cogs + payment_gateway_costs + shipping_costs + custom_excl_ad_spend + handling_fees + taxes
, wherecogs
=SUM(cost_of_goods)
--> Orders tabletotal_refunded_cogs
=ABS(SUM(total_refunded_cogs))
--> Refunds tablepayment_gateway_costs
=SUM(payment_gateway_costs)
--> Orders tableshipping_costs
=SUM(shipping_costs)
--> Orders tablecustom_excl_ad_spend
=SUM(IF(is_ad_spend = false, amount, 0))
--> Custom Spend tablehandling_fees
=SUM(handling_fees)
--> Orders tabletaxes
=SUM(taxes)
--> Orders table
Insights and Actions
Net Margin highlights the percentage of revenue retained as profit after accounting for all costs, offering a crucial view of your business’s operational efficiency and profitability:
- Track Profitability Trends: Monitor net margin over time to identify shifts in profitability. A declining margin could signal rising costs or inefficiencies that need to be addressed.
- Refine Expense Strategies: Analyze the breakdown of costs (e.g., COGS, refunds, shipping) to pinpoint areas for cost reduction, improving overall margins without compromising quality.
- Evaluate Revenue Contributions: Assess how various revenue streams impact net margin. For example, focus on high-margin products or services to boost overall profitability.
Related Metrics
- Net Profit: The total profit after all expenses, used in the net margin calculation, provides a detailed view of absolute earnings.
- Blended CPA: Helps evaluate how customer acquisition costs influence overall profitability, an important factor in managing net margin.
- Cost of Goods Sold (COGS): A key component of total costs, tracking this metric allows you to identify opportunities to reduce production costs and improve margins.
Example Use
Prompt
What was my net margin for the last 30 days?
Response
Query
SELECT
COALESCE(
(
SUM(bst.order_revenue) - SUM(bst.refund_money) - SUM(bst.spend) - SUM(bst.total_costs)
) / NULLIF(SUM(bst.order_revenue), 0),
0
) AS net_margin
FROM
blended_stats_tvf () AS bst
WHERE
bst.event_date BETWEEN CURRENT_DATE() - 30 AND CURRENT_DATE() - 1;
Updated about 1 month ago