Profit Margin: The Formulas and the Markup Trap
Business · 6 min read · Last updated September 2026
The margin formulas
Net margin % = (Revenue − COGS − Operating costs) ÷ Revenue × 100
Worked example: revenue $50,000, goods cost $30,000, operating costs $12,000. Gross margin = 20,000 ÷ 50,000 = 40%. Net margin = 8,000 ÷ 50,000 = 16%. Both describe the same business — they answer different questions.
Margin vs markup (the expensive mix-up)
To earn a 40% margin on a $30,000 cost, price = cost ÷ (1 − 0.40) = $50,000. Someone who instead applies "40% markup" prices at 30,000 × 1.40 = $42,000 and unknowingly earns only a 28.6% margin. On thin-margin retail this single confusion is the difference between a profitable and a losing price list.
| Target margin | Equal markup |
|---|---|
| 20% | 25.0% |
| 30% | 42.9% |
| 40% | 66.7% |
| 50% | 100% |
Reading margins honestly
Gross margin shows whether the product itself is priced sanely; net margin shows whether the business survives payroll, rent and software. A 40% gross / 16% net business is normal. Compare against your own industry's typical band rather than a universal number — software, groceries and construction live at completely different margin levels.
Try the calculators
Worked example: Profit Margin Calculator at its default inputs
Open Profit Margin Calculator and press calculate without editing a field. What comes back is the table and result below, so the profit-margin numbers here are checkable in one click.
| Input | Default |
|---|---|
| Revenue | 50000 |
| Cost | 35000 |
Result: Margin: 30.00%
The steps behind that answer
- Formula: Margin = (Revenue - Cost) / Revenue × 100
- Step 1: Profit = $50000 - $35000 = $15000.00
- Step 2: Margin = $15000.00 / $50000 × 100 = 30.00%
Sensitivity: Revenue from half to one-and-a-half times
Same calculator, same fields, one change: revenue.
| Revenue | Result |
|---|---|
| 25,000 | Margin: -40.00% |
| 50,000 | Margin: 30.00% |
| 75,000 | Margin: 53.33% |
Read the three rows as a range: the spread between them is how much the answer depends on revenue alone, with everything else held still.
Related guides
Margin and markup are not the same percentage
Margin divides profit by the selling price; markup divides it by the cost. A 20% margin is a 25% markup, and a 50% markup is a 33% margin. The gap widens as the numbers grow, which is why a business that prices from cost and reports from revenue can look profitable on paper and run out of cash.
The rule that prevents the confusion: to hit a target margin, divide cost by (1 minus the margin), not multiply cost by (1 plus the margin). A 30% margin on a 70 cost is 100, while a 30% markup gives 91 and quietly loses nine points of margin on every sale.
Gross margin hides the costs that sink businesses
Gross margin counts only the direct cost of the goods or hours sold. Rent, salaries, software, marketing and payment fees sit below it. A product at 60% gross margin can still lose money if the fixed base is large relative to volume.
That is why break-even belongs next to margin: margin says how much each sale contributes, break-even says how many sales are needed to cover the fixed base. Either number alone leaves half the picture out.
Discounts cost more margin than they look
A 10% discount on a 30% margin product removes a third of the profit, not a tenth. The reason is that margin is calculated on the reduced price while cost is unchanged, so the percentage of profit falls faster than the percentage of price.
Before discounting, compute the margin after the discount and the volume increase needed to hold profit. Most discounts do not generate that volume, which is why promotional pricing needs a target rather than a habit.
Taxes, returns and payment fees
Margin is normally calculated before tax on profit, but sales tax, card fees and returns all reduce what actually arrives. Card fees of 2-3% come straight off the top; a return costs the shipping twice and the payment fee usually stays with you.
Include them when comparing channels. A marketplace that charges 15% commission can still beat your own store if your store loses 5% to fees, 3% to returns and a fixed cost to acquisition.
Frequently asked questions
How do I calculate profit margin?
Divide profit by revenue and multiply by 100. Gross margin uses revenue minus cost of goods; net margin subtracts operating costs too. Example: $50,000 revenue, $30,000 COGS → 40% gross margin.
What is the difference between margin and markup?
Margin is profit divided by price; markup is profit divided by cost. A 40% margin equals a 66.7% markup. Setting prices by markup when you meant margin systematically underprices your products.
How do I price for a target margin?
Price = cost ÷ (1 − target margin). For a 40% margin on $30,000 of cost: 30,000 ÷ 0.6 = $50,000. Check the result with the margin formula — it should return exactly your target.
What is a good profit margin?
It depends entirely on industry. Compare against sector norms: margins that are healthy in software would be impossible in grocery retail and vice versa. Trend over time matters more than any absolute number.
Last updated