Margin Calculator

Enter your revenue and costs to see gross, operating, and net margin as one ladder, with each rung explained. Or flip the mode and price a product for the margin you actually want, using the division most people get backwards.

Put this calculator on your website for free

Copy one snippet and give your visitors a working Margin Calculator.

The margin ladder

"What's your margin?" is three different questions wearing one word, and the answer changes a lot depending on which rung of the ladder you are standing on. Gross margin is revenue minus the cost of the goods themselves, divided by revenue: the margin of the product. Operating margin also subtracts the cost of running the place (rent, wages, marketing, software): the margin of the business. Net margin takes out interest and taxes too: the margin of ownership, the share of each revenue dollar that is actually yours to keep.

The ladder is more diagnostic than any single rung. A 60% gross margin sitting above a 5% net margin is not a pricing problem, it is an overhead story or a growth investment, and raising prices will not fix what rent is doing. A thin gross margin, on the other hand, is a product problem that no amount of frugality downstream can outrun. This calculator computes whichever rungs you have numbers for and reads the ladder for you.

The formula

Gross margin = (Revenue − COGS) ÷ Revenue
Operating margin = (Gross profit − Operating expenses) ÷ Revenue     Net margin = (Operating profit − Interest and taxes) ÷ Revenue
Price for a target margin = Cost ÷ (1 − Margin)

All margins divide by revenue, which is what makes them comparable rungs of one ladder. The pricing formula divides rather than multiplies; multiplying cost by (1 + margin) is the classic mistake that applies the number as a markup and delivers less margin than you asked for.

Worked example

A shop books $12,000 in a month. The goods cost $4,800, so gross profit is $7,200: a 60% gross margin. Running the shop costs another $4,200, leaving $3,000: a 25% operating margin. Interest and taxes take $600, leaving $2,400: a 20% net margin.

Read together: the product is strong at 60%, and two thirds of that strength is consumed by overhead before it reaches the owner. That is a normal, healthy shape; the trouble sign would be the same 20% net under a 30% gross, where there is nothing left to trim.

Pricing direction: to sell a $40 cost at a true 50% margin, the price is 40 ÷ 0.5 = $80 (a 100% markup), not the $60 that multiplying by 1.5 would give.

What counts as a good margin

Less than benchmark tables suggest. Grocery chains run healthy businesses on 2% net margins because inventory turns over weekly; software companies post 25% net margins and still disappoint investors; restaurants live their whole lives between 3% and 8%. Comparing your margin against an all-industry average tells you almost nothing, and comparing against your own last quarter tells you almost everything. The honest uses of this page are trend (is each rung rising or falling), shape (which rung eats the most), and pricing (the target-margin mode). For the recurring confusion between margin and markup, which are the same dollars divided by different bases, our markup vs margin calculator handles the conversion and the argument; and if you want to know how many sales your margins need to cover the bills, the break-even calculator takes exactly these numbers as input.

Frequently asked questions

How do I calculate profit margin?

Divide profit by revenue and multiply by 100. The question is which profit: revenue minus cost of goods gives gross margin, subtracting operating expenses gives operating margin, and subtracting interest and taxes gives net margin. All three divide by the same revenue, which is what makes them comparable.

What is the difference between gross, operating, and net margin?

They are rungs of one ladder, each subtracting more costs from the same revenue. Gross measures the product (revenue minus goods), operating measures the business (also minus rent, wages, marketing), and net measures ownership (also minus interest and taxes). Reading all three together tells you where the money goes; any one alone can mislead.

What is a good profit margin?

It depends on the industry more than the number. Grocers thrive on 2% net margins because inventory turns weekly; restaurants live between 3% and 8%; software can run past 25%. Your own trend quarter over quarter, and the shape of your ladder, are far more informative than any cross-industry benchmark.

How do I price a product for a target margin?

Divide the cost by (1 minus the margin as a decimal). A $40 cost priced for a 50% margin is 40 divided by 0.5, which is $80. The instinct to multiply by 1.5 instead applies the number as a markup and quietly delivers a 33% margin while your spreadsheet says 50.

What is the difference between margin and markup?

Same profit, different denominator. Margin divides by the selling price; markup divides by the cost. A 50% markup is only a 33.33% margin, and the gap widens as the numbers grow. If a conversation keeps going in circles, our markup vs margin calculator shows both side by side.

Can a margin be more than 100%?

No. Margin is profit divided by price, and profit can never exceed the price it comes out of, so margin can only approach 100% as costs approach zero. A number over 100% almost always means a markup was computed by mistake: profit was divided by cost instead of price.

Why is my gross margin fine but my net margin negative?

Because the product earns money and the business spends more of it than there is. That is an overhead story (or a deliberate growth investment), and the fix lives in operating costs, not pricing. The reverse shape, a thin gross margin, is a product problem that expense discipline cannot outrun.

Should I calculate margin per product or for the whole business?

Both, for different decisions. Per-product gross margin drives pricing and what to promote; blended business-wide margins drive budgets, hiring, and whether the model works. The classic trap is quoting the best product's margin while the blended one pays the bills.

Related calculators