Gross margin calculator

Gross margin is the share of each sale left after the cost of the product. Enter your cost and price to see it, or pick a margin target and get the price that delivers it.

Gross margin calculator

—Selling price
—Profit per unit
—Markup
—Gross margin

Product cost only. Fees, shipping and ads aren't included, so this is gross, not net.

Gross margin % = (price − cost) ÷ price × 100

A $20 product priced at $33.33 has a 40% gross margin, or $13.33 of gross profit. To hit a target instead, divide cost by 1 minus the margin: $20 ÷ 0.6.

Gross margin covers only the direct cost of what you sell, which for an ecommerce brand means product and inbound freight. It doesn't include payment fees, outbound shipping, marketing, software or salaries. That's why it's called gross.

It's still the number that sets a ceiling on everything else. If your gross margin is thin, there's little room left to pay for ads or absorb returns, however well the store converts.

MeasureFormulaCosts counted
Gross margin(price − cost) ÷ priceProduct cost only
Net margin(price − all costs) ÷ priceAlso fees, shipping, marketing and overheads
Markup(price − cost) ÷ costProduct cost only, measured against cost

The markup calculator converts between markup and margin. For a full per-order view, use the Shopify profit margin calculator.

A healthy margin on paper can still lose money per order.

Work out your break-even ROAS from gross margin: divide 1 by the margin. A 40% margin needs a 2.5x return just to cover the product, before any other cost. The break-even ROAS calculator does this for you, including a target-profit mode.

Keep working the numbers.

Common questions about the Gross Margin Calculator

How do you calculate gross margin?
Subtract the cost of the product from the selling price, divide by the selling price and multiply by 100.
What is a good gross margin for ecommerce?
It varies a lot by category and how much you spend on shipping and marketing. Rather than chase a benchmark, check that your margin covers your typical shipping, fees and ad cost with profit to spare.
Is gross margin the same as profit margin?
No. Gross margin only subtracts product cost. Net profit margin subtracts every cost, so it's always lower.
How do I price a product to hit a target margin?
Divide the cost by 1 minus the target margin as a decimal. For a 45% margin on a $18 cost: 18 ÷ 0.55 = $32.73.

Keep the margin you priced for by catching problems early.

No credit card. 7-day free trial.