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.
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.
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