Understanding the Cost of Goods Sold (COGS) is essential for running a successful Shopify store. When you know exactly how much it costs to produce or source your products, you can price them better and make smarter business decisions.
If you’re new to Shopify or looking to streamline your store’s finances, this guide will explain everything you need to know about COGS, from its definition to how you can track it effectively in Shopify.
Let’s dive in!
Key Takeaways
- COGS represents the direct production costs of items sold, encompassing materials and labor. It excludes indirect expenses like distribution and marketing.
- Materials, labor, and operations are the key elements that are pivotal in determining this essential metric.
- In the intricate world of retail, understanding the nuances of Shopify Cost Per Item is essential, serving as the linchpin for managing cash flow effectively, strategic tax management, and precise expense tracking for profitability.
What Is Shopify Cost of Goods Sold (COGS)?
Cost of goods sold is the total direct cost of producing or purchasing the products you sell. If you buy phone cases for $3 each and sell them for $12, your COGS per unit is $3.
On Shopify, COGS shows up in your product setup (the "Cost per item" field) and in your analytics reports. It's the number Shopify uses to calculate your profit margin on each product and across your entire store.
Here's the thing: COGS only covers direct costs. The money you spend on making or buying the product itself. It doesn't include your Shopify subscription, your marketing budget, or your office rent. Those are operating expenses, and mixing the two up will give you a distorted picture of your margins.
Why COGS Matters for Your Store:
COGS isn't just an accounting number. It directly controls three things that determine whether your store survives or grows.
- It controls your profit margins. According to a 2024 NIQ report, a 1% increase in pricing can improve margins by around 11%. But if your COGS is rising at the same time and you don't notice, that margin gain disappears. You can't manage what you don't measure.
- It affects your taxes. COGS is a deductible business expense. If you undercount your COGS, you're paying more tax than you need to. If you overcount it, you're setting yourself up for an audit. Either way, getting it right matters.
- It drives your pricing. Here's a formula worth memorizing: Price = COGS / (1 – target margin). If your COGS is $20 and you want a 50% margin, your minimum price is $40. Without knowing your COGS, you're pricing blind.
What Counts as COGS (and What Doesn't)
This is where most merchants make their first mistake. They either include too much or leave out costs that should be counted.
- Costs that count as COGS:
- Raw materials or wholesale purchase price
- Inbound shipping and freight (getting products to your warehouse)
- Import duties and customs fees
- Direct labor (assembly, packaging, quality control)
- Manufacturing overhead is directly tied to production
- Packaging materials (boxes, inserts, labels)
- Costs that are NOT part of COGS:
- Marketing and advertising spend
- Shopify subscription and app fees
- Rent and utilities for your office
- Administrative salaries
- Outbound shipping to customers (unless you absorb it into the product price)
- Payment processing fees (Shopify Payments, Stripe, etc.)
One common gray area: what about shipping to customers? If you offer "free shipping" and bake the cost into your product price, you could argue it belongs in COGS. But standard accounting practice treats outbound shipping as a separate line item. Talk to your accountant if you're unsure.
Cost Of Goods Sold Formula With a Real Example
This widely accepted Cost of Goods Sold Shopify formula used by accountants simplifies the calculation:
(Beginning Inventory + Purchases During the Period) – Ending Inventory = COGS
Let’s break down the formula with an example for clarity. Suppose a company starts the year with a beginning inventory valued at $50,000. Throughout the year, they make purchases totaling $100,000. By the year-end, the remaining inventory is valued at $30,000. Applying the COGS formula:
($50,000 (Beginning Inventory) + $100,000 (Purchases)) – $30,000 (Ending Inventory) = $120,000 COGS
In this scenario, the Cost of Goods Sold for the year equals $120,000. This figure represents the total cost incurred by the company in producing and selling its goods during the specified period. By accurately calculating COGS, businesses gain crucial insights into their profitability, aiding in pricing strategies, financial planning, and overall decision-making processes.
Three Inventory Valuation Methods
The COGS formula above assumes every unit costs the same. In reality, supplier prices change over time. The method you choose to value inventory directly affects your reported COGS and, by extension, your profit and tax bill.
| Method | How it works | Best for | COGS in rising prices |
|---|---|---|---|
| FIFO (First In, First Out) | The oldest inventory is sold first | Perishable goods, fashion, seasonal items | Lower COGS, higher profit reported |
| LIFO (Last In, First Out) | The newest inventory is sold first | Non-perishable goods, inflation hedging | Higher COGS, lower taxable income |
| Weighted Average | Uses average cost across all units | Large SKU catalogs, fluctuating costs | Middle ground |
FIFO is the most common for Shopify stores. If you bought 100 units at $10 in January and 100 units at $12 in March, FIFO assumes you sell the $10 units first. This gives you a lower COGS and higher reported profit.
LIFO does the opposite. It assumes you sell the $12 units first, which increases your COGS and lowers your taxable income. One important caveat: LIFO is allowed under US GAAP but not permitted under IFRS (International Financial Reporting Standards). If you sell internationally or operate outside the US, LIFO probably isn't an option.
Weighted Average takes the total cost of all units and divides by the total number of units. In the example above, the average cost would be $11 per unit. This is the simplest method and works well if your costs don't vary dramatically.
Whichever method you pick, be consistent. Switching methods mid-year creates accounting headaches and can raise flags with tax authorities.
How To Calculate Shopify COGS: A Step-by-step Guide
Shopify doesn't calculate COGS automatically. You need to set it up. Here's how.
Step 1: Enable Inventory Tracking:
In Shopify Admin, click "Products" in the left sidebar. You'll see your full product list with inventory counts, status, and categories. Pick the product you want to set up COGS for and click into it.
Step 2: Enter your cost in the Pricing section
Scroll down to the Pricing section. You'll see the Price field (what customers pay) and below it, the Cost field (what you paid for the product)
Fill in your Cost. Shopify instantly calculates and displays your Profit and Margin percentage right next to it. If that margin looks too low, you know before you even publish the product.
Step 3: Check your COGS report
- Go to Analytics > Reports in the left sidebar
- Scroll down to the Finances category and open the "Cost of goods sold by order" report
This report breaks down your COGS by day, order name, product title, and variant, so you can track exactly how much each sale costs you.
The report pulls data from every product where you've entered a Cost value. If a product shows "None" across all columns, it means either no sales happened or the Cost field is empty for that product.
Do this for every product in your store. Then review the report at least monthly. Waiting until the end of the quarter means three months of margin erosion you could have caught earlier.
Read more: How To Purchase Shopify Plans | Step-by-step Guide
COGS vs Operating Expenses vs Cost of Revenue
These three terms get mixed up constantly. The confusion can cause real problems when you're filing taxes or reviewing your P&L, so it's worth getting this right.
COGS vs Operating Expenses
Operating expenses are the costs of running your business. COGS is the cost of making or buying what you sell. Your $39/month Shopify plan is an operating expense. The $4 you pay your supplier per unit is COGS.
Why does this matter? Because your gross profit margin only accounts for COGS. If you accidentally lump operating expenses into COGS, your gross margin looks worse than it actually is, and you might raise prices when you don't need to.
COGS vs Cost of Revenue
Cost of revenue is a broader term. It includes COGS plus any additional costs tied to delivering the product or service. For a SaaS company, cost of revenue might include server costs and customer support staff. For most Shopify stores selling physical products, COGS and cost of revenue are essentially the same thing.
COGS vs Cost of Sales
These two terms are interchangeable. "Cost of sales" and "cost of goods sold" mean the same thing. You'll see both used in accounting software and Shopify reports. Don't overthink it.
Common COGS Mistakes to Avoid
These are the errors I see most often, and each one quietly eats into your margins:
- Forgetting inbound shipping costs. Your product might cost $5 from the supplier, but after freight, customs, and handling, the true cost is $7.50. If you only enter $5 as your Cost in Shopify, your margin reports are lying to you.
- Using the same COGS across all sales channels. Selling on Shopify Direct, Amazon FBA, and a retail partner all carry different fee structures. Amazon FBA fees alone can add $3 to $8 per unit. If you track a single COGS number across all channels, you won't see which channel is actually profitable.
- Not accounting for returns. When a customer returns a product, the revenue disappears, but the COGS doesn't always get adjusted. If your return rate is 10%, you need to factor that into your effective COGS per sold unit.
- Ignoring packaging costs. Custom boxes, tissue paper, thank-you cards, stickers. These "small" costs add up. A $2 packaging cost on a $15 product is a 13% hit to your margin.
- Never updating costs when suppliers change prices. If your supplier raised prices six months ago and you haven't updated the Cost in Shopify, every report you've run since then is inaccurate.
- Tracking COGS in spreadsheets instead of your system. Spreadsheets drift. They don't sync with your actual sales data. Use Shopify's built-in cost tracking or integrate with accounting software that pulls data automatically.
Bottom Line
Understanding Shopify’s Cost of Goods Sold is pivotal for e-commerce success. With this insight, businesses can streamline operations, enhance profitability, and make strategic decisions that drive sustainable growth in the competitive online marketplace.
FAQs
Frequently Asked Questions
How can I calculate COGS on Shopify?
To calculate COGS, add up the costs of raw materials, manufacturing, labor, and other expenses directly associated with producing the goods sold within a given timeframe. Subtracting the ending inventory value from the beginning inventory value provides the total cost of goods sold.
Does Shopify automatically calculate COGS?
Shopify does not automatically calculate COGS. Merchants need to input their product costs manually within the admin dashboard. This process involves updating the costs as they fluctuate due to market changes or other factors.
Can I switch between FIFO and LIFO valuation methods?
You can, but you shouldn't do it frequently. Switching methods changes your reported COGS and profit, which complicates your financial history. Pick one method and stick with it. If you need to switch, do it at the start of a fiscal year and consult your accountant.
What's a healthy gross margin for a Shopify store?
It varies by industry. According to NYU Stern's margin data, apparel typically runs 50% to 60% gross margin, while electronics are closer to 15% to 25%. The important thing is that your margin is stable or improving quarter over quarter, and that it covers your operating expenses with profit left over.
