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

# Returning Customer Product Margin: Repeat Buyer Profitability

> Track product-level profitability from returning customers. Calculate margin after COGS to measure repeat buyer value and retention economics.

<Tip>
  The total product margin generated by returning customer orders, calculated as gross revenue minus cost of goods sold.
</Tip>

## Formula

<Info>
  **Returning Customer Product Margin** = [**Returning Customer Gross Revenue**](/reference/metrics/orders/revenue/returning-customer-gross-revenue) − [**Returning Customer COGS**](/reference/metrics/orders/cogs/returning-customer-cogs)
</Info>

### Formula Components

| Metric                                                                                                     | Definition                                                    |
| ---------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------- |
| [**Returning Customer Gross Revenue**](/reference/metrics/orders/revenue/returning-customer-gross-revenue) | Gross revenue from repeat buyers before discounts and refunds |
| [**Returning Customer COGS**](/reference/metrics/orders/cogs/returning-customer-cogs)                      | Cost of goods sold for returning customer orders              |

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

***

## Example

Your returning customers generated **\$28,400** in product margin last month:

| Segment             | Gross Revenue | COGS     | Product Margin |
| ------------------- | ------------- | -------- | -------------- |
| Returning Customers | \$85,200      | \$56,800 | **\$28,400**   |
| New Customers       | \$42,100      | \$29,470 | \$12,630       |

***

## How It Works

Returning Customer Product Margin captures the gross profit from repeat buyers at the product level. It subtracts [Returning Customer COGS](/reference/metrics/orders/cogs/returning-customer-cogs) from [Returning Customer Gross Revenue](/reference/metrics/orders/revenue/returning-customer-gross-revenue), showing how much you keep after product costs. This metric excludes fulfillment, transaction fees, and marketing costs.

***

## When to Use

| Scenario                      | Action                                                                     |
| ----------------------------- | -------------------------------------------------------------------------- |
| Measuring retention value     | Compare RC margin to NC margin to see if repeat buyers are more profitable |
| Evaluating loyalty economics  | High RC margin indicates sustainable retention without heavy discounting   |
| Setting retention goals       | Use as a target for retention campaigns and loyalty programs               |
| Analyzing customer mix impact | Track how shifts in NC/RC ratio affect overall profitability               |

***

## Related Metrics

| Metric                                                                                                 | Relationship                              |
| ------------------------------------------------------------------------------------------------------ | ----------------------------------------- |
| [New Customer Product Margin](/reference/metrics/orders/product-margin/new-customer-product-margin)    | Same calculation for first-time buyers    |
| [Product Margin](/reference/metrics/orders/product-margin/product-margin)                              | Total product margin across all customers |
| [Returning Customer Gross Revenue](/reference/metrics/orders/revenue/returning-customer-gross-revenue) | Revenue component of this calculation     |
| [Returning Customer COGS](/reference/metrics/orders/cogs/returning-customer-cogs)                      | Cost component subtracted from revenue    |

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