All calculators

Calculator · Pricing & Margin

Profit Margin Calculator: Margin, Profit and Markup

Find the gross margin, profit and markup from cost and price — or the price you need for a target margin.

By PriceAndProfit Editorial Updated

I know

Fill in the two values you know. The third one is calculated.

$
$
%

Fill in the fields: the result appears under the form, with the formula below it.

Clear

How it works

Margin = (Price − Cost) ÷ Price

Gross margin is the share of the selling price you keep after paying for the item itself. An item that costs $40 and sells for $70 leaves $30 of profit; $30 ÷ $70 = 42.9% gross margin. The same $30 compared with the cost is a 75% markup — the calculator shows both, because they are easy to mix up.

Choose what you know. «Cost and price» gives the margin. «Cost and target margin» gives the price you need: price = cost ÷ (1 − margin), so a $60 item at a 40% margin sells for $100. «Price and target margin» gives the most you can pay: cost = price × (1 − margin), so a $50 shelf price at a 30% margin allows a cost of $35.

Margin, markup and price around the example
MarginMarkupPrice for a $40 cost
30% 42.9% $57.14
40% 66.7% $66.67
42.9% 75% $70.00
50% 100% $80.00
60% 150% $100.00

Accounting gross margin subtracts cost of goods sold. If you include selling fees or allocated business overhead in this input, the result becomes a margin after those chosen costs, not accounting gross margin. Keep that cost boundary explicit; the product-pricing guide shows how to plan for full cost without counting overhead twice.

Worked examples for each input mode

One hypothetical example per mode
ModeInputsMarginProfitMarkupPrice or cost found
Cost and price $40 cost, $70 price 42.9% $30.00 75.0% —
Cost and target margin $60 cost, 40% margin 40.0% $40.00 66.7% Price $100.00
Price and target margin $50 price, 30% margin 30.0% $15.00 42.9% Maximum cost $35.00

The second mode is where most pricing errors happen. Adding 40% to a $60 cost gives $84, but the $24 of profit is only 28.6% of $84 — a markup of 40%, not a margin. To keep 40% of the price, divide the cost by 0.60 instead. The third mode works the other way round and is useful when the market fixes the price: with a $50 shelf price and a 30% margin target, any supplier quote above $35 per unit misses the target before a single sale is made.

Gross, operating and net margin

Gross profit margin = (Revenue − Cost of goods sold) ÷ Revenue

The calculator works per unit, but the same formula applies to a whole period. A month with $50,000 of revenue and $30,000 of cost of goods sold has $20,000 of gross profit, a 40% gross margin. Subtract $12,000 of operating expenses such as rent, software and wages, and $8,000 of operating profit remains — a 16% operating margin. Net margin goes further and also subtracts interest and income taxes, which this site leaves out. Always say which margin you are quoting: the three can differ by tens of points for the same business.

Frequently asked questions

What is the gross profit margin formula?

Gross profit divided by revenue, where gross profit is revenue minus cost of goods sold. $20,000 of gross profit on $50,000 of revenue is a 40% gross margin.

Is a 50% margin the same as doubling the cost?

Yes. Doubling the cost is a 100% markup, and a 100% markup is exactly a 50% margin: $25 cost, $50 price, $25 profit.

Can margin be over 100%?

With nonnegative cost and positive price, margin cannot exceed 100%; zero cost gives exactly 100%. This tool requires positive cost because it also computes markup on cost. A 300% markup corresponds to a 75% margin.

What does a negative margin mean?

You sell below cost. A $25 item sold for $20 loses $5, a margin of −25%.

More pricing calculators

Discounts, price changes and contribution with the same inputs.

  • Calculator
    Discount Percentage Calculator

    Find the percentage off from an original and a sale price, the sale price after a discount, or the original…

  • Calculator
    Percentage Change Calculator

    Calculate the percentage increase or decrease between two values, the plain difference, and — when both values…

Related calculators & guides