Quick answer: Gross profit margin measures how much of each sale remains after the direct cost of the goods or services sold. It is measured as a percentage of selling price, not cost.
Try it: Open the free BuzBolt Profit Margin Calculator. No signup is required.
The gross profit margin formula
Gross profit = selling price − the cost used in the calculation.
Gross profit margin (%) = (gross profit ÷ selling price) × 100.
For a product that costs $60 and sells for $100, gross profit is $40 and gross margin is 40%. If you divide $40 by the cost of $60 instead, you calculate a markup of approximately 66.67%.
Calculate it step by step
- Enter the selling price and the relevant cost using the same currency.
- Subtract cost from price to find the gross profit amount.
- Divide gross profit by the selling price.
- Multiply by 100 to express it as a percentage.
| Cost | Selling price | Gross profit | Gross margin |
|---|---|---|---|
| $60 | $100 | $40 | 40% |
| $80 | $100 | $20 | 20% |
| $100 | $100 | $0 | 0% |
| $120 | $100 | −$20 | −20% |
A negative result means the selling price is below the cost entered. If the selling price is zero, the normal margin formula is undefined because it would require dividing by zero.
Margin and markup are not interchangeable
Margin uses selling price as the denominator. Markup uses cost. For a $50 cost and $75 price, the gross profit is $25; the margin is 33.33%, while markup is 50%. Labelling the two results prevents pricing misunderstandings.
Selling price from a target margin
For a target margin below 100%, use selling price = cost ÷ (1 − margin expressed as a decimal). If cost is $70 and target margin is 30%, the selling price is $70 ÷ 0.70 = $100. This is mathematical pricing, not a recommendation about the correct commercial price.
What costs does this include?
That depends on the number you enter. A basic gross margin calculation might use direct material or production costs. It does not automatically account for every operating expense, tax, financing cost or other obligation. A project can have a positive gross margin but still be unprofitable after other expenses.
Spreadsheet formula
If A2 holds cost and B2 holds selling price, use =IF(B2=0,"N/A",(B2-A2)/B2) and format the cell as a percentage. This flags a zero selling price instead of hiding an undefined result.
Common mistakes
- Dividing by cost when you mean margin.
- Mixing values from different currencies without conversion.
- Ignoring which costs have or have not been included.
- Treating gross profit as the money the owner personally takes home.
- Reporting a margin for a zero selling price as if it were valid.
What gross margin can and cannot answer
A margin is most useful when it is tied to a consistent cost definition. Imagine two products, both sold for $100. One has $60 in the costs you counted; the other has $80. Their calculated gross margins are 40% and 20%. The first leaves more gross profit per unit using those inputs, but this alone does not reveal which item sells faster, costs more to market or produces better cash flow.
Use margin as one indicator rather than a universal measure of success. For service work, specifying what goes into cost is particularly important: one calculation might include only materials while another includes outside labour. Those percentages cannot fairly be compared without explaining the difference.
Double-check the answer
To test a calculated margin, multiply the selling price by the decimal margin. For the $100 sale at a 40% margin, 100 × 0.40 = 40 dollars of gross profit; adding the $60 cost returns the $100 selling price. This inverse check helps catch a misplaced decimal or a markup formula used by mistake.
More reading
- Gross Profit vs Gross Profit Margin: Know the Difference
- How to Calculate Selling Price From a Target Margin
BuzBolt provides general educational tools and explanations. Check your inputs and confirm any legal, tax, accounting or workplace-specific requirements independently where relevant.