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

# Variable Costs: Total Variable Order Costs

> Track total variable order costs including handling, gateway fees, shipping, and other costs. Use for unit economics and contribution margin analysis.

<Tip>
  Variable Costs measures the total variable order costs—including handling, gateway fees, shipping, and other costs—that change with each order.
</Tip>

## Formula

<Info>
  **Variable Costs** = **Handling Cost** + **Gateway Cost** + **Shipping Cost** + [**Other Cost**](/reference/metrics/orders/cogs/other-cost)
</Info>

### Formula Components

| Metric                                                      | Definition                                         |
| ----------------------------------------------------------- | -------------------------------------------------- |
| **Handling Cost**                                           | Per-order fulfillment and handling fees            |
| **Gateway Cost**                                            | Payment processor and transaction fees             |
| **Shipping Cost**                                           | Carrier shipping charges                           |
| [**Other Cost**](/reference/metrics/orders/cogs/other-cost) | Additional per-order, per-item, or percentage fees |

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

***

## Example

Your store processed **1,842 orders** in March with the following variable costs:

| Cost Type          | Total        |
| ------------------ | ------------ |
| Handling fees      | \$3,684      |
| Gateway fees       | \$4,238      |
| Shipping costs     | \$9,210      |
| Other costs        | \$1,289      |
| **Variable Costs** | **\$18,421** |

***

## How It Works

Variable Costs aggregates all per-order costs that scale with order volume. These costs are deducted from CM1 (Gross Profit) to calculate CM2 (Contribution Margin after variable costs). Tracking variable costs separately helps isolate product margin from operational costs.

***

## When to Use

| Scenario                        | Action                                    |
| ------------------------------- | ----------------------------------------- |
| Calculating CM2                 | Subtract Variable Costs from Gross Profit |
| Analyzing unit economics        | Track per-order variable burden           |
| Setting pricing floors          | Ensure prices cover COGS + Variable Costs |
| Evaluating fulfillment partners | Compare handling and shipping costs       |

***

## Related Metrics

| Metric                                                                              | Relationship                                 |
| ----------------------------------------------------------------------------------- | -------------------------------------------- |
| [COGS](/reference/metrics/orders/cogs/cogs)                                         | Product costs (separate from variable costs) |
| [Other Cost](/reference/metrics/orders/cogs/other-cost)                             | Component of Variable Costs                  |
| [Variable Costs Per Order](/reference/metrics/orders/cogs/variable-costs-per-order) | Average variable cost per order              |
| [Variable Costs %](/reference/metrics/orders/cogs/variable-costs-percent)           | Variable costs as % of net revenue           |

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