Profit margin tells you how much of every dollar of sales you keep as profit. It’s the single most useful number for pricing, comparing products and checking whether your business is healthy, yet many owners mix it up with markup and underprice as a result. This guide shows you how to calculate gross, operating and net margin, with a calculator, worked examples, a margin-to-markup table and practical ways to improve your margins.
Profit margin calculator
- Gross profit per unit$60
- Markup on cost150%
- Price for your target margin$100
How to calculate profit margin, step by step
- 01Find your revenueTotal sales for the period, before any costs (excluding sales tax or VAT).
- 02Subtract the right costsCost of goods sold for gross margin; add operating expenses for operating margin; add interest and tax for net margin.
- 03Divide profit by revenueProfit ÷ revenue gives a decimal, such as 0.35.
- 04Multiply by 1000.35 × 100 = a 35% margin.
- 05Compare over timeTrack margin monthly and by product to spot problems early.
Gross, operating and net margin: a worked example
Here’s a small online store’s year, showing how each margin is calculated from the same profit and loss statement.
| LINE | AMOUNT | MARGIN |
|---|---|---|
| Revenue | $250,000 | |
| Cost of goods sold (products, packaging, shipping) | −$110,000 | |
| Gross profit | $140,000 | Gross margin 56% |
| Operating expenses (wages, ads, software, rent) | −$105,000 | |
| Operating profit | $35,000 | Operating margin 14% |
| Interest and tax | −$9,000 | |
| Net profit | $26,000 | Net margin 10.4% |
Example figures. Gross margin shows whether your products are priced well; operating margin shows whether the business is run efficiently; net margin shows what’s left for the owners.
Margin vs markup: the difference that costs money
Margin is profit as a share of the selling price. Markup is profit as a share of the cost. They use the same profit but different bases, so the percentages differ, and confusing them is one of the most common pricing mistakes.
| COST | PRICE | PROFIT | MARKUP | MARGIN |
|---|---|---|---|---|
| $50 | $75 | $25 | 50% | 33.3% |
| $50 | $100 | $50 | 100% | 50% |
| $50 | $125 | $75 | 150% | 60% |
| $50 | $200 | $150 | 300% | 75% |
| TARGET MARGIN | MARKUP NEEDED | MULTIPLY COST BY |
|---|---|---|
| 20% | 25% | 1.25 |
| 25% | 33.3% | 1.33 |
| 30% | 42.9% | 1.43 |
| 40% | 66.7% | 1.67 |
| 50% | 100% | 2.00 |
| 60% | 150% | 2.50 |
| 70% | 233% | 3.33 |
How to price for the margin you want
Work backwards from the margin you need. Divide your cost by one minus the target margin: an item costing $40 needs a price of $40 ÷ (1 − 0.60) = $100 for a 60% gross margin. Then check the price against competitors and what customers will pay.
| PRICING APPROACH | HOW IT WORKS | BEST FOR |
|---|---|---|
| Cost-plus | Cost × a fixed multiplier | Simple products and quotes |
| Target margin | Cost ÷ (1 − target margin) | Protecting profit as costs change |
| Value-based | Price on the value to the customer | Services and differentiated products |
| Competitive | Price relative to alternatives | Commodity products |
What is a good profit margin?
It depends heavily on your industry and model. Software and services often have high gross margins because there’s little cost per sale; retail, restaurants and wholesale run on lower gross margins and rely on volume. Rather than chasing a universal number, compare your margins with businesses like yours (your accountant, trade association or industry reports can help) and track your own trend month by month.
| BUSINESS TYPE | GROSS MARGIN TENDS TO BE | WHY |
|---|---|---|
| Software and digital products | High | Very little cost per extra sale |
| Professional services | High | Main cost is people’s time, often in operating costs |
| Online retail | Medium | Product and shipping costs per order |
| Restaurants and food | Medium, with thin net margins | Food, labour and rent |
| Wholesale and distribution | Low | Volume business with small margins per unit |
How to improve your profit margin
| LEVER | EXAMPLE | EFFECT |
|---|---|---|
| Raise prices | 5% price rise | Goes straight to profit if volume holds |
| Cut cost of goods | Negotiate supplier prices or order in bulk | Lifts gross margin on every sale |
| Raise order value | Bundles, upsells, free shipping thresholds | Spreads fixed costs and fees |
| Drop low-margin products | Cut the bottom 10% by margin | Frees time and cash |
| Reduce overheads | Audit software and subscriptions | Lifts operating and net margin |
| Cut discounts | Fewer blanket sales; targeted offers instead | Protects margin on full-price buyers |
In this example, a 5% price rise adds $5,000 of profit and a 5% cost cut adds $3,000, because the price applies to the whole $100 while the cost cut applies only to the $60 cost. If volume drops after a price rise, check the break-even: here you could sell about 11% fewer units at the higher price and still make the same profit.
Track margins in your accounting software
Set up your accounting software so cost of goods sold is separate from operating expenses; then your profit and loss report shows gross and net margin automatically. Review it monthly, and track margin by product or service at least quarterly.
| SOFTWARE | MARGIN REPORTING |
|---|---|
| QuickBooks | Profit and loss, product and service profitability on higher plans |
| Xero | Profit and loss with tracking categories for products or locations |
| FreshBooks | Project profitability on Premium |
| Zoho Books | Profit and loss and item-level reports |
Common mistakes to avoid
FAQ
How do you calculate profit margin?
Divide profit by revenue and multiply by 100. For gross margin, profit is revenue minus cost of goods sold; for net margin, it’s profit after all expenses, interest and tax.
What is the profit margin formula?
Profit margin (%) = (revenue − costs) ÷ revenue × 100.
What is the difference between margin and markup?
Margin is profit as a percentage of the selling price; markup is profit as a percentage of cost. A 50% markup equals a 33.3% margin.
How do I calculate a price from a margin?
Price = cost ÷ (1 − margin). For a 40% margin on a $30 cost: $30 ÷ 0.6 = $50.
What is a good net profit margin for a small business?
It varies widely by industry. Compare with similar businesses and focus on improving your own trend over time.
What is the difference between gross and net profit margin?
Gross margin only subtracts the direct cost of what you sell; net margin subtracts every expense, including wages, rent, interest and tax.

















