Calculate the profit first
Gross profit is revenue minus the cost of goods sold. For an item sold at $100 with a $60 cost, gross profit is $40. This dollar amount is the starting point for both margin and markup.
Margin uses revenue
Gross margin is profit divided by revenue. In the example, $40 ÷ $100 = 40%. It answers: what share of each dollar of revenue remains after the entered cost of goods?
Markup uses cost
Markup is profit divided by cost. Here, $40 ÷ $60 = 66.67%. It answers: how much has been added relative to the original cost? A 40% markup is therefore not the same as a 40% margin.
Reverse the calculation carefully
To price a $60 item at a 40% gross margin, divide cost by 1 minus the desired margin: $60 ÷ 0.60 = $100. Adding 40% to cost instead produces $84. At that price, the $24 profit is only 28.57% of revenue.
Keep scope consistent
Gross profit is not take-home profit. Rent, salaries, financing, taxes, discounts, and returns may still affect the business result. Use consistent accounting definitions when comparing periods. If revenue is zero, margin has no defined denominator; if cost is zero, markup is not applicable. The calculator reports those cases explicitly rather than displaying infinity.
Examples above are arithmetic illustrations, not industry benchmarks.
Try the Profit Margin Calculator