Margin Calculator

Find gross margin, profit, and selling price.

Details

$
Known value
%

Selling price

$66.67

40% margin · 66.7% markup

Cost$40
Gross profit$27
Markup66.7%
Selling price$66.67

This works out your profit margin from a cost and a selling price, or tells you what to charge to hit a margin you are aiming for.

It returns the margin, the gross profit in money, and the equivalent markup, so you can see both numbers side by side rather than mixing them up.

What profit margin means

Profit margin is the share of your selling price that is profit. Sell something for $100 that cost you $60 and the $40 profit is a 40% margin.

The word margin is also used for something entirely different in stock trading, where it means borrowing from a broker. This page is about profit margin: the pricing figure a business uses.

The critical thing is what you divide by. Margin divides profit by the selling price. Markup divides the same profit by the cost. Same $40, two very different percentages, and mixing them up is how businesses underprice themselves.

Same $40 profit, two different percentages
$40 ÷ $100profit ÷ selling price = 40% margin
vs
$40 ÷ $60profit ÷ cost = 66.7% markup

Margin can never reach 100%, because profit is only ever part of the price. Markup has no upper limit at all. If a percentage is above 100, it must be a markup.

What to enter

Cost
What the item costs you: the wholesale price, or the materials and labour to make it.
Selling price
What you charge the customer, before sales tax.
Target margin
Use this to work backwards. Enter the margin you want and it tells you the price to charge.

The three margins a business tracks

Gross margin
Revenue minus the direct cost of what you sold, as a share of revenue. What this calculator works out, and the one used for pricing decisions.
Operating margin
After rent, wages, marketing and other running costs. Shows whether the business itself works, not just the product.
Net margin
After absolutely everything, including tax and interest. The bottom line, and always the smallest of the three.
Markup
Not a margin at all. It is profit measured against cost, and it is what you apply to set a price. See the markup calculator.

What this assumes

Cost means the direct cost of the item. Overheads like rent and salaries belong to operating margin, not gross margin.

Prices exclude sales tax, which is collected on behalf of the government and was never your revenue.

How to calculate profit margin

Find the profit, then divide by the selling price. The order matters more than the arithmetic.

margin % = (selling price − cost) ÷ selling price × 100
selling price − cost
The gross profit
÷ selling price
What makes it a margin rather than a markup
  1. Work out the profit. Selling price minus cost. On a $100 sale costing $60, that is $40.

  2. Divide by the selling price. $40 ÷ $100 = 0.4.

  3. Multiply by 100. That gives 40%. Dividing by the cost instead would have given 66.7%, which is the markup.

  4. To hit a target margin, divide. Price = cost ÷ (1 − margin). For a 50% margin on a $60 cost, that is 60 ÷ 0.5 = $120.

See a worked example: why a 50% markup does not give a 50% margin
Cost
$60
Markup applied
50%

A 50% markup means adding half the cost: $60 + $30 = $90.

The profit is $30 and the selling price is $90.

Margin: $30 ÷ $90 = 33.3%, not 50%.

To actually earn a 50% margin, divide instead: $60 ÷ 0.5 = $120. That is a 100% markup.

A 50% markup gives only a 33.3% margin

Frequently asked questions

Problems people actually run into

Applying a markup and reporting it as a margin

A shop wanting a 40% margin adds 40% to cost and believes the job is done. On a $60 item that gives $84 and a margin of only 28.6%, a shortfall of more than eleven points.

Repeated across a whole catalogue, that gap is the difference between a business that works and one that does not. The fix is a single habit: divide by (1 − margin) rather than multiplying by (1 + margin).

Discounting without checking what it does to margin

A 20% discount does not cost you 20% of your profit; it costs far more, because it comes entirely out of the margin.

On a $100 item with a 40% margin, discounting to $80 leaves $20 profit instead of $40. The price fell by a fifth and the profit halved.

Results are estimates for general information only and are not professional financial, medical, or legal advice. Read our full disclaimer.

Last updated: September 3, 2026