How to calculate profit margin
Short answer
To calculate profit margin, subtract cost from revenue to get profit, then divide that profit by revenue and multiply by 100 for a percentage. An item that sells for 50 dollars and costs 30 has a 20 dollar profit and a 40 percent margin.
Profit margin formula
Profit = revenue - cost. Profit margin (percent) = (profit / revenue) x 100. Markup (percent) = (profit / cost) x 100.
- •revenue is the price the customer pays you for the item or job
- •cost is everything you spent to produce or deliver it
- •profit is what is left after you subtract cost from revenue
- •margin expresses profit as a share of revenue (the sale price)
- •markup expresses that same profit as a share of cost (what you paid)
The two steps to a profit margin
Profit margin is profit written as a percentage of your sale price, and you get there in two moves.
First, find the profit: subtract cost from revenue. Revenue is what the customer pays; cost is what the item or job cost you. Second, divide that profit by revenue and multiply by 100. That result is your margin in percent.
The detail that trips people up is the bottom of the fraction. Margin always divides by revenue, the price you sold at. That is what separates it from markup, which divides by cost. Same profit, different denominator, different number.
Worked example
You sell an item for 50 dollars that costs you 30.
Profit = 50 - 30 = 20.
Margin = 20 / 50 = 40 percent.
Markup = 20 / 30 = 66.7 percent.
One sale, two very different percentages. The 20 dollars of profit never changed: it is 40 percent of the 50 dollar price and 66.7 percent of the 30 dollar cost. That is exactly why margin and markup get mixed up, and why it pays to be clear about which one you mean before you quote a number to anyone.
Margin versus markup, and why it matters
Both describe the same profit, so both are correct in their own frame. The difference is what you compare the profit against.
Markup answers a pricing question: how much did I add on top of my cost? Divide profit by cost. Margin answers a reporting question: how much of each dollar of sales did I keep? Divide profit by revenue.
Because margin uses the larger number (revenue) as its base, the margin percentage is always smaller than the markup percentage for the same sale. A 66.7 percent markup and a 40 percent margin can be the exact same transaction. If you set prices by markup but then hand that number to a lender or partner as your margin, you overstate how profitable you actually are.
To move between the two, the Markup Calculator handles the cost-based view and the Percentage Calculator covers quick one-off conversions.
Common mistakes
A handful of errors show up again and again.
- Confusing margin with markup. Same profit, different denominator. Reporting a 66.7 percent markup as a 66.7 percent margin makes the business look far healthier than it is.
- Leaving out costs. Margin is only as honest as the cost you feed it. Dropping shipping, payment processing fees, packaging, returns, or labor inflates both profit and margin. Decide up front whether you are calculating gross margin (just the direct cost of the item) or net margin (all costs), and stay consistent.
- Pricing off markup but reporting margin. If you build prices by adding a markup to cost, the resulting margin is a different, smaller percentage. Quote the right one for the audience.
- Mixing units. Revenue and cost must cover the same thing: the same unit, the same time period, or the same job. A per-item price against a monthly cost total gives a meaningless margin.
A note on accuracy
These formulas give a clean estimate, but a real business carries details a quick calculation cannot see: taxes, discounts, refunds, overhead allocation, and how your accountant defines each cost line. Use the margin figure to compare products, spot thin performers, and sanity-check pricing. It is an estimate, not accounting or tax advice, and not a substitute for your books.
When the stakes are high, confirm the numbers against your actual accounting records.
Pricing backward from a target margin
Most guides start with a price and find the margin. Real pricing often runs the other way: you know your cost and the margin you need, and you want the price. Because margin is a share of the selling price, the price is cost divided by one minus the margin as a decimal.
Say a product costs you 42 dollars and you want a 35 percent margin. Price = 42 / (1 - 0.35) = 42 / 0.65 = 64.62 dollars. Check it: profit is 22.62, and 22.62 / 64.62 is 35 percent. The Profit Margin Calculator confirms that revenue of 64.62 against cost of 42 gives a 35 percent margin and a 53.9 percent markup.
The common shortcut of multiplying cost by 1.35 gives 56.70 instead, which is only a 25.9 percent margin. That gap between a markup applied by habit and a margin you actually wanted is the single most expensive pricing mistake in small business.
A conversion table you can keep in your head
Switching between margin and markup comes down to two small formulas. Markup = margin / (1 - margin), and margin = markup / (1 + markup), both as decimals. A handful of pairs are worth memorizing, because they let you sanity-check a quote on the spot.
The pattern is that markup runs ahead of margin, and the gap grows as margins rise. At low margins the two are close; at high margins markup becomes enormous. A business that says it wants a 75 percent margin is asking for a 300 percent markup, meaning the price is four times cost.
- 20 percent margin = 25 percent markup
- 25 percent margin = 33.3 percent markup
- 30 percent margin = 42.9 percent markup
- 40 percent margin = 66.7 percent markup
- 50 percent margin = 100 percent markup
- 60 percent margin = 150 percent markup
- 75 percent margin = 300 percent markup
Gross, operating, and net margin on one income statement
The word margin changes meaning depending on which costs sit in the subtraction. Picture a small online shop with 80,000 dollars of annual sales. The products it sold cost 44,000 dollars. Gross profit is 36,000, a gross margin of 45 percent.
Now subtract the costs of running the shop: software, rent, advertising, wages, and similar overhead, here 22,000 dollars in total. Operating profit is 14,000, an operating margin of 17.5 percent. Finally take out interest and income taxes, say 3,500 dollars, and net profit is 10,500, a net margin of 13.1 percent.
All three are legitimate, and the same business can be described as 45 percent or 13 percent profitable without anyone lying. When you read a margin in a news story, a loan application, or a competitor's pitch, find out which one it is. Compare like with like: gross against gross, net against net.
What a discount really costs you
A promotion looks small as a percentage of the price and large as a percentage of profit. Take the guide's original item: price 50, cost 30, profit 20, margin 40 percent. Run a 20 percent off sale, and the price drops to 40. Cost has not moved, so profit falls to 10 and margin to 25 percent.
The discount cut your profit per unit in half, which means you must sell twice as many units just to earn the same total profit. A milder 10 percent discount brings the price to 45, profit to 15, and margin to 33.3 percent. You would need to sell a third more units, since 20 / 15 is 1.33, to break even on the promotion.
The general test is old profit per unit divided by new profit per unit. If a discount cannot plausibly lift volume by that multiple, it loses money. The lower your starting margin, the less room a discount leaves you.
When fees and shipping are part of cost
Selling through a marketplace shows how quickly a healthy-looking margin shrinks. An item sells for 40 dollars and the product cost is 18, so the naive margin is 22 / 40, or 55 percent. Then the real costs arrive: 5 dollars of shipping and packaging, a marketplace fee of 12 percent (4.80 dollars), and card processing at 3 percent plus 30 cents (1.50 dollars).
Total cost is 18 + 5 + 4.80 + 1.50 = 29.30 dollars. Profit is 10.70 dollars and the margin is 26.7 percent, less than half the naive figure. Fee rates here are illustrative and differ by platform and plan, so use the actual terms of whatever you sell through.
Notice that percentage fees scale with the price while shipping and the fixed 30 cents do not. That means a price cut hurts more than the headline margin suggests, because the fixed pieces do not shrink with it.
Blended margin and break-even revenue
A business with several products does not have a margin equal to the average of the product margins. Suppose product A brings 30,000 dollars of revenue at a 50 percent margin (15,000 profit) and product B brings 70,000 at 20 percent (14,000 profit). The simple average of 50 and 20 is 35 percent, but total profit is 29,000 on 100,000 of revenue, a blended margin of 29 percent. Always weight by revenue.
Margin also gives you a fast break-even estimate. Divide fixed monthly costs by the margin that is left after variable costs. With 12,000 dollars of fixed costs and a 40 percent contribution margin, break-even revenue is 12,000 / 0.40 = 30,000 dollars. Lift the margin to 45 percent and the same costs break even at about 26,667.
Use these tools to rank products and spot weak ones. For a decision with real money behind it, reconcile your figures with your bookkeeping first.
Frequently Asked Questions
Is a higher profit margin always better?+
A higher margin means you keep more of each sale, which is generally good, but it is not the whole story. A low-margin product that sells in huge volume can earn more total profit than a high-margin product that rarely sells. Read margin alongside how many units actually move.
What is the difference between gross margin and net margin?+
Gross margin uses only the direct cost of the product, so profit is revenue minus what the item itself cost. Net margin subtracts every cost, including overhead, fees, shipping, and taxes. Net margin is always equal to or lower than gross margin, and it is the more realistic picture of what you keep.
How do I convert a markup percentage into a margin percentage?+
Compute both from the same sale. In the example, a 30 dollar cost with 20 dollars of profit is a 66.7 percent markup and a 40 percent margin. The margin always comes out smaller because it divides profit by the larger revenue figure rather than by cost.
Can a profit margin be negative?+
Yes. If cost is higher than revenue, profit is negative and so is the margin. A negative margin means you are losing money on the sale, which is a signal to raise the price, cut costs, or stop selling that item at that price.
Why is my calculated margin different from what my accountant reports?+
A quick margin calculation captures only the costs you enter, while accounting figures fold in overhead allocation, taxes, discounts, returns, and specific rules for what counts as cost of goods. Treat your own number as an estimate and rely on your books for official reporting.
What price do I need to charge to earn a specific profit margin?+
Divide your cost by one minus the target margin as a decimal. For a 40 percent margin on a 33 dollar cost, the price is 33 / 0.60 = 55 dollars. Multiplying cost by 1.40 would give only 46.20 and a margin of about 28.6 percent. Always work from the price when the goal is a margin.
Can a profit margin be higher than 100 percent?+
No. Margin divides profit by revenue, and profit can never exceed revenue unless the cost were negative. A 100 percent margin would mean zero cost. Markup, which divides by cost, has no such ceiling, so a 300 percent markup is common and equals a 75 percent margin. If someone quotes a margin above 100 percent, they probably mean markup.
Should sales tax be counted as revenue when I calculate margin?+
Generally no. Sales tax you collect from customers is passed on to the government, so it is not income to you. Use the pre-tax selling price as revenue and leave the tax out of cost as well. Including it inflates revenue and distorts every percentage. How your jurisdiction treats it can vary, so check with your accountant.
My supplier raised prices by 10 percent. What happens to my margin?+
It falls by more than you might expect, since the price you charge stayed put. With a 50 dollar price and a 30 dollar cost, the margin is 40 percent. A 10 percent cost increase to 33 dollars drops the margin to 34 percent. To restore 40 percent, the price must rise to 55 dollars, a 10 percent increase.
Sources & further reading
Skip the math
Enter your numbers and the Profit Margin Calculator does the work for you — free, and it runs entirely in your browser.
Open the free Profit Margin Calculator