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

# Cost of Goods Sold: Track Product and Variable Costs

> Track COGS metrics in Upstack. Includes COGS, Variable Costs, Other Costs by customer type with formulas and margin analysis.

Cost of Goods Sold (COGS) metrics track the direct costs of products sold. Use these to calculate gross profit margins and understand cost structures.

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

## Metrics in This Group

| Metric                                                                                                | Description                        | When to Use                  |
| ----------------------------------------------------------------------------------------------------- | ---------------------------------- | ---------------------------- |
| [COGS](/reference/metrics/orders/cogs/cogs)                                                           | Cost of goods sold                 | Calculate gross profit       |
| [New Customer COGS](/reference/metrics/orders/cogs/new-customer-cogs)                                 | COGS for new customer orders       | Segment cost analysis        |
| [Returning Customer COGS](/reference/metrics/orders/cogs/returning-customer-cogs)                     | COGS for returning customer orders | Compare customer segments    |
| [COGS Per Order](/reference/metrics/orders/cogs/cogs-per-order)                                       | Average COGS per order             | Benchmark order costs        |
| [New Customer COGS Per Order](/reference/metrics/orders/cogs/new-customer-cogs-per-order)             | COGS per new customer order        | New customer profitability   |
| [New Customer COGS Gross Rate](/reference/metrics/orders/cogs/new-customer-cogs-gross-rate)           | COGS as % of NC gross revenue      | New customer margin analysis |
| [Returning Customer COGS Per Order](/reference/metrics/orders/cogs/returning-customer-cogs-per-order) | COGS per returning customer order  | Returning customer margins   |
| [Other Cost](/reference/metrics/orders/cogs/other-cost)                                               | Additional product costs           | Track miscellaneous costs    |
| [Other Cost Per Order](/reference/metrics/orders/cogs/other-cost-per-order)                           | Average other cost per order       | Per-order analysis           |
| [Other Cost %](/reference/metrics/orders/cogs/other-cost-percent)                                     | Other cost as % of revenue         | Cost proportion              |
| [Variable Costs](/reference/metrics/orders/cogs/variable-costs)                                       | Total variable costs               | Unit economics               |
| [Variable Costs Per Order](/reference/metrics/orders/cogs/variable-costs-per-order)                   | Variable cost per order            | Per-order economics          |
| [Variable Costs %](/reference/metrics/orders/cogs/variable-costs-percent)                             | Variable costs as % of revenue     | Cost structure               |
| [COGS Gross Rate](/reference/metrics/orders/cogs/cogs-gross-rate)                                     | COGS as % of gross revenue         | Gross margin inverse         |
| [COGS Net Rate](/reference/metrics/orders/cogs/cogs-net-rate)                                         | COGS as % of net revenue           | Net margin analysis          |

## How These Metrics Relate

COGS metrics build the foundation for margin analysis:

* **Gross Profit** = Revenue - COGS
* **COGS Rate** = COGS ÷ Revenue (inverse of gross margin)
* **Variable Costs** include COGS + fulfillment + transaction costs
* **CM1** = Revenue - COGS (first contribution margin level)

## Choosing the Right Metric

* **Margin analysis**: Use COGS and COGS Rate to calculate gross margins
* **Per-order economics**: Use COGS Per Order for unit economics
* **Customer profitability**: Compare New vs Returning COGS to find profitable segments
* **Cost structure**: Use Variable Costs % to understand total variable burden
