Profit margin calculator

See exactly how much you keep on every sale.

What profit margin tells you

Gross profit margin is the share of every sale you keep after paying for the product itself. Sell a candle for $20 that costs $8 to make and you keep $12 — a 60% margin. The formula is (price − cost) ÷ price, expressed as a percentage of the price, not of the cost.

Margin is the number that decides whether your business can afford to exist. Rent, software, marketing, and your own pay all come out of gross profit — a product with a thin margin has to sell in huge volume to cover them, while a fat margin buys you room to make mistakes.

What your margin number means

The calculator has two modes. In “I know my price” mode, enter what one unit costs you and what you sell it for; you get your gross margin, profit per unit, and the equivalent markup instantly — no submit button, no account.

In “I want a target margin” mode you work backwards: enter your unit cost and the margin you want to keep, and the calculator solves the price you need to charge. This is the mode to use before you launch — decide the margin your business needs, then check whether the market accepts the price it implies.

The advanced toggle adds the two costs that quietly eat sticker margins: shipping you don’t pass on and the marketing cost of acquiring each order. A product with a healthy 54% gross margin can drop under 20% once a $2 shipping subsidy and $3 of ad spend come out of a $14 sale — that true margin is the number your bank account experiences.

Margin vs. markup: not the same number

Margin and markup use the same two inputs but answer different questions, and mixing them up is one of the most common pricing mistakes in retail. Margin measures profit as a share of the price; markup measures it as a share of the cost. Marking up an $8 product by 50% gives a $12 price — but only a 33.3% margin, not 50%.

The two convert with markup = margin ÷ (1 − margin). The gap grows fast: a 50% margin already requires a 100% markup, and a 75% margin needs a 300% markup. Use the table to translate the margin you want into the markup to apply at the shelf.

Conversion between target margin and the markup to apply
Target marginMarkup to apply
10%11.1%
20%25%
25%33.3%
30%42.9%
40%66.7%
50%100%
60%150%
75%300%

Pricing by applying a percentage on top of cost? Use the free markup calculator — the same engine, asked from the cost side.

A worked example

Say you roast coffee. A 12-oz bag costs $6.50 in beans, label, and packaging, and sells for $14. Profit per unit is $7.50, gross margin is 53.6%, and the markup equivalent is 115.4% — a solid position for specialty food.

Now open the advanced toggle. Free shipping actually costs you $2.10 an order, and Instagram ads run about $3.00 per order won. True profit falls to $2.40 and true margin to 17.1% — still viable, but a very different business. That is the check worth running before you promise free shipping.

What to do with your margin

Compare your number against your industry before judging it. Grocery and convenience retail live on gross margins around 25–35%, apparel typically runs 40–60%, restaurants price food at 65–70% gross to survive on 5–10% net, and software or services can clear 80%. A good margin is one that covers your fixed costs at a sales volume you can realistically hit.

If the margin is too thin, you have three levers: raise the price, cut the unit cost, or change the offer so it deserves a higher price. Run the target-margin mode with the number you actually need — and check what your fixed costs demand of it with the break-even calculator.

Frequently asked questions

How do I calculate profit margin?

Subtract cost from price to get profit, divide by price, then multiply by 100. A product that costs $6.50 and sells for $14 has a margin of (14 − 6.50) ÷ 14 × 100 = 53.6%.

What is a good profit margin for a small business?

It depends on the industry: grocery retail runs around 25–35% gross, apparel 40–60%, restaurant food 65–70%, and services or software often above 80%. The practical test is whether gross profit covers your fixed costs at a sales volume you can actually reach.

What is the difference between gross margin and net margin?

Gross margin only subtracts the direct cost of the product. Net margin also subtracts everything else — rent, wages, marketing, software, taxes. This calculator computes gross margin, and its advanced mode gets you closer to reality by also deducting per-order shipping and acquisition costs.

Can profit margin be negative?

Yes — if the price is below your cost, every sale loses money and the margin is negative. The calculator shows negative margins in red rather than hiding them, because selling at a loss is exactly what you want to catch before launch.

Is margin the same as markup?

No. Margin is profit as a percentage of the price; markup is profit as a percentage of the cost. A 50% markup on an $8 cost gives a $12 price and only a 33.3% margin. Convert with markup = margin ÷ (1 − margin).

Do you store the numbers I enter?

No. The calculator runs entirely in your browser — your costs and prices are never sent to a server, stored, or shared. Refresh the page and they are gone.