# Check BOM margin and cost breakdown

See how profitable a BOM is — selling price vs total cost — and drill into the per-component cost breakdown.

import Term from '~/components/Term.astro';
import { Steps, Aside } from '@astrojs/starlight/components';
import DocUpdated from '~/components/DocUpdated.astro';

Every <Term def="bom">BOM</Term> rolls up its components into a **total cost**. If the BOM's Shopify variant has a selling price, Assemblified shows you the **margin** at a glance. And if the margin's wrong (or you want to know *why*), the same card expands into the per-component breakdown.

This guide walks through both — the summary and the drill-down.

## On this page

- Where it lives — the Financial breakdown card
- Step-by-step: read the margin
- Step-by-step: drill into the breakdown
- The math behind every number
- What's not shown
- Improving margin

## Where it lives

Both the bottom line and the detail are on **one card**: **Financial breakdown**, on the BOM detail
page's **Overview** tab.

| What you want | Where to look on the card |
|---|---|
| **The bottom line** | Total cost per unit, and below it the selling price and margin %, badged by health. |
| **Why it's that number** | Expand a line — per-component cost rows for materials, subassemblies and additional costs, each with its subtotal. |

The card is **read-only**: every number on it is derived. The composition cards it summarises live on
the **Materials** tab — that is where quantities, waste and attached cost rates are changed, and the
breakdown re-reads afterwards.

Use the summary when you want the bottom line. Expand the sections when you want to know which
component is dominating cost — or to verify the rollup before you [sync cost to Shopify](/guides/sync-cost-to-shopify/).

<Aside type="note">
The margin display is **BOM-only**. An assembly BOM (defines a subassembly) has no margin, because it has no Shopify selling price.
</Aside>

## Step-by-step: read the margin

<Steps>

1. **Open the BOM detail page** for any BOM that has a Shopify product link with a selling price.

2. **Stay on the Overview tab** (the default tab when the page loads).

3. **Scroll to Financial breakdown.**

4. **Read the summary values:**
   - **Total cost per unit** — the rolled-up cost of all components.
   - **Selling price** — what Shopify shows for this variant. A BOM with no linked variant has no price, and the margin row is simply absent rather than showing 100% against zero.
   - **Margin** — the percentage `(Selling Price − Total Cost) / Selling Price × 100`, badged by health:
     - **Green** — 15% or more.
     - **Amber** — under 15%: thin, or negative when you sell at a loss (the percentage then has a minus sign).

</Steps>

That's the bottom line. If the number surprises you (negative when you expected positive, or much lower than expected), expand the lines on the same card.

## Step-by-step: drill into the breakdown

<Steps>

1. **Same card** — the three lines sit above the total.

2. **Expand a line** with the chevron beside its amount. Each line carries its own subtotal:
   - **Materials** — direct materials in the BOM.
   - **Subassemblies** — the <Term def="sub-assembly">assembly BOMs</Term> the BOM references.
   - **Additional costs** — labour and overhead [cost rates](/features/cost-factors/overview/) attached directly to this BOM.

3. **Inspect each row.** A material row shows the component, its quantity, the unit cost, the waste %, and the resulting line cost. The math: `quantity × unit cost × (1 + waste%/100)`. An additional-costs row shows `quantity unit × rate` — no waste multiplier.

4. **Read the total** under the three lines: **Total cost per unit**.

5. **Collapse a line** again with the same chevron if you only want the subtotals at a glance.

</Steps>

If a single line dominates the cost — say one material's `unit cost × quantity` is 80% of the total — that's where to focus when you're trying to improve margin.

## The math behind every number

Same formula throughout the app, applied per line:

```
effective_cost_per_unit = unit_cost × (1 + waste_percentage / 100)
line_cost              = quantity × effective_cost_per_unit
```

Then aggregated:

```
direct_raw_material_cost = sum(line_cost) for all direct materials
sub_assembly_cost        = sum(SA line costs, recursive into nested SAs)
additional_cost          = sum(quantity × rate) for cost rates on THIS BOM
total_cost               = direct_raw_material_cost + sub_assembly_cost + additional_cost
```

An assembly BOM's own additional costs are already inside its line cost, so they reach the total through `sub_assembly_cost` — counted exactly once, never listed twice.

Margin, from the same card:

```
margin_% = (selling_price − total_cost) / selling_price × 100
```

If you've added <Term def="labour-cost">labour</Term> via the [virtual work-hour pattern](/guides/track-building-cost/), it's a regular raw-material line — nothing special, just rolled in. Labour added as an [additional cost](/features/cost-factors/overview/) lands in `additional_cost` instead.

## What's not shown

Be aware:

- **Per-location cost.** The breakdown uses each material's `unit cost` field, which is one number per material. If you stock the same component cheaply at one warehouse and expensively at another, the cost view doesn't reflect that — you get a single global number.
- **Time series.** No chart of cost-over-time. You see the *current* state.
- **Assembly BOM margins.** Margin is a BOM-only concept (only BOMs have a Shopify selling price). An assembly BOM shows a unit cost on its own detail page but no margin.
- **Labour, if you modelled it as a virtual material.** The [virtual work-hour pattern](/guides/track-building-cost/) puts labour in as another material row — still in the total, just not visually separated. Model it as an [additional cost](/features/cost-factors/overview/) instead and it gets its own section.
- **Currency.** All values are in your store's currency. There's no per-component currency conversion.

## Improving margin

If the margin is negative (or just smaller than you want), the levers are:

- **Cut component cost.** Source cheaper, switch suppliers, find substitutes. Use the breakdown to find the dominant line.
- **Reduce waste %.** If a component has a high waste %, you're consuming more than the BOM quantity. Better tooling or process can lower it.
- **Raise selling price.** Done in Shopify; not in Assemblified.
- **Re-check labour cost.** If you're using the virtual-hour pattern with stale rates, update the rate. See [Track building cost](/guides/track-building-cost/).
- **Sync the new cost to Shopify.** After improving the calculated cost, push it so Shopify-side reports reflect reality. See [Sync BOM cost to Shopify](/guides/sync-cost-to-shopify/).

## Where to next

- [Track building cost](/guides/track-building-cost/) — make sure labour is in the rollup.
- [Sync BOM cost to Shopify](/guides/sync-cost-to-shopify/) — propagate the calculated cost to Shopify.
- [Composition](/features/bill-of-materials/composition/) — where waste % and quantities live.
- [Settings reference](/features/bill-of-materials/settings/) — toggles that affect cost-related behavior.

<DocUpdated date="2026-11-13" />