Gross Margin Calculator
Gross margin is the share of each sale left after the unit's cost, expressed as a percentage of the selling price. Subtract cost from price, then divide by price and multiply by 100. Markup, by contrast, divides that profit by cost. Enter price and cost to get margin, profit and markup instantly.
Margin divides profit by price; markup divides the same profit by cost.
The formula
Worked example
Selling at $50 with a unit cost of $20: gross profit = 50 − 20 = $30. Margin = 30 ÷ 50 × 100 = 60.0%, while markup = 30 ÷ 20 × 100 = 150.0% — same profit, different base.
Stop calculating by hand
Logistified computes this across your whole Shopify catalog automatically — from live sales data — and turns it into reorder alerts and purchase orders.
Frequently asked
What is the difference between margin and markup?
Both start from the same profit (price minus cost) but divide by different bases. Margin divides profit by the selling price; markup divides profit by the cost. A 50% markup on a $20 cost gives a $30 price, but only a 33% margin. Margin is always the smaller of the two.
How do I price for a target margin?
Rearrange the margin formula: price = cost ÷ (1 − target margin). For a 40% margin on a $20 unit, price = 20 ÷ (1 − 0.40) = $33.33. Pricing off margin keeps profitability consistent even as costs change.
Is gross margin the same as gross profit?
No. Gross profit is the dollar amount left after cost (price minus cost). Gross margin expresses that profit as a percentage of the selling price. Profit tells you how much; margin tells you how efficient the sale is relative to its price.