Profit margin Calculator

Margin, markup and profit from whichever two numbers you know — plus the selling price that hits your target margin.

What do you know?

All-in cost: goods, freight, packaging, direct labor.

Gross margin

Profit per sale
Markup
Cost
Selling price

Margin vs markup — the classic mix-up

Both describe the same profit, divided by a different base. A $40 profit on a $100 sale is a 40% margin (÷ price) but a 66.7% markup (÷ $60 cost). Price by markup when you meant margin and you will undershoot every time.

Margin you wantMarkup to apply× cost multiplier

How the three modes work

Cost + price is the audit mode: it tells you the margin you are actually earning. Cost + margin is the pricing mode: enter the margin you need and it returns the selling price — computed as cost ÷ (1 − margin), not cost × (1 + margin), which is the mistake that quietly under-prices products. Price + margin works backwards to the maximum you can afford to pay a supplier.

What counts as "cost"

Gross margin should carry every direct cost of the sale: the item, inbound freight, payment processing if you attribute it per-order, packaging. Rent and salaries stay out — those belong to operating margin, one level down the P&L. Consistency matters more than the exact rule: use the same definition across products or the comparison is meaningless.

Typical gross margins

Grocery runs 15–25%, general retail 30–50%, restaurants ~60–70% on food (before labor eats it), software 70–90%. If your margin looks wildly off these bands, check whether you priced with markup arithmetic by accident — divide, don't multiply.

Frequently asked questions

What is the difference between margin and markup?
Both use the same profit but divide by a different base. Margin = profit ÷ selling price; markup = profit ÷ cost. A 40% margin equals a 66.7% markup. Mixing them up is the most common pricing error in small business.
How do I price for a 40% margin?
Divide cost by (1 − 0.40). A $60 cost needs a $100 price. Multiplying $60 × 1.40 gives $84 — that is a 40% markup but only a 28.6% margin.
Should margin include shipping and fees?
Gross margin should include every direct, per-sale cost: the item, inbound freight, packaging, and payment fees if you attribute them per order. Overheads like rent belong in operating margin instead.
Can a margin be over 100%?
No — margin is profit ÷ price, so it approaches 100% only as cost approaches zero. Markup, divided by cost, can exceed 100% easily: selling a $40 item for $100 is a 150% markup and a 60% margin.
What is a good profit margin?
Depends on the sector: grocery 15–25%, retail 30–50%, restaurants 60–70% gross on food, software 70%+. Compare against your industry, not a universal number.

Related calculators

ROI Break-even Markup