What it measures
Gross profit margin measures the share of a product’s selling price that remains after deducting the direct cost of that product. It answers a simple question: out of every unit of currency a customer pays, how much is left to cover all other expenses? Sellers, sales managers and founders use it to check whether a price leaves enough room, to compare products, and to prepare discount or pricing decisions. It is a per-product gross margin, not the net profit margin of the business.
Explain this formula
Subtract the unit direct cost from the selling price: the difference is the gross profit per unit, a currency amount. Divide that gross profit by the selling price and multiply by 100 to obtain the gross margin in percent. The denominator is the price the customer pays, not the cost, which is why a margin can never exceed 100 % as long as the cost is positive.
If you add the number of units sold, the calculator multiplies the price by the units to give total revenue and the gross profit per unit by the units to give total gross profit. The percentage does not change with volume: it describes the structure of one sale, while the totals describe a period.
Three figures are easy to confuse. Sales revenue is everything the customer pays (excluding taxes). Gross profit is what remains after the direct product cost. Gross margin is that gross profit expressed as a percentage of revenue. None of them is net profit, which only appears after operating expenses, interest and income tax.
What each term means
- Selling price
- Price per unit before VAT/sales tax unless explicitly selected.
- Where to find it: The price actually charged for one unit, excluding VAT or sales tax. If the item is usually sold with a discount, enter the discounted price rather than the list price. Must be greater than zero.
- Unit direct cost
- Comparable per-unit direct cost; the cost basis determines type of margin.
- Where to find it: The direct cost of one unit: purchase or production cost, plus costs needed to make it sellable, such as inbound freight, import duties or packaging, depending on your accounting convention. Exclude recoverable VAT. Do not add rent, marketing or administrative salaries.
- Units sold (optional)
- Units sold in the period, to turn the per-unit result into a total.
- Where to find it: Optional. Units sold over the period you want to analyse, net of returned units. Leave empty to see the per-unit result only.
- Gross profit per unit
- Sale price minus comparable direct unit cost, before other expenses.
- Gross margin (%)
- Gross profit divided by selling price, expressed as a percentage.
Worked example
Hypothetical example: a product sells for 100 (excluding taxes) and its direct cost is 60 per unit.
- Gross profit per unit100 − 60 = 40
- Gross margin (%)40 ÷ 100 × 100 = 40%
Gross margin (%) = 40%
100 − 60 = 40 of gross profit per unit; 40 ÷ 100 × 100 = a 40 % gross margin. If 500 units were sold in the period, revenue would be 50,000 and total gross profit 20,000. If the unit cost rose to 65 with the same price, gross profit would fall to 35 and the margin to 35 %; if instead the price rose to 110 with a cost of 60, gross profit would be 50 and the margin about 45.45 %.
Hypothetical numbers, used to show the calculation. Not real company data.
When and why to use it
Use this calculator before quoting, when reviewing a price list, or when a supplier changes its costs. A margin computed per product shows immediately whether a cost increase is being absorbed by the seller instead of passed on.
It is also the starting point for discount decisions. A product with a 40 % gross margin and a product with a 15 % gross margin cannot take the same promotion: the second one has much less room before each sale stops covering its own direct cost.
Finally, use it to compare products or channels on the same definitions. If one channel adds payment fees or shipping that another does not, compute both margins with the same cost basis, or switch to the contribution margin calculator to include those variable costs explicitly.
Revenue, gross profit and margin: three different numbers
A sale of 100 is revenue, not profit. If the product cost 60, the gross profit is 40 and the gross margin is 40 %. That 40 is not what the business keeps: salaries, marketing, rent, software, interest and taxes still have to be paid out of it. Calling a 40 % gross margin a “profit of 40 %” leads to over-optimistic plans.
What you put in the unit cost decides which margin you obtain. A retailer typically includes the purchase price, inbound freight and duties. A manufacturer includes materials and direct labour. If you add per-order costs such as outbound shipping, payment fees or marketplace commissions, you are measuring something closer to a contribution margin, which is useful but must not be compared with a gross margin computed without them.
Discounts and refunds belong in the revenue side. A product listed at 100 but sold on average at 92 after promotions has a margin calculated on 92. Refunded sales should be removed from revenue and units, while costs of returned goods that cannot be resold remain a cost. Keeping these rules stable from one month to the next matters more than any single figure.
How to read and improve the result
A higher gross margin means each sale leaves more to cover other expenses. It rises when the price goes up or the direct cost goes down, and is unaffected by volume. Whether a given margin is sufficient depends on the business model and on the operating expenses it must cover; there is no universal good value.
A negative gross profit means the product is sold below its direct cost: each additional unit increases the loss. A margin that is positive but falling over time usually signals rising costs, deeper discounts or a change in product mix.
Practical levers
- Review prices of products whose cost has risen since the last price update.
- Negotiate purchase prices, freight or packaging, which act directly on the unit cost.
- Limit blanket discounts on low-margin products and reserve promotions for items with room.
- Shift the sales mix toward products with higher gross profit per unit, not only higher price.
- Reduce returns caused by unclear product descriptions or sizing, which erode net revenue.
Common mistakes
- Calling gross margin “net profit margin” or “what we earn”.
- Dividing gross profit by cost instead of price, which gives markup, not margin.
- Entering a price including VAT and a cost excluding VAT, which inflates the margin.
- Using the list price when most units are sold with a discount.
- Comparing products whose costs include different items, such as shipping in one and not in the other.
Scenario comparison
The conservative case lowers the price by 5 %, raises the unit cost by 5 % and reduces units by 10 %; the optimistic case does the opposite. With the example values, the margin moves from about 33.68 % (price 95, cost 63) to about 45.71 % (price 105, cost 57). These are illustrative shifts, not forecasts.
Notice that the units lever changes total gross profit but not the margin percentage. If your decision is about price structure, focus on price and cost; if it is about the period’s gross profit, volume matters too.
Methodology and limitations
The calculator works on one representative price and one cost per unit. For a mix of products or prices, compute each product separately or use weighted averages over the same period.
It does not deduct operating expenses, financing costs or income tax, so it cannot measure the net profitability of the business.
The result depends entirely on the cost basis entered. The same product can show a gross margin or a contribution margin depending on which costs are included.
Prices and costs are assumed to exclude VAT or sales tax; refunds and discounts are assumed to be already reflected in the inputs.
Frequently asked questions
How do I calculate gross profit margin?
Gross margin = (selling price − unit direct cost) ÷ selling price × 100. A product sold for 100 with a direct cost of 60 has a gross profit of 40 and a gross margin of 40 %.
Is gross margin the same as net profit margin?
No. Gross margin only deducts the direct cost of the product. Net profit margin also deducts operating expenses such as salaries, marketing and rent, plus interest and taxes, so it is lower in almost every business.
Should prices include VAT?
No. VAT or sales tax collected on behalf of the state is not revenue. Enter the price and the cost excluding these taxes so that both sides use the same basis.
What costs belong in the unit cost?
The direct cost of the product: purchase or production cost, and usually the costs required to bring it to a sellable state, such as inbound freight, duties and packaging. Overheads such as rent, marketing and administrative salaries stay out.
What does a negative margin mean?
The selling price is below the direct cost, so each unit sold loses money before any other expense. With a price of 50 and a cost of 60, gross profit is −10 and the margin −20 %.
Why can the calculator not show a margin when the price is zero?
The margin divides by the selling price. With a price of zero the division is undefined, so the result is shown as not applicable rather than as a misleading number.
Sources
Last reviewed:
Related calculators
- Markup vs Margin CalculatorSee the gross margin and the markup on cost of the same sale side by side, so that a percentage quoted by a buyer, a supplier or a colleague is never read with the wrong denominator.
- Contribution Margin CalculatorSee how much each sale leaves to cover fixed costs once every cost that varies with the sale is paid, per unit, as a ratio and in total.
- Target Selling Price CalculatorFind the price that delivers the gross margin you need on a product or service, and see why adding the same percentage to cost gives a lower margin than you might expect.
- Sales Discount CalculatorTurn a list price and a discount percentage into the price the customer pays, and, if you know the unit cost, see how much of your gross margin and unit profit the discount consumes.