Recording cost of goods (COGS) in Shopify
By the AdZoom team · Published
Shopify stores a product's cost in the Cost per item field, one value for each variant. Cost of goods sold, or COGS, is that cost added up over the units you sold, and Shopify's profit figures are built on it.
Without it, every profit number that depends on it is wrong or missing. Shopify's profit reports cover only products that had a cost when they were sold, and its Cost of goods sold field shows a missing cost as $0.
Where the Cost per item field is
Shopify's page Adding cost per item to products gives these steps, read on 14 November 2026.
- From your Shopify admin, go to Products.
- Click the name of a product.
- In the Price section, click Cost per item.
- In the Cost field, enter the cost of the product.
- Click Save.
A product with variants needs a cost on each variant. That is a rule on the same page. The bulk editor in the next section gives a variant its own row.
Once a product has a cost, its Price section shows the projected Profit and Margin. Shopify calculates the margin as price minus cost, divided by price, times 100. At a Shopify store that sells olive oil, a bottle priced at $24.00 with a cost of $6.75 has a profit of $17.25 and a margin of 71.88%.
The same page names two exceptions. Cost per item doesn't apply to gift card products. And when your store's prices include tax and the product has Charge tax on this product selected, Shopify doesn't display its profit and margin.
Setting the cost for many products at once
Shopify's page names two ways to add costs to all your existing products at the same time, the bulk editor and a CSV import.
The bulk editor
These are the steps on Shopify's page about bulk editing.
- In your Shopify admin, click Products.
- Use the checkboxes to select the products you want to edit.
- Click Bulk edit.
- To add a property to the table, click Columns and select it. Here that property is the cost. Shopify's page on the inventory bulk editor lists it as Cost per item.
- Click a field in the table and type the cost.
- Click Save.
Each row of the table is a product or one of its variants, so the variants of a product can be filled in on one screen.
A CSV import
In a product CSV file the column is named Cost per item. Shopify's list of CSV columns describes it as how much it costs you to make or acquire the product or variant, written as a number with no currency symbol, for example 9.99.
- Go to Products and click Export. Choose which products to export and the CSV type, then click Export products. The steps are on Shopify's export page. Keep an untouched copy of the file as a backup.
- In the file, enter each cost in the Cost per item column.
- Go to Products and click Import. Click Add file and select the CSV file.
- Select Overwrite products with matching handles. Without it, Shopify ignores the products in the file that match an existing handle.
- Click Upload and continue, review the details, then click Import products.
Two rules on Shopify's import page matter here. A column that is missing from the file leaves the values in your store as they are. A blank cell in a column that is present overwrites the value in your store with a blank. So change only the Cost per item cells, and remember that an empty one erases a cost that was there. The file can't exceed 15 MB, and an import can't be canceled once it begins.
What happens to past orders when you change a cost
Nothing. Shopify's cost per item page says the cost is recorded on an order when the order is created. A new cost isn't applied to orders created before the change, and the profit reports for those orders still use the earlier cost.
That works for you when a supplier raises a price. Last month's profit stays what it was. It works against you when the field was empty. Shopify's profit reports leave out a sale when the variant had no cost at the time. So a cost entered today brings sales into those reports from today forward. The sooner the field is filled, the fewer orders are left out.
Which Shopify reports use the cost
Shopify's profit reports are Average profit margin by market, Gross profit by product, Gross profit by product variant, Gross profit by POS location, and Profit margin by order. To find them, go to Analytics › Reports, click the Category filter, and choose Profit Margin.
The two product reports have five columns: Net quantity, Net sales, Cost, Gross margin, and Gross profit. Cost is the total cost of the units sold in the period, which is your COGS. Gross profit is net sales minus cost. Gross margin is net sales minus cost, divided by net sales, times 100.
Net sales come after discounts and refunds, so the margin in a report can be lower than the one on the product page, which uses the full price. Shopify's own example is a T-shirt priced at $20 with a cost of $10. Its margin is 50% on the product page and 33% in the report once it sells at 25% off, for $15.
The cost also feeds fields you can use in other reports: Cost of goods sold, Gross profit, Gross margin, Net sales with cost recorded, and Net sales without cost recorded. The last one measures the gap. It is the net sales of items whose cost wasn't recorded.
What to put in the cost
Shopify's page offers a starting point. If you resell a product, enter the price you paid the manufacturer, leaving out taxes, shipping, and other costs. If you make it, enter a value based on labor and materials.
The rest is your accounting choice, and nothing below is an official rule. Take the olive oil store again. Its supplier's invoice reads like this.
| Invoice line | Amount |
|---|---|
| 500 bottles, 8 oz, at $6.20 each | $3,100.00 |
| Freight to the store's stockroom | $275.00 |
| Invoice total | $3,375.00 |
The store also buys gift boxes at $0.85 each and packs every bottle in one. It sells the bottle for $24.00. That leaves three costs it could enter.
| The cost includes | Working | Cost per item | Margin at $24.00 |
|---|---|---|---|
| Supplier price only | $3,100.00 ÷ 500 | $6.20 | 74.17% |
| Supplier price and inbound freight | $6.20 + ($275.00 ÷ 500 = $0.55) | $6.75 | 71.88% |
| Supplier price, inbound freight, and the gift box | $6.75 + $0.85 | $7.60 | 68.33% |
Each choice has a consequence.
- Supplier price only. The easiest to keep current, and the one Shopify's page suggests for a reseller. Freight and boxes still cost money. If nothing else subtracts them, profit is overstated by $1.40 on every bottle.
- With inbound freight. Closer to what a bottle has cost you by the time it is on your shelf. The freight share changes with every shipment, so the cost needs a new figure when the next invoice arrives.
- With packaging. Works when every unit leaves in the same packaging. A shipping box shared by three items in one order doesn't divide per item, so count that kind of packaging with your shipping costs.
Pick one method and use it on every product, so margins compare like with like. The margin it gives you is the one your ad math rests on. A cost that is too low raises the margin and lowers the break-even ROAS you think you need. To see what each choice does to an order, try the numbers in the Shopify profit calculator.
What breaks when cost is missing
Shopify's pages describe two treatments of a sale with no cost. The profit reports page says profit "is reported only for products and variants that had a cost recorded" when they were sold, so those sales are left out. The Cost of goods sold field carries the note "Missing costs display as $0."
Here is one month at the olive oil store under both treatments, next to the real figures. The store had 100 orders of one item each, with no discounts or refunds. The gift set was new that month and nobody entered its cost.
| Variant | Orders | Price | Cost per item in Shopify |
|---|---|---|---|
| 8 oz bottle | 60 | $24.00 | $6.75 |
| 16 oz bottle | 25 | $38.00 | $11.40 |
| Gift set | 15 | $58.00 | None. It really costs $21.00. |
The arithmetic below applies each of Shopify's two rules to those 100 orders.
| Line | Real | Missing cost counted as $0 | Sales without cost left out |
|---|---|---|---|
| Net sales, 8 oz (60 × $24.00) | $1,440 | $1,440 | $1,440 |
| Net sales, 16 oz (25 × $38.00) | $950 | $950 | $950 |
| Net sales, gift set (15 × $58.00) | $870 | $870 | Left out |
| Net sales | $3,260 | $3,260 | $2,390 |
| Cost, 8 oz (60 × $6.75) | $405 | $405 | $405 |
| Cost, 16 oz (25 × $11.40) | $285 | $285 | $285 |
| Cost, gift set (15 × $21.00) | $315 | $0 | Left out |
| Cost | $1,005 | $690 | $690 |
| Gross profit | $2,255 | $2,570 | $1,700 |
| Gross margin | 69.17% | 78.83% | 71.13% |
Neither column matches the real one. With the missing cost counted as $0, gross profit reads $2,570. That is $315 more than the store made, and every dollar of it is the cost of the 15 gift sets. With those sales left out, the report is short by 15 orders and $870 of sales, and it shows $555 less profit than the store made. The margin is wrong both times, at 78.83% or 71.13% against a real 69.17%.
It gets worse when ads sell the product with no cost. Say one campaign sold those 15 gift sets. A profit figure that counts their cost as $0 treats all $870 as gross profit, when the real figure is $555. Per order that is $58.00 against $37.00, before shipping, tax, and the ad spend come off.
To size the gap in your own store, use the Net sales without cost recorded field in a report. By its definition it would be $870 for this month.
AdZoom reads the cost per item from Shopify and tells you how many orders include items with no cost recorded, so you know when profit is overstated.
The fix is the same in every case. Enter the cost on the variant in Shopify, and Shopify's reports are right from the next order on.