How it worksPricingLog InSign Up Free

What is gross margin? Difference from Margin

Definition

Gross margin expresses gross profit as a percentage of revenue. A common formula is:

Gross margin

What is gross margin? The share of revenue left after cost of goods sold

Equivalently: Gross margin = gross profit / revenue × 100% Shopify's profit reporting, for example, calculates gross margin from gross profit and net sales. Its product-level documentation also expresses margin as (price - cost) / price.

The important distinction is the denominator: margin measures profit relative to selling revenue, while markup measures profit relative to cost.

Gross profit, gross margin, and markup

These 3 terms are related but not interchangeable. Gross profit is an amount of money. Gross margin and markup are ratios with different denominators.

OptionMetricFormulaResult in $50 cost / $100 price example
Gross profitGross profitRevenue - COGS$50
Gross marginGross marginGross profit / revenue50%
MarkupMarkupGross profit / cost100%

Why margin is useful

Gross margin answers a compact question: after the defined product costs, what share of sales revenue remains to cover everything else? That remaining share still has to support costs such as marketing, payroll, software, rent, payment fees, fulfillment, returns, and taxes depending on how the business classifies those costs. A 50% gross margin is therefore not a 50% net profit margin.

COGS definition comes first

Margin is only as meaningful as its cost definition. If one report uses supplier purchase price as product cost and another uses landed cost including inbound freight/duties, they can report different gross margins on the same selling price. Shopify's profit reports depend on product cost data and net sales; its documentation notes that missing cost data affects reporting. Before comparing products, periods, or platforms, confirm:

  • revenue basis: gross sales, net sales, or another definition
  • treatment of discounts and refunds
  • product cost source
  • inventory/landed-cost treatment
  • currency handling

Margin is not constant when discounts change price

Suppose a product has:

  • cost = $40
  • normal price = $80

At $80:

  • gross profit = $40
  • gross margin = 50%

Now discount the product 20% to $64 while cost remains $40:

  • gross profit = $24
  • gross margin = 37.5%

A 20% price discount did not reduce margin by 20 percentage points from 50% to 30%. The denominator changed too. This is why discount decisions should be calculated, not estimated by intuition.

The target-price formula

If you know unit cost and want a target gross margin, rearrange the margin formula: Price = cost / (1 - target margin) Shopify's current pricing guidance uses this same structure when explaining margin-based pricing. If cost is $40 and target margin is 60%: Price = $40 / (1 - 0.60) = $100 Selling at $100 gives $60 gross profit, and $60 / $100 = 60% margin. A common error is to add 60% to cost: $40 × 1.60 = $64 But $24 profit on $64 revenue is only 37.5% margin. Adding a percentage to cost creates markup, not the same percentage of margin.

Portfolio margin is weighted by revenue, not a simple average of product margins

Suppose:

  • Product A: $900 revenue at 20% margin → $180 gross profit
  • Product B: $100 revenue at 80% margin → $80 gross profit

A simple average of 20% and 80% is 50%, but the combined business is:

  • total revenue = $1,000
  • total gross profit = $260
  • gross margin = 26%

The high-revenue, low-margin product dominates the portfolio. This matters when product mix changes. Overall margin can fall even if no SKU's individual margin changes, simply because more revenue comes from lower-margin items.

Gross margin versus contribution margin

Gross margin generally stops after COGS. A contribution-margin analysis subtracts additional variable costs chosen for the decision, such as payment fees, fulfillment, commissions, or incremental advertising. Do not silently call contribution margin "gross margin." Both can be useful, but they answer different questions. Shopify's current gross-margin educational material also distinguishes gross margin from contribution margin and markup.

The formula

**Gross margin = (revenue - COGS) / revenue × 100%**

Worked example

A product costs $50 and sells for $100.

  • revenue = $100
  • COGS = $50
  • gross profit = $50
  • Gross margin is:
  • $50 / $100 = 50%
  • Markup is:

$50 / $50 = 100% The product has a 50% gross margin and a 100% markup. Saying "we make 100% margin" would be wrong in this example.

Common mistakes

  1. They use different denominators
  2. Gross margin still has to support many non-COGS costs
  3. Portfolio margin should be calculated from aggregate gross profit and revenue, not by averaging percentages blindly
  4. They can reduce the revenue base and change margin materially
  5. Use cost / (1 - target margin) instead

Questions we get asked

Can gross margin be negative?

Yes. If COGS exceeds the revenue recognized for the goods sold, gross profit and gross margin are negative.

Is a higher gross margin always better?

Not in isolation. A lower-margin product can generate more absolute gross profit through volume, and pricing changes can affect conversion, retention, and inventory turnover. Margin is one economic constraint, not the whole business strategy.

Is gross margin the same as profit margin?

"Profit margin" is ambiguous unless qualified. Gross margin is based on gross profit. Operating margin and net margin subtract additional categories of expense.

Should I calculate margin from list price or actual selling price?

For realized economics, use the revenue actually recognized under the reporting definition, not an aspirational list/reference price.

OnVoard's take

Whenever someone says "margin," ask 2 questions: margin of what, and after which costs? For product pricing, the most useful discipline is to keep COGS explicit, calculate margin from actual selling revenue, and never substitute markup just because its arithmetic feels more intuitive.

Try OnVoard free

Every app on every plan. Connect your store and switch on the flows in an evening.

Sign Up Free
Share
Commonly confused with

Sources

All retrieved September 14, 2026
ShopifyGross margin: definition, formula, and examplesshopify.com/blog/gross-margin
ShopifyHow to price a productshopify.com/blog/how-to-price-your-product
Shopify Help CenterProduct details : Cost per item and marginhelp.shopify.com/en/manual/products/details/product-details-page
Shopify Help CenterProfit reportshelp.shopify.com/en/manual/reports-and-analytics/shopify-reports/report-types/profit-reports