Profit Margin Calculator
Enter revenue (the selling price) and cost to get the profit margin and the gross profit. The markup, which is profit as a percentage of cost, is shown too.
How profit margin is calculated
Revenue minus cost is the gross profit. The profit margin says what percentage of the revenue the gross profit is.
- Gross profit = revenue − cost
- Profit margin (gross margin) = gross profit ÷ revenue × 100
For example, with revenue of 1,000 and a cost of 600, the gross profit is 400 and the margin is 400 ÷ 1,000 × 100 = 40.00%.
The "profit margin" here is based on gross profit. Overhead such as wages and rent, and taxes, are not subtracted. The amounts have no currency: use whichever currency you work in, with up to 2 decimal places.
Profit margin vs. markup
Both are based on the gross profit. They differ in what you divide by.
| Name | Divided by | Formula |
|---|---|---|
| Profit margin | Revenue (selling price) | gross profit ÷ revenue × 100 |
| Markup | Cost | gross profit ÷ cost × 100 |
With revenue of 1,000 and a cost of 600, the gross profit is 400, the profit margin is 40.00% and the markup is 66.67%. The same profit gives different numbers because the divisor is different.
The two are easy to mix up when you set a price. Take an item that costs 600:
- To get a 40% profit margin: price = 600 ÷ (1 − 0.4) = 1,000
- To get a 40% markup: price = 600 × 1.4 = 840
Selling at 840 gives a profit margin of 28.57%, not 40%. When someone says "add 40% to the cost", decide first which of the two they mean.
The profit margin cannot be above 100%, because the gross profit cannot be more than the revenue. The markup can be above 100% when you sell for more than twice the cost (revenue of 3 and cost of 1 give a markup of 200.00%).
Examples
| Revenue | Cost | Gross profit | Profit margin | Markup |
|---|---|---|---|---|
| 1,000.00 | 600.00 | 400.00 | 40.00% | 66.67% |
| 1,000.00 | 1,200.00 | −200.00 | −20.00% | −16.67% |
| 3.00 | 1.00 | 2.00 | 66.67% | 200.00% |
| 50.00 | 20.00 | 30.00 | 60.00% | 150.00% |
The second row is a loss: the cost is higher than the revenue, so the gross profit and the margin are negative.
Things to know
- Enter amounts of 0 or more, up to 9,999,999,999.99, with up to 2 decimal places. Thousands separators such as 1,234.50 are accepted; use a period as the decimal separator.
- Percentages are rounded to 2 decimal places. A negative value is rounded by its absolute value and the sign is put back.
- If the cost is higher than the revenue, the margin is negative and "Loss" is shown.
- If the revenue is 0, the margin cannot be calculated.
- If the cost is 0, the markup is not shown (it cannot be divided by 0).
- Enter revenue and cost both before tax (or both after tax) so that tax does not distort the comparison.
- The result is a guide. Check your books for figures used in accounting or tax filings.
Sources
The definitions follow these reference articles, which were read on November 1, 2026:
- Wikipedia, "Profit margin": https://en.wikipedia.org/wiki/Profit_margin (gross profit margin = gross profit ÷ net sales; the margin takes the selling price as the base, and a "profit percentage" or markup takes the cost price as the base)
- Wikipedia, "Markup (business)": https://en.wikipedia.org/wiki/Markup_(business) (markup = (sale price − cost) ÷ cost; margin = markup ÷ (markup + 1))
They are explanatory references, not standards. The example with revenue 1,000 and cost 600 is worked out here from those formulas; it is not an example from those articles.
Frequently asked questions
What is gross profit?
Revenue minus cost. It is also called gross margin in money terms. It is the profit before overhead and taxes.
What is a good profit margin?
It depends heavily on the industry and the product, so there is no single answer. Compare with the average in your industry and with your own past figures.
Is profit margin the same as gross margin percentage?
Here, yes: the profit margin is gross profit divided by revenue. It is different from an operating margin or a net margin, which are based on profit after overhead or after tax.
How do I set a price from a cost and a target margin?
Use price = cost ÷ (1 − target margin). With a cost of 600 and a target margin of 40%, the price is 600 ÷ 0.6 = 1,000. To do this without working it out by hand, use the Selling Price Calculator.