Calculatorz

Guide

How to Calculate Gross Profit Margin

Person using a calculator for financial planning alongside cash and notes
Person using a calculator for financial planning alongside cash and notes — Photo by kaboompics on Pexels

Gross profit margin is the single number that tells you whether your pricing actually works. It is the share of every sales dollar you keep after paying for what you sold — before rent, wages, advertising and tax take their cut. A shop that sells $10,000 of goods that cost $6,500 keeps $3,500, a 35% margin; a shop with the same sales and $9,000 of cost keeps only $1,000, a 10% margin. Same revenue, very different business. This guide works through the formula step by step, shows it on real numbers, explains why margin and markup are not the same thing, and shows how to price backwards from the margin you want. Every figure here matches the profit margin calculator, so you can check each step against it.

Try it now: Profit Margin Calculator — Margin or markup? Both — and the difference matters.

The formula: three numbers from two inputs

You need only two inputs: revenue and cost. Revenue is what customers actually paid you in the period you are measuring — a month, a quarter, a year. Cost is the direct cost of what you sold, usually called cost of goods sold: the stock, materials or wholesale goods behind those sales. It is not your total spending — rent, wages, marketing and tax are not in this cost, and that is exactly the point of the measure.

From those two numbers you get three results. First, gross profit: revenue minus cost. Second, gross profit margin: gross profit divided by revenue, written as a percentage. Third, markup: gross profit divided by cost, also as a percentage. The formulas are: gross profit = revenue − cost; margin = (revenue − cost) ÷ revenue × 100; markup = (revenue − cost) ÷ cost × 100.

The two percentages divide the same profit by different numbers, which is why they are never equal — and why confusing them is the most expensive mistake in pricing. Margin divides by the selling price, so it can never pass 100%. Markup divides by the cost, so it can be 100%, 200% or more. Keep the denominators straight and the rest of the maths is simple division.

Worked example: a $10,000 month with $6,500 of cost

Take a small shop that sells $10,000 of products in a month, and those products cost $6,500 to buy from the supplier. Step one, gross profit: $10,000 − $6,500 = $3,500. Step two, margin: $3,500 ÷ $10,000 = 0.35, or 35%. That means 35 cents of every sales dollar is gross profit. Step three, markup: $3,500 ÷ $6,500 = 0.5385, or 53.85%. The shop added 53.85% to the cost to arrive at its selling price.

Now try a smaller case to check the pattern. A freelancer bills $2,400 for a project and spends $1,800 on subcontractors and materials. Gross profit is $2,400 − $1,800 = $600. The margin is $600 ÷ $2,400 = 0.25, or 25%. The markup is $600 ÷ $1,800 = 0.3333, or 33.33%. The same $600 of profit is 25% of the price and 33.33% of the cost — both numbers describe the same job, from different sides.

One more check, because this is where the intuition usually breaks: a 50% markup is not a 50% margin. Buy something for $100, mark it up 50% and sell it for $150. The profit is $50, and the margin is $50 ÷ $150 = 0.3333, or 33.33%. You marked up by half and kept only a third of the selling price. If you had aimed for a 50% margin by marking up 50%, you would have underpriced by a wide margin — and that is a mistake you would repeat on every single sale.

Run the same numbers through the profit margin calculator — revenue $10,000, cost $6,500 — and it returns exactly this: gross profit $3,500, margin 35%, markup 53.85%, and a break-even price of $6,500, the price at which profit is exactly zero. If any of your hand maths disagrees with the calculator, recheck the denominator first: margin divides by revenue, markup divides by cost.

Margin vs markup: the mix-up that underprices your work

Margin and markup answer different questions. Margin answers: of the price the customer paid, how much did I keep? Markup answers: how much did I add to my cost to set the price? Use margin to judge whether the business is healthy, and markup to set prices. Mixing them up is how a seller aims for a 50% margin, marks up 50%, and quietly earns 33.33% instead.

The conversion is simple once you see it. To turn a markup into a margin, divide the markup by one plus the markup: a 53.85% markup is 0.5385 ÷ 1.5385 = 0.35, a 35% margin. To turn a margin into a markup, divide the margin by one minus the margin: a 35% margin is 0.35 ÷ 0.65 = 0.5385, a 53.85% markup. The two always move together, but they are never the same number except at zero.

In practice, talk margin with your accountant and markup with your pricing sheet. When someone says a product 'makes 40%', ask which one they mean — a 40% margin is a 66.67% markup, while a 40% markup is only a 28.57% margin. That gap is the difference between a price that covers your overheads and one that slowly starves the business.

Pricing for a target margin: work backwards from the price

Most people set a price by adding a markup to the cost. The safer way is to start from the margin you need and work backwards to the price. The formula is: price = cost ÷ (1 − target margin). The target margin is written as a decimal, so a 40% target is 0.40.

Take a product that costs you $60 and a target margin of 40%. The price is $60 ÷ (1 − 0.40) = $60 ÷ 0.60 = $100. Check it: profit is $100 − $60 = $40, and $40 ÷ $100 = 40%. Now compare with the markup shortcut: marking up 40% gives $60 × 1.40 = $84, a profit of $24 and a margin of $24 ÷ $84 = 28.57%. The shortcut underprices by $16 on every unit — on 1,000 units that is $16,000 of profit given away.

Try it with the shop from the worked example. Its cost is $6,500 and it wants a 40% margin on $10,000 of sales — the price it needs is $6,500 ÷ 0.60 = $10,833.33, or a selling price about 8.3% higher than today. That is the size of the decision a target margin turns into: not a vague 'charge more', but a specific price. Enter your own cost and target margin in the profit margin calculator and it will show the same relationship from the other direction.

What the number means: reading your margin over time

A margin is a snapshot, and its trend matters more than its level. A margin that falls month after month means your costs are rising faster than your prices — a supplier put prices up, a material got more expensive, or you discounted too often — and if you do not act, the business quietly gets thinner until a slow month turns into a loss. Check the margin every month, on the same basis, and treat a steady fall as a warning, not a mystery.

What counts as 'good' depends entirely on the business. Grocery stores run at 1–3% because volume is enormous and overheads are thin; restaurants run 3–9%; retail 5–10%; software and services 20–40% or more, because the cost of each extra sale is tiny. Compare your margin with businesses like yours, not with a universal number — and compare your own margin with last quarter before you compare it with anyone else.

Remember what the margin does not include. Gross profit is revenue minus the direct cost of what you sold — it is before rent, wages, advertising and tax. Those overheads come out of the gross profit, so your net margin is always lower. A 35% gross margin is healthy only if the overheads fit inside it; if rent, wages and marketing eat 30 cents of every sales dollar, the net margin is 5% and the business is fragile. The gross margin tells you whether the pricing works; the net margin tells you whether the business survives.

Five mistakes that shrink your margin without you noticing

First, pricing from markup when you meant margin — the 50% markup that is really a 33.33% margin. Always write down which one your target is before you set a price.

Second, leaving costs out of the 'cost' number. Delivery, packaging, payment processing fees and returns all belong in the cost of what you sold. If they are left out, the margin looks better than it is, and the surprise arrives at the end of the month when the bank balance does not match the margin.

Third, discounting without re-doing the maths. A 20% discount on a product with a 35% margin does not leave a 15% margin — it leaves far less, because the cost does not fall with the price. On the $10,000 shop example, cutting prices 20% while costs stay at $6,500 leaves revenue of $8,000 and profit of $1,500: a margin of 18.75%, nearly halved by one discount.

Fourth, measuring revenue before refunds and returns. Revenue is what customers actually paid and kept — a returned sale is not revenue, and counting it inflates the margin on paper while the money has already left.

Fifth, treating one good month as the margin. A single bulk order, a seasonal spike or a one-off cheap supplier delivery can lift one month's margin by ten points. Judge the margin on a quarter, not a month, and on the trend, not the peak — and re-run the numbers in the profit margin calculator whenever a cost changes, so the price changes with it instead of a year later.

Frequently asked questions

How do I calculate gross profit margin?

Three steps. First, gross profit = revenue − cost. Second, divide the gross profit by the revenue. Third, multiply by 100 for a percentage. On $10,000 of sales with $6,500 of cost, the profit is $3,500 and the margin is $3,500 ÷ $10,000 = 35%. The profit margin calculator does the same maths if you enter your own revenue and cost.

What is a good gross profit margin?

It depends on the industry: grocery stores run 1–3%, restaurants 3–9%, retail 5–10%, and software or services 20–40% or more. Compare with businesses like yours, not with a universal number — and track your own trend over time, because a falling margin matters more than the level on any single day.

What is the difference between gross profit margin and net profit margin?

Gross profit margin uses only the direct cost of what you sold: (revenue − cost) ÷ revenue. Net profit margin subtracts everything else as well — rent, wages, marketing, tax — so it is always lower. On the $10,000 example the gross margin is 35%; if overheads take $3,000, the net profit is $500 and the net margin is only 5%.

How do I calculate the price for a 40% margin?

Divide the cost by (1 − margin): price = cost ÷ 0.60 for a 40% margin. If your cost is $60, the price is $60 ÷ 0.60 = $100. Marking up 40% instead would give $84 — a margin of only 28.57% — so use the division, not the markup, when you have a margin target.

Can gross profit margin be negative?

Yes — if cost exceeds revenue, you lose money on every sale and the margin goes negative. Sell $10,000 of goods that cost $11,000 and the profit is −$1,000, a margin of −10%. A negative margin is a warning to raise prices or cut costs immediately, because every extra sale makes the loss bigger.

Back to the Profit Margin Calculator or home.