ProfitPeek

How to calculate profit margin

Profit margin tells you what share of the selling price is left after cost. Enter a cost and a price, or a cost and a target margin, in the calculator.

Margin & markup calculator

Fill in any two boxes. The rest are worked out as you type.

Price—
Profit—
Margin—
Markup—

Numbers you type stay in your browser.

The unit (gross) margin formula

Profit = Price − Cost
Margin % = Profit ÷ Price × 100
Price for a target margin = Cost ÷ (1 − Margin)

Worked example

You buy or make an item for $27 and sell it for $45.

To go the other way: you still want a 40% margin, but the cost is $30. Price = $30 ÷ (1 − 0.40) = $30 ÷ 0.60 = $50. Check: profit $20, $20 ÷ $50 = 40%.

Gross, operating, and net

The calculator on this page is for a single product or line: price versus that item's cost. On a full income statement:

A 40% gross margin can still be a thin net margin once overhead is paid. Don't treat the unit margin as take-home profit.

Margin is not markup

Markup divides the same profit by cost. A 40% margin is a 66.67% markup. Use the margin vs markup guide and the conversion chart when you are setting prices from a cost-plus rule.

Questions people ask

What is the profit margin formula?

Gross profit margin = (Selling price − Cost) ÷ Selling price × 100. A $100 price and $60 cost is $40 profit and a 40% margin.

How do I set a price for a target margin?

Selling price = Cost ÷ (1 − Target margin). For a $30 cost and a 25% margin, price = $30 ÷ 0.75 = $40.

What is the difference between gross, operating, and net margin?

Gross margin uses only the cost of the product (COGS). Operating margin also subtracts operating expenses. Net margin subtracts everything, including interest and taxes. This calculator is a gross (unit) margin calculator.

Get new free business tools

We're building more free tools for small businesses: sales tax, purchase orders, quotes. Leave your email and we'll send product updates when each one ships. We store only the address; remove it any time by emailing us.

Prefer email? Write to us instead.