The Foundation of
Shopify Profitability
Every profit calculation starts with your Cost of Goods Sold. If that number is wrong, every decision that follows is built on unreliable data.
Cost of Goods Sold (COGS) represents the direct cost of the products your store sells. It determines gross margin, influences pricing and affects how accurately you can evaluate products, discounts and advertising performance. This lesson explains what belongs in COGS, what should stay outside it and how to build a reliable cost foundation for your Shopify store.
COGS explained in 60 seconds.
Cost of Goods Sold is the foundation of every reliable profitability calculation. If your product costs are missing, outdated or incomplete, your margins, pricing decisions and product analysis will all be misleading.
COGS measures the direct cost of what you sell
It includes the costs directly tied to producing or purchasing the products sold during a specific period, not every expense required to run the business.
Accurate COGS is essential for reliable margins
Gross profit and gross margin are calculated from revenue minus COGS. Even a small cost error can make a weak product appear healthier than it really is.
Not every product-related expense belongs in COGS
Product purchase costs, manufacturing inputs and certain inbound costs may belong in COGS, while advertising, salaries and general software expenses usually do not.
Product costs change over time
Supplier increases, exchange rates, freight charges and packaging changes can make old cost data unreliable. COGS must be reviewed and updated regularly.
Missing costs distort every downstream decision
Pricing, discounting, advertising and product prioritization all depend on accurate costs. Without them, Shopify revenue data cannot reveal true profitability.
COGS is not just an accounting number. It is the cost foundation behind every product, margin and profitability decision in your Shopify store.
Every profit calculation starts with COGS.
Revenue tells you how much you sold. Cost of Goods Sold tells you what those sales actually cost. Without accurate COGS, every profitability metric—from gross margin to net profit—becomes unreliable.
Which store understands its profitability?
Store B has lower margins—but better information.
At first glance, Store A appears more profitable. In reality, hundreds of products are missing cost data, making every reported margin unreliable. Store B measures every product accurately, providing a trustworthy foundation for pricing, purchasing and profitability decisions.
Accurate decisions begin with accurate costs.
A higher gross margin means very little if the underlying product costs are incomplete or outdated. Before optimizing pricing, advertising, discounts or product strategy, every Shopify merchant must build an accurate Cost of Goods Sold structure. Reliable COGS is the foundation of every profitability metric you’ll learn throughout this Academy.
A product costs more than its supplier price.
The amount shown on a supplier invoice is only the starting point. Freight, customs duties, packaging and other direct costs can materially increase the real cost of every unit sold.
The anatomy of a €40 product
This simplified example shows how a €24 supplier price becomes a €40 unit cost once every direct expense required to make the product saleable is assigned correctly.
Supplier price
The base amount paid to manufacture or purchase one unit.
Inbound freight
The unit share of transport from the supplier to your warehouse.
Customs duties
Import duties directly connected to bringing the product into stock.
Product packaging
Packaging required to prepare the individual item for sale.
Direct preparation
Inspection, labeling or assembly performed before the item can be sold.
Inventory adjustment
A unit allowance for damaged, lost or unsellable inventory.
True unit COGS
The complete direct cost assigned to every unit sold.
The visible purchase cost shown on the supplier invoice.
Freight, duties, packaging, preparation and inventory adjustments.
The complete product cost that should be used in gross profit calculations.
The real cost is significantly higher than the supplier price alone.
Supplier price is not the same as COGS.
Using only the purchase price understates product cost and overstates gross margin. Accurate profitability begins by assigning every direct cost required to bring the product into a saleable condition. The objective is not to add every business expense to COGS, but to capture every direct product cost accurately.
The 7 COGS mistakes that distort profit.
COGS errors rarely look dramatic inside a Shopify dashboard. They quietly distort product margins, pricing decisions and reported profit until the business begins optimizing numbers that were never accurate.
Missing Product Costs
When a product has no assigned cost, its revenue may still appear in Shopify while the related COGS remains at zero. This makes gross profit and product margin look significantly stronger than they really are.
Products without cost data generated 18% of store revenue during the analyzed period. Their reported margins are unreliable because Shopify recorded the sales but not the cost required to generate them.
Recommended actions
Outdated Supplier Costs
A product cost can be present and still be wrong. Supplier increases, exchange-rate movements, freight changes and updated purchase terms can make historical costs unreliable even when every product appears complete.
Several high-volume products still use costs entered more than six months ago. Recent supplier invoices indicate that their real unit cost has increased, reducing actual margins below the values currently reported.
Recommended actions
Ignoring Inbound Freight
The supplier invoice does not represent the complete cost of bringing inventory into the business. Freight, customs clearance, duties and handling can materially increase the real cost of each unit.
Imported products are currently valued using supplier prices only. Freight and import-related expenses add an estimated 13% to their real unit cost, making reported gross margins materially overstated.
Recommended actions
Excluding Product Preparation
Packaging, labeling, inspection and assembly may look small on an individual unit. When these activities are required to make the product saleable, excluding them understates COGS across every order.
More than half of active products require additional packaging or preparation before sale, but those direct costs are not currently included in their stored unit cost.
Recommended actions
Four cost errors detected. Three remain.
Missing costs, outdated supplier prices, incomplete landed costs and excluded preparation expenses can already make product margins unreliable. The final three mistakes determine whether inventory losses, cost allocation and non-COGS expenses are being treated correctly.
How MarginLab evaluates product cost quality.
Reliable COGS analysis should do more than check whether a cost field contains a number. It should identify incomplete costs, incorrect allocations and expenses that have been classified in the wrong place.
The figures below are a mathematically consistent educational example, not live data from the visitor’s store.
Most products contain cost data, but inventory losses, broad cost allocation and incorrect expense classification reduce the reliability of reported gross margins.
Active products and variants included in the example.
Products with at least one stored cost value.
Three final COGS risks require merchant attention.
Potential annual gross-profit overstatement.
Ignoring Inventory Losses
Damaged, missing, expired or unsellable inventory still represents a real product cost. When these losses are ignored, the cost assigned to sold units remains too low and gross profit appears stronger than reality.
Measure shrinkage, damage and obsolete inventory, then allocate a realistic unit allowance to the products or categories responsible.
Poor Cost Allocation
Freight, duties and preparation costs should not always be divided equally across every unit. Equal allocation can overstate the cost of small products and understate the cost of heavy, valuable or complex items.
Allocate direct costs using the most relevant driver, such as unit quantity, weight, volume, purchase value or preparation time.
Mixing Operating Costs into COGS
Advertising, office software, general salaries and other operating expenses reduce net profit, but they are not normally part of product COGS. Including them in unit cost makes gross margin misleading.
Keep direct product costs inside COGS and classify broader business expenses separately when calculating operating and net profit.
Complete the cost model before trusting the margin.
The store should first account for inventory losses, then improve how shared direct costs are allocated and finally remove operating expenses that do not belong inside product COGS.
This sample analysis demonstrates how COGS quality can be evaluated using cost completeness, cost freshness, landed costs, inventory adjustments and expense classification. Actual MarginLab recommendations depend on each merchant’s Shopify data and configured cost assumptions.
How to build accurate COGS step by step.
Accurate product costs are not created by entering one supplier price and forgetting about it. A reliable COGS system requires complete data, consistent allocation rules, regular updates and a clear separation between direct product costs and operating expenses.
A practical six-step COGS plan
Start with missing product costs, then build a repeatable process for landed costs, direct preparation, inventory adjustments and ongoing cost maintenance.
Audit every product and variant
Begin by identifying products with missing, zero or obviously unrealistic costs. Revenue from these products should not be trusted in product-margin analysis until their unit costs have been completed.
Confirm current supplier costs
A completed cost field can still be inaccurate. Compare stored values with current supplier invoices, manufacturing records and purchase terms before using them in pricing or margin decisions.
Calculate true landed cost
Add the direct expenses required to bring inventory from the supplier into saleable stock. Depending on the product, this may include inbound freight, customs duties, clearance and handling.
Add direct preparation costs
Include packaging, labeling, inspection, assembly and other work required to make an individual product ready for sale. These costs belong in COGS when they can be directly connected to the product.
Account for inventory losses
Damaged, expired, missing and unsellable inventory is part of the economic cost of selling products. Measure these losses and assign a realistic allowance where they occur consistently.
Separate COGS from operating expenses
COGS should contain direct product costs. Advertising, software, office expenses and general salaries still reduce profit, but they should normally remain outside COGS so gross margin stays meaningful.
COGS accuracy is an ongoing process.
Complete the initial cost model, then review supplier prices, landed costs, preparation expenses and inventory adjustments regularly. Reliable product margins depend on costs remaining current—not merely being entered once.
How accurate COGS changed the store’s reported margins.
Incomplete product costs can make an ecommerce store appear more profitable than it really is. This educational example shows how the same revenue and the same orders produce very different reported margins when supplier costs are replaced by a complete COGS model.
The figures below describe a mathematically consistent sample store and do not represent guaranteed MarginLab results.
Previously omitted direct costs are now included in every unit sold.
The reported margin is lower but now reflects the real economics of the business.
The store sold exactly the same products at the same prices.
Pricing, purchasing and profitability decisions are now based on reliable cost data.
What changed inside the COGS model
The store did not increase sales or raise prices. It simply replaced incomplete product costs with a complete and consistent COGS methodology.
Completed supplier costs
Missing purchase prices were added and outdated supplier costs were updated.
+€8,200Allocated landed costs
Freight, duties and import handling were distributed across purchased inventory.
+€9,400Included preparation costs
Packaging, labeling and assembly costs were assigned to each affected product.
+€4,300Recorded inventory losses
Damage, shrinkage and obsolete inventory were incorporated into the cost model.
+€2,900Removed operating expenses
Advertising and administrative costs were excluded from COGS and classified correctly.
Reliable reportingAccurate COGS does not reduce profit. It removes accounting illusions.
At first glance, the corrected store appears less profitable because gross profit is lower. In reality, nothing became worse. The business always had those costs—they simply were not being measured correctly. Reliable COGS creates reliable gross margins, and reliable gross margins lead to better pricing, purchasing and growth decisions.
Is your Shopify COGS really complete?
Use this checklist to verify whether your product costs reflect the real economic cost of inventory sold. A cost model should not be considered reliable until supplier prices, landed costs, preparation expenses, inventory adjustments and cost classifications are reviewed consistently.
Supplier cost coverage
Every active variant has a cost
No product or variant should generate revenue without a valid supplier or manufacturing cost.
Zero costs are investigated
A stored value of zero should only remain when the product genuinely has no direct acquisition cost.
High-volume products are prioritized
Missing costs on bestsellers create the largest distortion in store-level gross profit.
Cost freshness
Supplier prices reflect recent invoices
Stored costs should match current purchase documents rather than historical estimates.
Currency changes are reviewed
Exchange-rate movements can increase acquisition costs even when the supplier price remains unchanged.
Quantity-based pricing is updated
Different order quantities, minimum purchases and supplier tiers should be reflected in unit costs.
Landed cost accuracy
Inbound freight is included
The cost of transporting inventory from the supplier to your warehouse belongs in landed cost.
Duties and clearance are allocated
Customs duties, brokerage and import handling should be distributed across the affected inventory.
Allocation rules match cost drivers
Shared costs should be allocated by quantity, weight, volume or value—not automatically divided equally.
Direct product costs
Packaging costs are included
Boxes, protective materials, labels and other product-specific packaging costs should be reflected in the unit cost.
Direct labor is measured
Assembly, inspection, labeling and other preparation work should be included whenever it can be assigned to individual products.
Preparation costs are allocated consistently
Every product requiring additional handling should absorb its own preparation cost using the same allocation methodology.
Inventory adjustments
Damaged inventory is recorded
Products that cannot be sold should be reflected in the economic cost of inventory.
Shrinkage is monitored
Missing inventory should be measured and reviewed regularly instead of being ignored.
Obsolete stock is reviewed
Unsellable or expired inventory should not remain valued as fully recoverable stock.
Cost classification
Operating expenses stay outside COGS
Advertising, software subscriptions and office expenses should not inflate product costs.
Allocation rules are documented
The business should consistently apply the same methodology whenever shared costs are distributed.
COGS is reviewed regularly
Supplier prices, landed costs and direct product costs should be audited continuously rather than only once.
A reliable margin starts with reliable costs.
If even one part of the cost model is incomplete, every gross margin calculation becomes less reliable. Reviewing supplier prices alone is not enough—every direct cost must be identified, allocated and maintained over time.
Review landed costs
Update freight, duties and import costs whenever new inventory arrives.
Review supplier prices
Verify purchase costs against current invoices and manufacturing data.
Audit the cost model
Review allocation rules, inventory adjustments and cost classifications to maintain long-term accuracy.
Questions every Shopify merchant should ask about product costs.
These frequently asked questions explain how Cost of Goods Sold works, which costs belong in COGS and which expenses should remain separate. Use them to build more reliable gross margins and avoid decisions based on incomplete product costs.
01 COGS fundamentals What is Cost of Goods Sold? +
Cost of Goods Sold, or COGS, represents the direct cost of the products a business actually sells during a reporting period. For a Shopify merchant, it normally begins with the supplier or manufacturing cost of each product sold.
A reliable COGS figure may also include other direct costs required to bring a product into a sellable condition, such as inbound freight, customs duties, import handling, product-specific packaging and direct preparation work. The exact structure depends on how products are sourced, manufactured and prepared.
COGS is deducted from revenue to calculate gross profit. If product costs are missing, outdated or incomplete, the store may report a gross margin that looks stronger than the business economics really are.
Calculate your COGS →02 Included costs What should be included in COGS? +
COGS should include costs that are directly connected to acquiring, producing or preparing the specific products sold. The starting point is usually the supplier invoice price or the direct manufacturing cost of each unit.
Depending on the business model, complete product cost may also include inbound freight, customs duties, import taxes that cannot be recovered, customs clearance, product-specific handling, labeling, assembly, inspection and packaging required before the item can be sold.
The key principle is direct attribution. A cost belongs in COGS when it can reasonably be connected to the units sold. When freight, duties or handling apply to several products, the cost should be allocated using a consistent method such as unit quantity, weight, volume or purchase value.
03 Cost classification What should not be included in COGS? +
General operating expenses should not normally be included in COGS when they cannot be directly attributed to acquiring or preparing the products sold. These expenses belong below gross profit in the income statement.
Typical examples include office rent, general software subscriptions, administrative salaries, accounting fees, general marketing expenses, business insurance and other overhead costs. Payment processing fees, outbound shipping and advertising may reduce contribution profit, but they should usually remain separate from product COGS.
Keeping these categories separate makes the financial model easier to understand. Gross margin then measures the relationship between revenue and direct product costs, while contribution and net profit account for the additional expenses required to sell and operate the business.
Compare gross and contribution margin →04 COGS calculation How do you calculate Cost of Goods Sold? +
At the accounting level, Cost of Goods Sold is calculated by starting with the value of inventory available at the beginning of the reporting period, adding inventory purchases made during the period and subtracting the value of inventory still held at the end.
For product-level analysis, Shopify merchants should also calculate the complete cost of each unit sold. This usually begins with the supplier or manufacturing cost and adds the allocated share of inbound freight, duties, handling, packaging and direct preparation costs.
The quantity sold must then be multiplied by the complete unit cost. When costs vary between purchase batches, the store should apply a consistent inventory valuation method and avoid replacing historical costs with an unrelated current estimate.
Calculate Cost of Goods Sold →05 Margin accuracy Why is accurate COGS important? +
Accurate COGS is essential because it determines the reliability of gross profit and gross margin. When product costs are missing or incomplete, the store may appear more profitable than it actually is.
An overstated gross margin can lead to weak pricing decisions, excessive discounts, unprofitable advertising and incorrect assumptions about which products deserve more inventory or promotion. Even small cost omissions can become significant when multiplied across a large number of orders.
Reliable COGS also improves product comparisons. Merchants can identify which products generate healthy gross profit, which products rely on incomplete costs and which high-revenue items contribute less margin than expected.
Correcting COGS does not reduce the store’s real profit. It reveals the profit that was already being generated and removes the accounting illusion created by incomplete product costs.
Analyze product-level profit →06 Cost maintenance How often should Shopify COGS be updated? +
Shopify product costs should be reviewed whenever a new supplier shipment is received or whenever the purchase price, currency exchange rate, freight charge, customs duty or preparation process changes.
High-volume and high-value products should be checked more frequently because even a small cost error can materially distort reported gross profit. Products with stable domestic pricing may require fewer updates, while imported products with variable freight and currency exposure may need a review for every shipment.
A practical maintenance rhythm is to review landed costs after each shipment, verify supplier prices monthly and complete a broader COGS audit at least once per quarter. Damaged, missing, obsolete or written-off inventory should also be recorded when identified rather than postponed indefinitely.
The objective is not to change costs constantly without evidence. It is to ensure that the cost assigned to each product remains consistent with the real economic cost of acquiring and preparing that product for sale.
Review your gross margin →Six essential COGS questions answered.
You now have the foundations to classify direct costs, calculate complete COGS and maintain more reliable Shopify gross margins.
Turn accurate product costs into stronger pricing decisions.
You now understand what belongs in Cost of Goods Sold and why complete product costs are essential for reliable margins. Continue with the next lessons to turn accurate COGS into sustainable prices, healthier margins and better profitability decisions.
Shopify Pricing Strategy
Learn how to transform complete product costs into sustainable selling prices, protect your target margins and avoid pricing decisions that generate revenue without enough profit.
Gross Margin vs Net Margin
Understand how gross margin differs from net margin, which business costs belong to each calculation and why both metrics are essential for evaluating Shopify profitability.
Break-even ROAS Explained
Learn how product costs influence your break-even ROAS and discover the minimum advertising return required before your campaigns become profitable.
Customer Lifetime Value Guide
Understand customer lifetime value, acquisition economics and how long-term customer profitability supports sustainable business growth.
Discount Strategy for Profit
Learn how to use discounts without destroying margins by balancing promotions, pricing strategy and long-term profitability.
Product Profitability Guide
Bring everything together by analyzing revenue, complete COGS, gross margin and product profitability to identify your biggest growth opportunities.