Shopify cost of goods sold: how to calculate COGS for your store
Cost of goods sold = beginning inventory + purchases (with freight-in) − ending inventory. Example: $12,000 + $30,000 + $1,500 − $15,000 = $28,500. That is the IRS Schedule C method for a merchant. In Shopify, beginning and ending inventory come from the Month-end inventory value report, and purchases from your supplier bills. Shopify's profit reports give a second figure, the cost recorded on each order; the two agree only when Cost per item matches what you really paid.
The computation of cost of goods sold, line by line
Inventory at beginning of year (Schedule C line 35)
+ Purchases (line 36)
+ Labor, materials and other costs,
including freight-in (lines 37 to 39)
= Goods available for sale (line 40)
− Inventory at end of year (line 41)
= Cost of goods sold (line 42)
- Purchases use the prices you actually pay. Use the price after trade discounts, and deduct returns and allowances (IRS Publication 334).
- Freight-in on merchandise you buy for sale is part of cost of goods sold (IRS Publication 334).
A worked example
| Line | Amount |
|---|---|
| Beginning inventory | $12,000.00 |
| + Purchases | $30,000.00 |
| + Freight-in | $1,500.00 |
| = Goods available for sale | $43,500.00 |
| − Ending inventory | $15,000.00 |
| = Cost of goods sold | $28,500.00 |
| Net sales | $60,000.00 |
| Gross profit | $31,500.00 (52.5%) |
Where each number comes from in Shopify
| Number | Where | Watch |
|---|---|---|
| Beginning inventory | Last period's ending inventory | Should equal last year's closing figure |
| Purchases | Supplier invoices and bills for stock | Prices paid, after discounts and returns |
| Freight-in | Freight bills for stock you bought | Not shipping to customers |
| Ending inventory | Analytics > Reports > Month-end inventory value, set to the last day | Counts On hand units since 1 October 2026, valued at Cost per item |
Two COGS figures, and why they differ
There are two ways to get cost of goods sold, and they rarely match to the cent:
- The inventory method above, from stock values and purchases. Lost or damaged stock lowers ending inventory, so it ends up in cost of goods sold.
- The order method, Shopify's profit reports: the cost recorded on each order, for variants that had a cost when sold (Shopify Help).
The gap usually comes from four places: Cost per item out of date, variants without a cost, freight left out of Cost per item, and stock lost or written off. More in inventory valuation and COGS at month-end.
Where Shopify shows cost of goods sold
Shopify calls it Cost in its profit reports. From your admin, go to Analytics > Reports and filter the Category to Profit Margin:
- Gross profit by product and Gross profit by product variant: net quantity, net sales, cost, gross margin and gross profit.
- Gross profit by POS location: the same columns for each point of sale location.
- Profit margin by order and Average profit margin by market: product costs next to shipping costs, duties and import taxes.
Two rules decide the figure. Profit is reported only for variants that had a cost recorded when they sold, so net sales in a profit report can be lower than in a sales report. And the cost is the Cost per item at the time of sale, which Shopify calls static data (Shopify Help: Profit reports).
How True COGS helps
- Month-end close lists opening inventory, purchases with freight and duty, revaluations, closing inventory and declared stock losses, at what you paid.
- Inventory value shows Shopify's figure for the same stock next to the True COGS figure, and the difference.
- Every delivery is kept with its date and price, so each line of the close can be traced.
Related guides
Questions merchants ask
What is the formula for cost of goods sold?
Beginning inventory + purchases + other costs such as freight-in − ending inventory. For example, $12,000 + $30,000 + $1,500 − $15,000 = $28,500.
Where do I find cost of goods sold in Shopify?
In Analytics > Reports, filter the Category to Profit Margin. Gross profit by product, Gross profit by product variant and Gross profit by POS location show the Cost column, and Profit margin by order shows product costs per order. Profit is reported only for variants that had a cost recorded when they sold.
Does Shopify calculate COGS?
Shopify's profit reports show the cost of units sold, from the Cost per item recorded on each order, for variants that had a cost. For the inventory method, take beginning and ending values from the Month-end inventory value report and add your purchases.
Is shipping included in COGS?
Inbound freight is: the IRS counts freight-in on merchandise you buy for sale as part of cost of goods sold. Shipping orders to customers is a selling cost under IAS 2, not part of inventory cost.
Where do I find beginning and ending inventory in Shopify?
In Analytics > Reports > Month-end inventory value. Set the date to the last day of the period. Beginning inventory is the previous period's ending figure.
Why is my COGS different from Shopify's profit report?
Shopify's report uses the cost recorded on each order and leaves out variants without a cost. The inventory method also picks up freight, lost stock and any cost that was wrong when the orders were placed.
Try True COGS free. True COGS is an inventory costing app for Shopify by Nexus Logic Systems. It records the price you paid on every delivery (a received purchase order or a transfer), with its share of freight and duty on paid plans, keeps every price with its date, and writes your moving weighted average cost, or FIFO cost on a paid plan, to Shopify's Cost per item. It is free for up to 25 variants with a cost on record; paid plans start at $29 a month or $290 a year.
Install from the App Store