> ## 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 %: Profitability as Percentage of Revenue

> Track the percentage of revenue retained after product costs. Learn the formula, see examples, and optimize product profitability across your Shopify store.

<Tip>
  The percentage of revenue remaining after subtracting the cost of goods sold.
</Tip>

## Formula

<Info>
  **Product Margin %** = ( [**Gross Revenue**](/reference/metrics/orders/revenue/gross-revenue) − [**COGS**](/reference/metrics/orders/cogs/cogs) ) ÷ [**Gross Revenue**](/reference/metrics/orders/revenue/gross-revenue) × 100
</Info>

### Formula Components

| Metric                                                               | Definition                                                        |
| -------------------------------------------------------------------- | ----------------------------------------------------------------- |
| [**Gross Revenue**](/reference/metrics/orders/revenue/gross-revenue) | Total revenue from product sales before discounts and adjustments |
| [**COGS**](/reference/metrics/orders/cogs/cogs)                      | Cost of goods sold from Shopify product inventory data            |

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

***

## Example

Your store generated **\$50,000** in revenue with **\$30,000** in product costs, resulting in a **40%** product margin:

| Category    | Revenue      | COGS         | Margin % |
| ----------- | ------------ | ------------ | -------- |
| Apparel     | \$25,000     | \$12,500     | 50%      |
| Accessories | \$15,000     | \$10,500     | 30%      |
| Home Goods  | \$10,000     | \$7,000      | 30%      |
| **Total**   | **\$50,000** | **\$30,000** | **40%**  |

***

## How It Works

Product Margin % calculates the percentage of each revenue dollar that remains after covering product costs. Shopify provides product cost data through inventory settings or metafields. This metric aggregates across all line items in orders, weighted by revenue contribution.

***

## When to Use

| Scenario                         | Action                                        |
| -------------------------------- | --------------------------------------------- |
| Evaluating product profitability | Identify high-margin products to promote      |
| Pricing decisions                | Adjust prices on low-margin items             |
| Supplier negotiations            | Flag products with eroding margins            |
| Ad spend allocation              | Focus budget on products with healthy margins |

***

## Related Metrics

| Metric                                                                    | Relationship                            |
| ------------------------------------------------------------------------- | --------------------------------------- |
| [Gross Revenue](/reference/metrics/orders/revenue/gross-revenue)          | Revenue before deductions (denominator) |
| [COGS](/reference/metrics/orders/cogs/cogs)                               | Product costs subtracted from revenue   |
| [Product Margin](/reference/metrics/orders/product-margin/product-margin) | Dollar amount instead of percentage     |
| [Net Revenue](/reference/metrics/orders/revenue/net-revenue)              | Revenue after discounts and refunds     |

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