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

# Total COGS: Complete Cost of Goods Sold

> Track your complete cost of goods sold combining product costs and user-defined COGS entries. Essential for accurate CM1 and margin analysis.

<Tip>
  The total cost of goods sold, combining product variant costs from Shopify and user-defined COGS entries.
</Tip>

## Formula

<Info>
  **Total COGS** = [**COGS**](/reference/metrics/orders/cogs/cogs) + [**Other COGS**](/reference/metrics/orders/cogs/other-cogs)
</Info>

### Formula Components

| Metric                                                      | Definition                                        |
| ----------------------------------------------------------- | ------------------------------------------------- |
| [**COGS**](/reference/metrics/orders/cogs/cogs)             | Product-level cost of goods from Shopify variants |
| [**Other COGS**](/reference/metrics/orders/cogs/other-cogs) | User-defined cost entries with category COGS      |

| Metadata        |                                                                         |
| --------------- | ----------------------------------------------------------------------- |
| **Type**        | Currency                                                                |
| **Data Source** | [Shopify](/sources/shopify), [Upstack Costs](/dashboard/settings/costs) |
| **Aggregation** | Sum                                                                     |

***

## Example

Your store had **\$16,900** in Total COGS for January:

| Component           | Value        | Source           |
| ------------------- | ------------ | ---------------- |
| Product COGS        | \$12,400     | Shopify variants |
| Packaging materials | \$2,150      | Cost entry       |
| Import duties       | \$1,460      | Cost entry       |
| Quality inspection  | \$890        | Cost entry       |
| **Total COGS**      | **\$16,900** | Combined         |

***

## How It Works

Total COGS combines two sources: product variant costs from Shopify (COGS) and any additional cost-of-goods entries you've configured (Other COGS). This complete picture of goods costs is deducted from Net Revenue to calculate CM1—your first contribution margin.

***

## When to Use

| Scenario              | Action                                     |
| --------------------- | ------------------------------------------ |
| Calculating CM1       | Subtract Total COGS from Net Revenue       |
| Margin analysis       | Use for accurate gross profit calculations |
| Cost tracking         | Monitor all goods costs in one metric      |
| Product profitability | Compare Total COGS against revenue         |

***

## Related Metrics

| Metric                                                                     | Relationship                                 |
| -------------------------------------------------------------------------- | -------------------------------------------- |
| [COGS](/reference/metrics/orders/cogs/cogs)                                | Product costs only (this metric includes it) |
| [Other COGS](/reference/metrics/orders/cogs/other-cogs)                    | User-defined costs (this metric includes it) |
| [CM1](/reference/metrics/orders/contribution-margin/cm1)                   | Net Revenue − Total COGS                     |
| [Net Revenue](/reference/metrics/orders/revenue/net-revenue)               | Revenue used in CM1 calculation              |
| [Gross Profit](/reference/metrics/orders/contribution-margin/gross-profit) | Related margin metric                        |

[See all COGS metrics →](/reference/metrics/orders/cogs)
