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.

Profit margin (gross margin) —%
Gross profit (revenue − cost)—
The value copied is the profit margin as a number without commas. Percentages are rounded to 2 decimal places (the third decimal place is rounded half up).

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.

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:

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

Sources

The definitions follow these reference articles, which were read on November 1, 2026:

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.