Margin Calculator

Calculate selling price from a target margin, or analyze markup and margin from a price.

How is margin calculator worked out?

Profit margin is profit as a percentage of the selling price. To hit a target margin, divide your cost by one minus the margin expressed as a decimal — a 40% margin on a cost of 60 needs a price of 100.

Margin Calculator

Selling price needed

$100.00

Profit per sale
$40.00
Equivalent markup
66.67%
What you would add to cost to reach this price.
Show the working
Cost$60.00
Profit at 40% margin$40.00
Selling price$100.00

Margin is the percentage that actually tells you how much of each sale you keep, which is why it is the number lenders, accountants and buyers ask about. This calculator works in both directions: forwards from a target margin to the price you must charge, and backwards from a price you already charge to the margin it really earns.

The formula

From a target margin:
Selling price = cost ÷ (1 − target margin % ÷ 100)

From a known price:
Profit = price − cost
Margin % = profit ÷ price × 100
Markup % = profit ÷ cost × 100

Dividing by one minus the margin is what people get wrong: adding 40% to cost gives a 28.6% margin, not 40%. As target margins climb the effect accelerates — reaching an 80% margin needs a price of five times cost, not 1.8 times.

Why a target margin needs division, not addition

Margin measures profit against the selling price, and the selling price is the thing you are solving for — which is why it takes a division rather than an addition. The practical test is quick: price your item, then check that profit divided by price gives the margin you wanted. Businesses that price by adding their target margin to cost are systematically underpricing, and the shortfall is invisible because every individual sale still shows a profit.

Gross margin is not what you keep

The margin here is a gross margin: revenue less the direct cost of that sale. Out of it still come the costs that exist whether or not you make the sale — software, premises, insurance, your own unbilled time — and then tax. A healthy gross margin on every job is entirely compatible with an unprofitable year if the overheads underneath it were never counted.

Frequently asked questions

How do you calculate profit margin?

Subtract the cost from the selling price to get the profit, then divide the profit by the selling price and multiply by 100. A product costing 60 and selling for 100 earns a 40% margin.

What price do I need for a 50% margin?

Double your cost. To hit a target margin, divide the cost by one minus the margin as a decimal: for 50%, that is cost ÷ 0.5. Adding 50% to cost gives only a 33.3% margin.

Can a margin be more than 100%?

No. Margin is profit as a share of the selling price, so it approaches 100% only as cost approaches zero and can never exceed it. Markup, which is measured against cost, has no upper limit.

Put the number on an invoice

The free invoice generator builds the document around your figures — line items, tax, payment terms — and downloads a print-ready PDF. No signup required.

Related calculators

Guides that go deeper

More create & price calculators, or browse all 26 invoice calculators.