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

# Gross Profit: Attributed Revenue Minus COGS

> Track attributed gross profit from your Shopify store. Measure the profit remaining after subtracting cost of goods sold from net revenue.

<Tip>
  Gross Profit measures the revenue remaining after subtracting the cost of goods sold—your fundamental product profitability before operating expenses.
</Tip>

## Formula

<Info>
  **Gross Profit** = [**Net Revenue**](/reference/metrics/orders/revenue/net-revenue) − [**COGS**](/reference/metrics/orders/cogs/cogs)
</Info>

### Formula Components

| Metric                                                           | Definition                                    |
| ---------------------------------------------------------------- | --------------------------------------------- |
| [**Net Revenue**](/reference/metrics/orders/revenue/net-revenue) | Revenue after discounts and refunds           |
| [**COGS**](/reference/metrics/orders/cogs/cogs)                  | Cost of goods sold from product variant costs |

| Metadata        |                         |
| --------------- | ----------------------- |
| **Type**        | Currency                |
| **Data Source** | [Upstack Pixel](/pixel) |
| **Aggregation** | Sum                     |

***

## Example

Your Shopify store generated **\$125,000** in net revenue in January with **\$47,500** in product costs:

| Component        | Amount       | Calculation                 |
| ---------------- | ------------ | --------------------------- |
| Net Revenue      | \$125,000    | After discounts and refunds |
| COGS             | −\$47,500    | Product variant costs       |
| **Gross Profit** | **\$77,500** | Revenue retained            |

***

## How It Works

Gross Profit subtracts your cost of goods sold from net revenue, showing how much money remains from each sale before accounting for operating expenses like marketing, fulfillment, and overhead. This metric is attributed through the Upstack Pixel, allowing you to measure gross profit by channel, campaign, or traffic source.

***

## When to Use

| Scenario                        | Action                                                           |
| ------------------------------- | ---------------------------------------------------------------- |
| Measuring product profitability | Compare Gross Profit across product lines to identify winners    |
| Channel performance analysis    | Track Gross Profit by traffic source to find profitable channels |
| Campaign efficiency             | Evaluate whether campaigns generate profit after product costs   |
| Pricing decisions               | Use Gross Profit margins to inform price adjustments             |

***

## Related Metrics

| Metric                                                                     | Relationship                                          |
| -------------------------------------------------------------------------- | ----------------------------------------------------- |
| [Net Revenue](/reference/metrics/orders/revenue/net-revenue)               | Revenue component (Gross Profit = Net Revenue − COGS) |
| [COGS](/reference/metrics/orders/cogs/cogs)                                | Cost component subtracted from revenue                |
| [CM1](/reference/metrics/orders/contribution-margin/cm1)                   | First contribution margin (similar concept)           |
| [Conversion Value](/reference/metrics/funnel/conversions/conversion-value) | Total value of attributed conversions                 |

[See all Conversions metrics →](/reference/metrics/funnel/conversions)
