All articles
Business Strategy

How to Calculate Gross Margin on Shopify Products (With Formulas)

Learn how to calculate gross margin on Shopify products with simple formulas, real examples, and a faster way to apply it across your whole catalog.

2026-06-078 min readBy BulkOps Team

Most Shopify merchants can tell you their revenue down to the dollar. Far fewer can tell you their gross margin per product without opening a spreadsheet and squinting. That gap is expensive. You can run a store that grows revenue every month and still slowly lose money, because margin — not sales volume — is what actually pays your rent.

This guide walks through exactly how to calculate gross margin on Shopify products, the formulas you'll use, the mistakes that quietly distort the number, and how to apply margin thinking across a catalog of hundreds or thousands of SKUs instead of one product at a time.

What gross margin actually measures

Gross margin is the percentage of a product's selling price that's left after you subtract what the product cost you to acquire or produce. That leftover is what covers everything else: ads, shipping subsidies, app fees, payroll, and ultimately profit.

The formula is simple:

Gross margin % = (Selling price − Cost per item) ÷ Selling price × 100

Say you sell a Stanley Quencher tumbler for $45 and it costs you $18 landed. Your gross profit per unit is $27. Divide $27 by the $45 selling price and you get 0.60, or a 60% gross margin. Sell a Lodge cast iron skillet for $30 that costs you $19, and your margin is ($30 − $19) ÷ $30 = 36.7%. Same store, wildly different margins — and that difference should change how you price, promote, and advertise each one.

Margin vs. markup — the mistake that costs real money

The single most common pricing error on Shopify is confusing margin with markup. They are not the same number, and treating them as interchangeable will leave money on the table or, worse, set prices below where you think they are.

Markup is calculated on cost. Margin is calculated on selling price.

Take that Lodge skillet costing $19. If you apply a "50% markup," you multiply cost by 1.5 and get a $28.50 price. But your gross margin at $28.50 is only ($28.50 − $19) ÷ $28.50 = 33.3% — not 50%. To actually achieve a 50% margin, you need a price where cost is half the price: $19 ÷ (1 − 0.50) = $38.

The formula to price for a target margin is:

Price = Cost ÷ (1 − target margin)

A 60% margin target on a $19 cost = $19 ÷ 0.40 = $47.50. A 40% target = $19 ÷ 0.60 = $31.67. Keep this formula handy; it's the one that turns a margin goal into an actual price tag.

The number Shopify can't calculate without you: cost per item

Here's the catch. Gross margin depends entirely on accurate cost data, and Shopify only knows your cost if you've filled in the cost per item field on each variant. If that field is blank, Shopify's own profit reports treat your cost as zero — which means every product looks 100% profitable. It's the most flattering, least truthful number in your dashboard.

Before you trust any margin figure, audit how many products are missing cost data. A Carhartt jacket reselling at $99 with no cost entered isn't a 100% margin product; it just has a hole in your data. In BulkOps, the Data Insights & Alerts view surfaces "Missing cost per item" as a priority issue and counts exactly how many SKUs are affected, so you know the size of the blind spot before you start pricing decisions on bad inputs.

Calculating margin across a whole catalog

For one product, the math is trivial. For 800 products across multiple vendors and price points, doing it by hand is where the wheels come off. This is where merchants either give up or build a fragile spreadsheet they update once a quarter and never look at again.

A more durable approach is to think in margin tiers and let rules do the arithmetic. Group products by cost and assign target margins by category. Apparel like Lululemon-style leggings might carry a 65% target because perceived value is high; commodity Yeti-style drinkware might sit at 45% because shoppers comparison-price it relentlessly; clearance Patagonia overstock might drop to a protective 25% floor you never want to cross.

BulkOps' Pricing Rules are built for exactly this. You define a formula like price = cost ÷ (1 − 0.55) once, apply it to a filtered set of products, and every matching SKU gets repriced to hit that margin — no per-product math. The Products bulk editor includes a "Low margin" smart tab that automatically gathers everything falling below a healthy threshold, so the products that need attention come to you instead of hiding in a 40-page product list.

A worked example: finding the leaks

Imagine you run a 500-SKU outdoor goods store. You pull margins and find:

  • Drinkware averages 58% margin — healthy, leave it alone.
  • Apparel averages 61% — strong, but 12 jackets are sitting at 22% because costs rose and prices never moved.
  • Accessories show a "92% margin" — suspicious, and on inspection 40 of them simply have no cost entered.

The action items write themselves. Fix the 40 missing-cost accessories so the number becomes real. Reprice the 12 underwater jackets using your target-margin formula. Leave the healthy categories alone. That's a focused afternoon of work that protects thousands of dollars in annual profit — and it only became visible once margin was calculated accurately and at scale.

Don't forget the costs margin doesn't include

Gross margin is deliberately narrow: price minus product cost. It does not account for payment processing (~2.9% + $0.30 on Shopify Payments), shipping you absorb, returns, or ad spend. A product with a 50% gross margin and a $40 customer acquisition cost can still be unprofitable on the first order.

So treat gross margin as your first filter, not your final answer. It tells you which products have room to absorb marketing and operational costs and which don't. A 30% gross-margin product has very little cushion for paid acquisition; a 65% product can fund aggressive growth. Knowing the difference is what separates merchants who scale profitably from those who scale themselves into a hole.

Make margin a number you actually see

The merchants who win on margin aren't doing fancier math — they're just looking at the number regularly and acting on it. Calculate gross margin correctly, keep margin and markup straight, make sure every product has real cost data behind it, and revisit your low-margin products on a schedule instead of in a panic.

If you'd rather not maintain a margin spreadsheet by hand, BulkOps calculates per-product margin from your cost data, flags low-margin and missing-cost products automatically, and lets you reprice to exact margin targets with formula-based rules — across your entire catalog in one pass. Try it free and see where your real margins actually stand.

Shopify gross margin calculationShopify profit margin formulaShopify margin vs markupShopify cost per item

Try BulkOps free on your store

Everything covered in this article is built into BulkOps. Free plan for stores up to 50 products — no credit card required.

Add to Shopify — Free

Was this helpful?