Shopify guide · Cost per item · Profit margin
Shopify Cost per item: how to add it, update it in bulk and keep it current
Cost per item is the field in the Price section of every Shopify product and variant that holds what one unit costs you. Add it on the product page, or for many products at once in the bulk editor or a CSV import, and Shopify shows margin on the product page and profit for every sale from then on.
Free for up to 10 products · 14-day trial on paid plans
Updated
| Size | Cost per item | Price | Margin |
|---|---|---|---|
| Small | $3.99 | $8.99 | 55.6% |
| Regular | $6.12 | $13.99 | 56.3% |
| Large | $8.78 | $19.99 | 56.1% |
To add Cost per item in Shopify, open a product from Products, click Cost per item in the Price section, enter the cost and save; a product with variants needs a cost on each variant. To update Cost per item in bulk, select products and use Bulk edit, or export your products to CSV, change the Cost per item column and import the file back with “Overwrite products with matching handles”. Shopify records the cost when an order is created, so a cost changed today only affects orders placed from now on.
How do you add Cost per item to a product in Shopify?
You add Cost per item on the product’s details page, in the Price section, and Shopify then shows the projected profit and margin right under it. The steps from the Shopify Help Center:
- In your Shopify admin, go to Products and click the product’s name.
- In the Price section, click Cost per item.
- Enter the cost of one unit in the Cost field.
- Click Save.
Variants need their own cost. If a product has variants (sizes, scents, colors), each variant has its own Cost per item, and Shopify needs a cost on every one of them. A variant left blank is a variant whose sales have no profit in Shopify’s reports.
Once the cost is saved, the Price section shows Profit and Margin. Shopify calculates margin as (price − cost) ÷ price × 100. For the brownie box from this guide:
profit = $13.99 − $6.12 = $7.87
margin = $7.87 ÷ $13.99 × 100 = 56.3%
Two cases where Profit and Margin stay hidden: the product has “Charge tax on this product” selected while your store’s prices include tax, and gift card products, which have no Cost per item. To try other prices against a cost, use the margin calculator; the difference between the two percentages is explained in markup vs margin.
How do you update Cost per item in bulk in Shopify?
Shopify offers two ways to update Cost per item for many products at once: the bulk editor for a few dozen rows, and a CSV import for a whole catalog.
With the bulk editor
- Go to Products and tick the products to change.
- Click Bulk edit.
- Click Columns and add Cost per item. Each variant is a row of its own.
- Type the new costs into the cells (to copy one value to the rows below, drag the cell’s fill handle across them), then click Save.
Source: Bulk editing, Shopify Help Center. Shopify suggests a CSV file instead when you change a large number of products.
With a CSV import
- On the Products page, export the products you want to change, so the file has their handles, titles and variant options.
- In a spreadsheet, fill in the Cost per item column on each variant’s row: a plain number such as
6.12, with no currency sign. - Import the file and select Overwrite products with matching handles; without it, Shopify ignores rows whose handle already exists.
Check before you overwrite. With overwrite on, a column that is in the file but blank clears that value in your store, while a column left out of the file keeps its current value (Using CSV files, Shopify Help Center). Keep the Handle and option columns that identify each variant, since removing a column another one depends on can delete data (taking out the option columns but keeping a variant column can delete variant options). Either import the full export with only the costs changed, or remove just the columns you are not changing, and test on two or three products first.
| Method | Good for | Watch out for |
|---|---|---|
| Product page | One product, or a new product | Every variant needs its own cost |
| Bulk editor | Tens of products or variants after a price change | Slower for large batches; you still work the costs out yourself |
| CSV import | The whole catalog, or costs prepared in a spreadsheet | Blank columns clear values when overwriting |
| Costory | Products you make, costed from their recipes | Products you resell keep the value you enter in Shopify |
Where does Shopify use Cost per item?
Shopify records a variant’s Cost per item with each order when the order is created, and its profit reports subtract that recorded cost from sales.
- On the product page: projected Profit and Margin at the current price.
- In orders: the cost at the moment of the order. Changing Cost per item later does not change earlier orders.
- In profit reports: under Analytics › Reports, the profit margin reports include Gross profit by product, Gross profit by product variant, Profit margin by order and Average profit margin by market.
Shopify reports profit only for products and variants that had a cost recorded at the time they were sold (Profit reports, Shopify Help Center). Sales of uncosted variants are left out rather than counted at zero cost, so missing costs make total profit look smaller and a cost that is too low makes margin look better. The gross margin in reports is based on net sales, so after discounts and refunds it can differ from the margin on the product page.
Cost per item is the per-unit cost of goods sold. How to work that number out for a product you make, with materials, packaging, labor and overhead, is covered in how to calculate COGS per unit.
Why does Cost per item go out of date?
A Cost per item typed by hand is correct on the day you enter it and stays the same while supplier prices move, so every sale after a price rise is recorded at the old cost.
Say the brownie box was costed at $6.12, and dark chocolate then goes from $14 to $16 per kg. The box uses 200 g, so its real cost rises by 0.2 kg × $2.00 = $0.40. If nobody updates Cost per item, a month of 250 boxes looks like this:
| Figure | Cost per item in Shopify | Real cost |
|---|---|---|
| Cost of one box | $6.12 | $6.52 |
| Profit per box | $7.87 | $7.47 |
| Margin | 56.3% | 53.4% |
| Gross profit, 250 boxes | $1,967.50 | $1,867.50 |
| Profit the report overstates | 250 × $0.40 = $100.00 | |
One ingredient, many products
If chocolate goes into twelve products, one price change means twelve costs to redo by hand, plus every variant of each.
Sizes scale differently
A large box uses more chocolate but the same gift box, so its cost does not move by the same amount as the small one.
The past stays wrong
Orders keep the cost they were placed at, so a month of a stale cost stays in that month’s profit report after you fix the field.
A new cost usually means a new price too: how to update Shopify prices when costs go up shows how much to raise each one and how to change them in bulk.
How can Cost per item update itself from recipes?
Costory, a Shopify app, calculates each variant’s cost from its recipe, writes it to that variant’s Cost per item, and writes it again whenever an ingredient price changes.
A recipe lists what goes into one product: ingredients or materials in g, kg, ml, pieces or packs, packaging, and if you like labor minutes and overhead (see labor and overhead costing). Sizes come from option modifiers that scale the lines marked scalable, here every line but the gift box (Starter plan and up). The $6.12 recipe of the regular box has $5.32 of scalable lines and the $0.80 box:
| Variant | Modifier | Calculation | Cost per item | Price | Margin |
|---|---|---|---|---|---|
| Small | ×0.6 | $5.32 × 0.6 + $0.80 = $3.992 | $3.99 | $8.99 | 55.6% |
| Regular | ×1 | $5.32 × 1 + $0.80 = $6.12 | $6.12 | $13.99 | 56.3% |
| Large | ×1.5 | $5.32 × 1.5 + $0.80 = $8.78 | $8.78 | $19.99 | 56.1% |
- Costs are written per variant. Each variant gets its own Cost per item, rounded to your store currency. More in cost per variant.
- A price change flows through. When chocolate goes to $16 per kg, Costory recalculates every product that uses it and writes $6.52 to the regular box, with the reason saved in the cost history. On Growth and Pro, receiving a purchase at a new price does the same.
- Prices can follow. A price rule such as
ending(margin(cost, 55%), 0.99)turns $6.52 into a proposed $14.99, which you confirm or let apply automatically (Starter and up). See margin-based pricing. - You stay in control. “Write costs to Shopify” in Settings turns the sync off; turned back on, it writes the costs that changed meanwhile.
What it does not do: Costory cannot change the cost of orders placed before a cost was written, because Shopify keeps the cost each order was created with. The full picture of how the cost feeds Shopify’s reports is on Shopify COGS from recipes.
What happens to products you resell?
Products you buy and resell without a recipe keep the Cost per item you enter in Shopify, and Costory reads it as their cost for margins and price rules.
- Imported on install. Costory reads your existing Cost per item when you install it, so resold products show a margin from the first day.
- Your edits count. Change a resold product’s Cost per item in Shopify, by hand, bulk editor or CSV, and Costory picks up the new value and recalculates.
- Your value is kept apart. For products Costory writes, the value you had entered is stored separately. If a product loses its Costory cost (its recipe is removed, say), Costory writes your value back, or clears the field if it was empty.
- Purchases can set it (Growth and Pro). A product received through Costory’s purchases takes the cost of its latest receipt, including its share of delivery and other costs (landed cost).
Cost per item sync is on every plan, including Free for up to 10 products with recipes. Paid plans have a 14-day trial. Compare plans
Questions about Cost per item in Shopify
Why are some sales missing from my Shopify profit reports?
Shopify reports profit only for products and variants that had a cost recorded when they sold. A variant whose Cost per item was empty at the time of the order is left out of Gross profit by product and the other profit reports, so a store with half its catalog uncosted sees the profit of only the half that has a cost.
Does changing Cost per item update my past orders?
No. Shopify records the cost when an order is created, so a new Cost per item applies to orders placed after the change and earlier orders keep the cost they were sold at. Fixing a wrong cost today does not correct last month’s profit report.
Why doesn’t Shopify show Profit and Margin for my product?
Shopify shows the projected Profit and Margin in the Price section only once the product has a Cost per item. They are also hidden when the product has “Charge tax on this product” selected and your store’s prices include tax. Gift card products have no Cost per item at all.
What should I include in Cost per item?
Shopify describes it as what it costs you to make or acquire one unit of the product or variant. For a product you make, that is its ingredients or materials and packaging, and you can add labor and a share of overhead. For a product you resell, it is the purchase price, ideally with its share of inbound delivery.
Will Costory overwrite the Cost per item of products I resell?
Not while they have no cost in Costory. Products without a recipe, a manual cost or (on Growth and Pro) a purchase received in Costory keep the Cost per item you entered, and Costory uses it for their margin. If you change it in Shopify, Costory picks up the new value and recalculates.
Can I stop Costory from writing to Cost per item?
Yes. Turn off “Write costs to Shopify” in Costory’s Settings and the field stays as it is while Costory keeps calculating costs for its own margins and price rules. When you turn it back on, Costory writes the costs that changed while it was off.
Related
Shopify COGS
Cost per item calculated from each recipe and kept current when ingredient prices change.
Learn more →How to calculate COGS
The cost of goods sold formula for a month and COGS per unit for pricing, with worked numbers and what belongs in COGS.
Read the guide →Repricing when costs change
How much to raise a price when its cost rises, keep margin or keep markup, price endings, and the ways to change prices in bulk in Shopify.
Read the guide →Let your recipes fill Cost per item.
Free for up to 10 products. Paid plans start with a 14-day trial.
Install free on Shopify