> ## Documentation Index
> Fetch the complete documentation index at: https://docs.upstackdata.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Contribution Margin: Track CM1-CM4 Per Order

> Track contribution margin metrics in Upstack. Includes CM1, CM2, CM3, CM4 per order with cost components and margin analysis.

Contribution margin metrics track profitability at multiple levels—from gross margin (CM1) through operating profit (CM4). These build progressively as costs are deducted.

<Info>
  **Data Source:** [Shopify](/sources/shopify)\
  **Metrics:** 24
</Info>

## Contribution Margin Levels

| Level | Name                | Formula                                     |
| ----- | ------------------- | ------------------------------------------- |
| CM1   | Gross Margin        | Revenue - COGS                              |
| CM2   | After Fulfillment   | CM1 - Fulfillment Costs - Transaction Costs |
| CM3   | Contribution Margin | CM2 - Marketing Cost - Agency Fees          |
| CM4   | Operating Profit    | CM3 - Opex                                  |

## Metrics in This Group

### CM Per Order

| Metric                                                                       | Description                       | When to Use                     |
| ---------------------------------------------------------------------------- | --------------------------------- | ------------------------------- |
| [CM1 Per Order](/reference/metrics/orders/contribution-margin/cm1-per-order) | Gross margin per order            | Benchmark product profitability |
| [CM2 Per Order](/reference/metrics/orders/contribution-margin/cm2-per-order) | Post-fulfillment margin per order | Include variable costs          |
| [CM3 Per Order](/reference/metrics/orders/contribution-margin/cm3-per-order) | Contribution margin per order     | Include marketing costs         |
| [CM4 Per Order](/reference/metrics/orders/contribution-margin/cm4-per-order) | Operating profit per order        | Full cost allocation            |

### New Customer CM Per Order

| Metric                                                                                                 | Description                | When to Use                         |
| ------------------------------------------------------------------------------------------------------ | -------------------------- | ----------------------------------- |
| [New Customer CM1 Per Order](/reference/metrics/orders/contribution-margin/new-customer-cm1-per-order) | NC gross margin per order  | New customer profitability          |
| [New Customer CM2 Per Order](/reference/metrics/orders/contribution-margin/new-customer-cm2-per-order) | NC post-fulfillment margin | Include new customer variable costs |
| [New Customer CM3 Per Order](/reference/metrics/orders/contribution-margin/new-customer-cm3-per-order) | NC contribution margin     | Acquisition profitability           |
| [New Customer CM4 Per Order](/reference/metrics/orders/contribution-margin/new-customer-cm4-per-order) | NC operating profit        | Full new customer economics         |

### Cost Components

| Metric                                                                                             | Description                                                                     | When to Use                            |
| -------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | -------------------------------------- |
| [Total Cost](/reference/metrics/orders/contribution-margin/total-cost)                             | All costs combined (COGS + fulfillment + transaction + marketing + fees + opex) | Measure complete cost structure        |
| [New Customer Total Cost](/reference/metrics/orders/contribution-margin/new-customer-total-cost)   | All costs for first-time buyer orders                                           | Measure acquisition cost structure     |
| [Marketing Cost](/reference/metrics/orders/contribution-margin/marketing-cost)                     | User-defined marketing costs                                                    | Track marketing spend allocation       |
| [Marketing Cost Per Order](/reference/metrics/orders/contribution-margin/marketing-cost-per-order) | Average marketing cost per order                                                | Measure per-order marketing efficiency |
| [Agency Fees](/reference/metrics/orders/contribution-margin/agency-fees)                           | User-defined agency fees                                                        | Track agency spend allocation          |
| [Opex](/reference/metrics/orders/contribution-margin/opex)                                         | Operating expenses                                                              | Track overhead allocation              |

## How These Metrics Relate

Contribution margins build progressively:

1. **CM1** (Gross Margin) = Revenue - COGS
2. **CM2** (After Fulfillment) = CM1 - Fulfillment - Transaction Costs
3. **CM3** (Contribution Margin) = CM2 - Marketing - Agency Fees
4. **CM4** (Operating Profit) = CM3 - Opex

Each level shows profitability after deducting the next set of costs.

## Choosing the Right Metric

* **Product profitability**: Use CM1 to evaluate products before variable costs
* **Order economics**: Use CM2 to see profit after all variable costs
* **Marketing efficiency**: Use CM3 to measure contribution after marketing
* **Business profitability**: Use CM4 for bottom-line order profitability
* **Customer acquisition**: Compare New Customer CM metrics to justify CAC
