Skip to content
All blog
Shopify Margin Inventory Malaysia

Cost of goods sold for Shopify stores

David 7 min read

Shopify holds a cost per item against each variant. It is optional, it is not required to sell anything, and on a large share of stores it is blank or was filled in once when the product was created and never revisited.

Which means the store can tell you what sold and cannot tell you what it earned.

What belongs in the cost, and what does not

The distinction that matters: cost of goods sold is the cost of the thing you sold, and it stops there.

In: the purchase price from your supplier. Inbound freight to get it to you. Import duty. Any inbound handling you pay. Packaging that goes out with the product, where it is specific to the product rather than general.

Out: outbound courier charges. Payment processing fees. Advertising. Rent, salaries and everything else that would exist whether or not this particular unit sold.

The excluded items are real costs and they belong further down the profit calculation. Putting them into cost of goods sold makes gross margin unstable in ways that have nothing to do with buying or selling — an ad campaign should not change your gross margin on a product.

Landed cost, not invoice cost. A product bought for one amount and shipped in from overseas costs meaningfully more than the invoice says. Using the invoice price overstates gross margin by the whole of freight and duty, and on imported goods that is not a small error — see importing and foreign currency.

Why the field goes stale

Three reasons, all mundane and all fixable.

Supplier prices move and nobody updates the field. It is not part of anyone's routine, and there is no prompt. A cost entered eighteen months ago describes a purchase price that no longer exists.

Exchange rates move on imported goods. The same supplier price in a foreign currency is a different ringgit cost this quarter than last, and a fixed figure captures one moment.

Bundles and variants get missed. A new variant is created by duplicating an existing one and the cost comes along unchanged, whether or not it applies.

The consequence is that a store can have a cost against every product and still have unreliable margin, which is worse than having none — an obviously empty field prompts caution, and a populated stale field invites confidence.

Which costing method, and does it matter

For most Malaysian retail and ecommerce businesses, the honest answer is that consistency matters more than the choice.

Latest purchase price is simplest and it is what most stores effectively use. Fine when prices are stable, and it misstates margin when they are not.

Weighted average smooths purchase price movements and is what most accounting systems do naturally. Usually the practical answer for a store buying the same lines repeatedly.

Specific batch costing is the most accurate and needs batch tracking through to the sale. Worth it where unit values are high or where batches genuinely differ.

What matters is that whatever your accounting system uses and whatever Shopify holds are reconcilable. If Shopify shows one cost and your accounts value the same stock differently, your Shopify margin report and your accounts will disagree permanently, and nobody will know which to believe.

Where the cost field earns its keep

Four decisions become answerable, and each is made regularly on most stores.

Which products to promote. Discounting the wrong product is easy without cost data, and a promotion on a thin-margin line can lose money at volume — see discounts, vouchers and what they really cost.

Which products to reorder. Turnover matters and margin matters, and a fast-moving product with almost no margin is worse than a slower one with a healthy one — see inventory turnover for Shopee sellers for the mechanics, which apply equally to an own-brand store.

Which products to drop. A line that has never covered its own cost is difficult to identify without the cost recorded, and it consumes shelf space and working capital indefinitely — see dead stock: what to do with products that will not sell.

What to charge. Pricing without knowing cost is guessing with extra steps.

Making it stay current

The practical approach, which is process rather than software.

Set the cost when you receive stock, not when you create the product. The receiving moment is when you know the actual landed cost, and it is a natural point in an existing workflow.

Include freight and duty at receipt, apportioned across the shipment. This is the step most often skipped and it is where most of the understatement comes from.

Review costs when a supplier price changes, prompted by the purchase rather than by a calendar.

Reconcile Shopify's costs against your accounts periodically. A short comparison that catches variants nobody updated and duplicated products carrying inherited costs.

Where purchasing and the store are connected, this happens as a consequence of receiving stock rather than as a separate task — which is the difference between cost data that stays current and cost data that decays — see AI inventory control that works.

Common questions

What should be included in cost of goods sold for an online store?

The supplier purchase price plus inbound freight, import duty, inbound handling and product-specific packaging — in other words landed cost rather than invoice cost. Outbound courier charges, payment processing fees, advertising and general overheads are excluded, because they belong further down the profit calculation and would otherwise make gross margin move for reasons unrelated to buying and selling.

Why is a stale cost figure worse than an empty one?

Because an empty field prompts caution while a populated one invites confidence. Supplier prices move, exchange rates move on imported goods, and duplicated variants inherit costs that may not apply, so a store can have a cost against every product and still report margin nobody should rely on.

Which inventory costing method should a Shopify store use?

Consistency matters more than the choice for most Malaysian retailers. Weighted average is usually the practical answer for a store buying the same lines repeatedly, latest purchase price is simplest but misstates margin when prices move, and batch costing suits high unit values. The important requirement is that Shopify's costs and your accounts value the same stock the same way.

When is the right moment to record a product's cost?

At the point stock is received, not when the product is created, because receipt is when the actual landed cost is known. Freight and duty should be apportioned across the shipment at the same time — that step is the one most often skipped, and it accounts for most of the understatement in reported gross margin.


Related: the real margin on a Shopify order · per-product profitability on your own store · inventory and profit: the connection


See what you could build

Start a free trial and describe what your business needs in plain language — SmartB Studio builds the module for you.

Start free trial
Get started

No credit card · Cancel anytime · Your data stays yours