Skip to content
Ecomwith
Definition

What is gross margin?

Gross margin is the share of net sales left after cost of goods sold: gross profit divided by net sales.

Direct answer

Gross margin is gross profit divided by net sales, where gross profit is net sales minus cost of goods sold. Shopify's analytics define it this way and need Cost per item to be set for accurate results. Gross margin leaves out advertising and overhead, so it is a starting point for pricing, and contribution margin is the number to use for ad decisions.

Sources and review

Last checked: 2026-11-03
  • Analytics fields reference - Shopify Help CenterShopify · Official documentation · 2026-11-03
    • Gross profit is net sales minus cost of goods sold and needs cost of goods sold to be set up in Shopify.
    • Gross margin is gross profit divided by net sales.
  • Finance reports - Shopify Help CenterShopify · Official documentation · 2026-11-03
    • Only net sales with cost recorded at the time of sale are included in the Cost of goods sold report and count toward gross profit.
  • Gross margin - WikipediaWikipedia · Reference · 2026-11-03
    • Margin is markup divided by 1 plus markup; a 100% markup equals a 50% margin and a 40% margin equals about a 66.7% markup.
    • Cost of goods sold covers costs directly tied to making or acquiring the product and excludes indirect costs such as rent and administration.
  • Ecomwith worked example and decision frame · The illustrative arithmetic and the common misreading on this page.

Applies to: Use this answer as a definition and worked example. Verify current platform, processor and account facts before acting.

Limitations: The page does not prove a ranking, approval, revenue, profit, or conversion outcome. Platform definitions, thresholds and report names can change.

Reviewed by: Ranfeng Wei · Next review: 2027-02-01

  • Gross margin = gross profit ÷ net sales; gross profit = net sales − COGS → Analytics fields reference - Shopify Help Center, Finance reports - Shopify Help Center
  • Markup and margin conversion; what COGS includes → Gross margin - Wikipedia
  • Worked example and misreading (illustrative arithmetic) → Ecomwith worked example and decision frame

Why this matters

Gross margin tells you how much of each sale is left to pay for ads, fees, shipping and overhead. A product with a thin gross margin cannot absorb discounts or paid traffic.

Formula

Gross margin % = (net sales − COGS) ÷ net sales × 100. Markup is profit over cost, so margin = markup ÷ (1 + markup), and price = cost ÷ (1 − margin).

Worked example

A product sells for $60 net and costs $33. Gross profit is 60 − 33 = $27, so gross margin is 27 ÷ 60 = 45%. Markup is 27 ÷ 33 ≈ 81.8%, and 0.818 ÷ 1.818 ≈ 45% gets back to the margin. To reach a 45% margin on a $33 cost, the price is 33 ÷ 0.55 = $60. The numbers are illustrative.

What to check

Use this term as an operating checkpoint, not just a glossary definition.

  • Set Cost per item in Shopify; only net sales with a recorded cost enter the Cost of goods sold report and gross profit.
  • Decide what belongs in COGS and keep that definition fixed.
  • Calculate margin after discounts, per SKU, not only for the whole store.
  • Use contribution margin, not gross margin, when you set an ad budget.

Common mistake

Mixing up markup and margin, or reading a 45% gross margin as 45% profit. Gross margin comes before advertising, most fees and overhead, so the money left for the owner is much lower.

FAQ

What is the difference between gross margin and contribution margin?

Gross margin deducts cost of goods sold only. Contribution margin goes further and deducts variable costs such as shipping, payment fees and refunds, which makes it the better basis for ad decisions. See the contribution margin answer.

What is the difference between markup and margin?

Markup measures profit against cost; margin measures it against selling price. A 100% markup is a 50% margin, and a 40% margin is about a 66.7% markup. Mixing them up leads to prices that are too low.

What should go into cost of goods sold?

Costs directly tied to making or acquiring the product sold, such as materials, supplier cost and inbound freight. Indirect costs such as rent and admin are left out. Decide how to treat shipping to customers and payment fees, then keep the choice consistent.

Where do I find gross margin in Shopify?

The Finance Summary report has a Gross profit breakdown card, and the analytics fields define Gross margin as gross profit divided by net sales. Both need Cost per item to be filled in, and orders without a recorded cost are left out.

Useful page? Share it

Copy the link or share this page directly with a teammate, friend, or partner.