> ## 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.

# Product Margin Per Order: Average Profit Per Transaction

> Track average product margin per order to measure per-transaction profitability. Learn the formula, see examples, and optimize your product mix.

<Tip>
  The average profit from products per order, calculated before fulfillment and transaction costs.
</Tip>

## Formula

<Info>
  **Product Margin Per Order** = [**Product Margin**](/reference/metrics/orders/product-margin/product-margin) ÷ [**Orders**](/reference/metrics/orders/counts/orders)
</Info>

### Formula Components

| Metric                                                                        | Definition                                     |
| ----------------------------------------------------------------------------- | ---------------------------------------------- |
| [**Product Margin**](/reference/metrics/orders/product-margin/product-margin) | Gross revenue minus cost of goods sold         |
| [**Orders**](/reference/metrics/orders/counts/orders)                         | Total number of completed orders in the period |

| Metadata        |                             |
| --------------- | --------------------------- |
| **Type**        | Currency                    |
| **Data Source** | [Shopify](/sources/shopify) |
| **Aggregation** | Average                     |

***

## Example

Your store processed **1,247 orders** in January with a total Product Margin of **\$31,175**:

| Metric                       | Value       | Calculation          |
| ---------------------------- | ----------- | -------------------- |
| Gross Product Revenue        | \$87,290    | Sum of product sales |
| Product COGS                 | \$56,115    | Sum of product costs |
| Product Margin               | \$31,175    | \$87,290 − \$56,115  |
| **Product Margin Per Order** | **\$25.00** | \$31,175 ÷ 1,247     |

***

## How It Works

Product Margin Per Order divides total [Product Margin](/reference/metrics/orders/product-margin/product-margin) by [Order Count](/reference/metrics/orders/counts/orders). Product Margin is the difference between [Gross Revenue](/reference/metrics/orders/revenue/gross-revenue) and [COGS](/reference/metrics/orders/cogs/cogs). This metric isolates product profitability before fulfillment costs, transaction fees, and other variable expenses are applied.

***

## When to Use

| Scenario                             | Action                                              |
| ------------------------------------ | --------------------------------------------------- |
| Evaluating product mix profitability | Compare margin per order across product categories  |
| Setting free shipping thresholds     | Ensure threshold covers product margin              |
| Analyzing bundle performance         | Check if bundles improve per-order margin           |
| Identifying margin erosion           | Track trends to catch declining profitability early |

***

## Related Metrics

| Metric                                                                    | Relationship                                |
| ------------------------------------------------------------------------- | ------------------------------------------- |
| [Product Margin](/reference/metrics/orders/product-margin/product-margin) | Numerator: total margin across all orders   |
| [Orders](/reference/metrics/orders/counts/orders)                         | Denominator: order count for averaging      |
| [COGS Per Order](/reference/metrics/orders/cogs/cogs-per-order)           | The cost component per transaction          |
| [Gross Revenue](/reference/metrics/orders/revenue/gross-revenue)          | Revenue component of the margin calculation |

[See all Product Margin metrics →](/reference/metrics/orders/product-margin)
