profit-margin-analyzer
Compute true net margin per SKU and per channel using a full cost-waterfall model (COGS, fulfillment, marketing, and returns) to identify profitable vs loss-making products.
name: profit-margin-analyzer description: Compute true net margin per SKU and per channel using a full cost-waterfall model (COGS, fulfillment, marketing, and returns) to identify profitable vs loss-making products. tags: [internal, ops, requires-yepai-tools] license: MIT-0
Profit Margin Analyzer
Overview
Profit margin analysis is the process of decomposing revenue into its cost components to identify exactly where value is created or destroyed. In ecommerce, a high-revenue product can often be a "loss leader" once fulfillment, marketing, and returns are factored in. This skill focuses on moving beyond basic gross margin to Contribution Margin, providing the data necessary for catalog rationalization and pricing strategy.
The Profit Waterfall Model
Use this standardized hierarchy for all profitability assessments:
Gross Revenue (List Price × Units)
- Discounts/Promotions
- Returns & Refunds
= Net Revenue
- Cost of Goods Sold (COGS - Landed)
= Gross Profit (Gross Margin %)
- Payment Processing Fees (e.g., 2.9% + $0.30)
- Marketplace Referral Fees (e.g., Amazon 15%)
- Outbound Shipping & Packaging
- Fulfillment Labor/FBA Fees
= Fulfillment-Adjusted Gross Profit
- Variable Marketing Spend (Ad Spend per SKU/Channel)
= Contribution Margin (Contribution Margin %)
- Fixed Overhead (SaaS, Rent, Salaries)
= Operating Profit (Net Margin %)
Run: MARGIN_ANALYZE (what is actually computed)
Call MARGIN_ANALYZE (no arguments — tenant-scoped). It returns a per-SKU table
from the store's REAL data:
- Gross margin — fully data-backed: (Price − Cost per item) / Price, using
Shopify's
inventoryItem.unitCost. Products missing a Cost value are listed inskipped_no_cost— tell the merchant to fill Cost per item to include them. contrib_pct— labeled assumption layer: gross margin minus a payment fee assumption (2.9% + $0.30, Shopify Payments standard). Marketing / shipping / fulfillment per SKU are N/A (not in Shopify) — never guessed; the fuller waterfall below needs a cost CSV from the merchant.units_soldper SKU comes from real orders (order lines missing a SKU can't be attributed — the result reports how many units were unattributable). Grades per the benchmarks below. Reply with 1–3 sentences (never re-type the table); say explicitly which layers are real vs assumed.
The full methodology (context for interpretation)
Execution Steps
Step 1: Data Sanitization (Landed Cost Calculation)
The most common error in margin analysis is using "wholesale price" instead of "landed cost."
Formula for Landed Cost per Unit: Landed Cost = (Unit Purchase Price) + (Inbound Freight / Total Units) + (Customs/Duties / Total Units) + (Prep/Inspection Fees / Total Units)
Platform Configuration:
- Shopify Admin: Navigate to Products > [Product] > Variants. Ensure the Cost per item field reflects the Landed Cost. Use the "Profit by product" report in Analytics > Reports to view baseline gross margins.
- WooCommerce Admin: Use the native Cost of Goods fields (if enabled via extension) or custom attributes to store landed cost.
- Amazon Seller Central: Review the Fee Preview in Manage Inventory to see the breakdown of Referral vs. FBA fees per SKU.
Step 2: Channel-Level Profitability Mapping
Compare performance across different sales environments. Note that high-volume channels like Amazon often have lower margins due to referral fees but higher efficiency.
| Metric | Shopify (DTC) | Amazon FBA | Wholesale |
|---|---|---|---|
| Avg. Order Value | $85.00 | $42.00 | $1,200.00 |
| Platform Fee | 0% (SaaS) | 15% (Referral) | 0% |
| Fulfillment | $12.50 (Self) | $6.40 (FBA) | $45.00 (LTL) |
| Gross Margin % | 72% | 45% | 35% |
| Contribution % | 42% | 22% | 28% |
Decision Criterion: If a channel's Contribution Margin % is lower than your target CAC (Customer Acquisition Cost), you are losing money on every new customer acquired through that channel.
Step 3: SKU Tiering & Catalog Rationalization
Categorize your products based on volume and contribution margin to determine resource allocation.
- High Margin / High Volume (Stars): Prioritize for ad spend and influencer seeding.
- Low Margin / High Volume (Workhorses): Target for COGS negotiation or shipping optimization. Do not increase ad spend here.
- High Margin / Low Volume (Niche): Keep for "basket builders" or bundles.
- Low Margin / Low Volume (Dogs): Candidate for discontinuation or significant price increases.
Step 4: Advanced Cost Attribution (Edge Cases)
- Return Rate Impact: A 15% return rate on a 40% margin product effectively reduces the margin to ~30% when accounting for non-resellable inventory and shipping losses.
- Currency Fluctuation: If buying in USD but selling in EUR, a 5% currency shift can wipe out your net profit. Build a 5-10% "buffer" into COGS for international sourcing.
- Bundling Logic: Calculate the "Weighted Average Margin" for bundles. Often, bundling a high-margin accessory with a low-margin core product is the only way to make the core product profitable.
Benchmarks & Decision Thresholds
| Indicator | Danger Zone | Healthy | Elite |
|---|---|---|---|
| Gross Margin | < 30% | 50% - 65% | > 75% |
| Contribution Margin | < 15% | 25% - 40% | > 50% |
| Net Profit Margin | < 2% | 8% - 15% | > 20% |
| Return Rate (Hard Goods) | > 12% | 3% - 7% | < 2% |
Troubleshooting & Common Pitfalls
- Ignoring Payment Fees: Payment processors take ~3% of Gross revenue, not Net. On a low-margin product, this can be 10-15% of your actual profit.
- Flat Shipping Assumptions: Shipping a heavy item to Zone 8 (far) vs. Zone 2 (near) can vary by $15. Use Weighted Average Shipping Cost based on historical shipping data, not just the "standard" rate.
- Inventory Write-offs: Ensure "Dead Stock" (inventory older than 180 days) is factored into your annual COGS as a write-down.
Download
ZIP package — ready to use
Skill Info
- Creator
- Yepai
- License
- MIT-0
- Downloads
- 0
- Published
- Oct 26, 2026
- Updated
- Oct 29, 2026