How to Calculate Profit Margin
Profit margin is the share of a sale you actually keep. Subtract what the item cost you from what you sold it for, then express that profit as a percentage of the selling price. The percentage matters more than the amount: $40 profit is excellent on a $100 sale and poor on a $1,000 one.
Margin (%) = (Profit ÷ Revenue) × 100
Markup (%) = (Profit ÷ Cost) × 100
Price for a target margin = Cost ÷ (1 − Margin ÷ 100)
You buy a product for $60 and sell it for $100. Gross profit is 100 − 60 = $40. Margin is (40 ÷ 100) × 100 = 40%. The same $40 measured against the cost is a markup of (40 ÷ 60) × 100 = 66.67% — the identical deal, two different numbers.
Margin vs. Markup: The Mistake That Costs Real Money
This is the single most expensive confusion in small-business pricing. If you want a 40% margin and you "add 40%" to your cost, you charge $84 on a $60 item — which is only a 28.6% margin. You have quietly given away more than a quarter of your intended profit on every single sale. To hit a 40% margin you must divide by 0.60, giving $100.
Because they share the same profit but use different denominators, margin and markup convert cleanly between each other:
Margin = Markup ÷ (100 + Markup) × 100
Margin ↔ Markup Conversion Table
| Margin | Equivalent markup | Price on $60 cost |
|---|---|---|
| 10% | 11.1% | $66.67 |
| 20% | 25.0% | $75.00 |
| 25% | 33.3% | $80.00 |
| 30% | 42.9% | $85.71 |
| 40% | 66.7% | $100.00 |
| 50% | 100% | $120.00 |
| 60% | 150% | $150.00 |
| 75% | 300% | $240.00 |
Margin or Markup? A Situation-by-Situation Guide
Neither number is more correct than the other — they answer different questions, and using the wrong one is where the money leaks. The rule of thumb: markup is how you price, margin is how you report. Markup starts from what you paid, so it is the natural way to build a price upward. Margin starts from what you charged, so it is the language of profit-and-loss statements, industry benchmarks and investors.
| Situation | Use | Why, and what goes wrong |
|---|---|---|
| Pricing stock from a supplier invoice | Markup | You are starting from a known cost, so multiplying it is the natural step. A fixed "keystone" markup keeps pricing consistent across a catalogue. |
| Reporting to a lender, investor or accountant | Margin | Every profit-and-loss statement expresses profit as a share of revenue. Quoting markup here overstates your performance to anyone reading it as margin. |
| Comparing yourself to an industry benchmark | Margin | Published sector figures are margins, essentially without exception. Comparing your 66.7% markup to a "40% industry average" margin flatters you by the same deal counted twice. |
| Hitting a target profit on a job or quote | Margin | Work backwards: price = cost ÷ (1 − margin). Adding the target percentage to cost instead is the classic trade-quoting error and lands you well short. |
| Setting a discount ceiling for a sales team | Margin | Margin tells you how much room the price actually has. A 20% discount on a 25% margin removes four fifths of the profit, which markup hides. |
| Negotiating cost down with a supplier | Markup | The cost is the variable you are changing, so markup shows the effect directly. Shaving 10% off cost at a 50% markup lifts the margin by roughly three points. |
| Selling on Amazon, Etsy or eBay | Margin | Platform fees are charged on the selling price, so they come straight out of margin. Treat the fee as a cost before you calculate, or the number you get is fiction. |
| Restaurant and bar menu pricing | Both | Kitchens price by markup on food cost (a 3× multiplier is common), then report gross margin. The two coexist — just never mix them in the same sentence. |
One last sanity check that catches most errors: markup is always the bigger number. If someone quotes you a percentage above 100%, it cannot be a margin. If your "margin" went up when you switched spreadsheets, you have probably switched metric without noticing.
Gross Margin vs. Net Margin
This calculator computes gross margin — revenue minus the direct cost of the goods sold. It deliberately ignores rent, wages, software, marketing and tax, because those are not part of a single product's unit economics. Net margin subtracts all of them, and it is the number that tells you whether the business itself makes money. A café can run a 70% gross margin on coffee and still close, because the rent ate the difference. To work that out, use the profit calculator, and to find how many units cover your fixed costs, the break-even calculator.
Typical Gross Margins by Industry
| Sector | Typical gross margin | Why |
|---|---|---|
| Grocery / supermarket | 25–30% gross, 1–3% net | High volume, thin unit economics |
| Restaurants | 60–70% on food, 3–9% net | Labour and rent consume the gross |
| General retail / apparel | 40–55% | Markdowns and returns erode it |
| Construction & trades | 15–25% | Materials dominate cost |
| Professional services | 50–70% | Cost is mainly billable time |
| Software / SaaS | 70–90% | Near-zero cost per extra copy |
Treat these as orientation, not targets — margins vary widely by country, size and business model. Your own trend over time is the more useful comparison.
Margin Formulas for Excel and Google Sheets
If you are pricing more than a handful of products, do it in a spreadsheet. Put the cost in column A and the selling price in column B, then paste one of these into row 2 and drag it down. The formulas are identical in Microsoft Excel, Google Sheets and LibreOffice Calc.
| What you want | Formula |
|---|---|
| Gross profit | =B2-A2 |
| Gross margin (as a %) | =(B2-A2)/B2 |
| Markup (as a %) | =(B2-A2)/A2 |
| Price for a target margin in C2 | =A2/(1-C2) |
| Price for a target markup in C2 | =A2*(1+C2) |
| Convert markup to margin | =C2/(1+C2) |
| Convert margin to markup | =C2/(1-C2) |
| Guard against a zero price | =IFERROR((B2-A2)/B2,0) |
Two things trip people up. First, format the margin and markup cells as
Percentage (Ctrl+Shift+5 in Excel, Format → Number →
Percent in Sheets) — otherwise a 40% margin displays as 0.4. Second, if you
type the target as 40 rather than 40%, divide it
by 100 inside the formula: =A2/(1-C2/100). The
Export to CSV button above drops the current calculation
straight into a spreadsheet with the columns already laid out.
Watch the Tax Line
Sales tax, VAT and GST are collected on behalf of the government and are never yours. Calculating margin on a tax-inclusive price inflates it and hides a real problem: a 20% VAT-inclusive price of $120 is only $100 of revenue. Strip tax out first with the sales tax and VAT calculator, then bring the net numbers here.
What Discounts Do to Your Margin
Discounts come straight out of profit, so their effect on margin is much larger than their headline percentage. On a $100 sale at 40% margin, a 10% discount cuts profit from $40 to $30 — a 25% reduction in earnings for a 10% price cut. To sell at a discount and hold your margin, you need volume to rise substantially. Our discount calculator handles the price side, including stacked offers.
In practice How an Amazon FBA seller works out their real margin
Priya manufactures a kitchen gadget for $15 a unit and lists it at $45. Her gross profit is 45 − 15 = $30, so her gross margin is (30 ÷ 45) × 100 = 66.67%. On paper that looks exceptional — software-tier margins on a physical product.
Then the platform takes its cut. Amazon's referral fee plus FBA fulfilment comes to about $5 per unit. That fee is a cost of making the sale, so it belongs in the calculation: 45 − 15 − 5 = $25 profit, and (25 ÷ 45) × 100 = 55.6%. One line item moved her margin by more than eleven points.
Add the parts sellers routinely forget — inbound shipping, storage, returns, and advertising spend — and the number that actually lands in the bank is lower again. The practical habit: put your fully-loaded per-unit cost into the Cost field, not just the manufacturing price. Type 20 (15 + 5) and 45 into the calculator above and you will see the honest 55.6% rather than the flattering 66.67%.
To find the price she would need for a target margin, Priya can type her cost and a margin instead: enter 20 and 60, and the calculator returns a selling price of $50.
Frequently Asked Questions
How do you calculate profit margin?
Subtract cost from revenue to get profit, divide that profit by revenue, and multiply by 100. An item costing $60 and sold for $100 makes $40 profit, so the margin is (40 ÷ 100) × 100 = 40%.
What is the difference between margin and markup?
Both compare the same profit to a different base. Margin divides profit by the selling price; markup divides the same profit by the cost. Buying at $60 and selling at $100 is a 40% margin but a 66.7% markup. Margin can never reach 100%; markup has no upper limit.
How do I find the selling price for a target margin?
Divide the cost by (1 − margin as a decimal). For a 40% margin on a $60 item: 60 ÷ 0.60 = $100. Do not add 40% to the cost — that produces a 28.6% margin, and it is the single most common pricing mistake in retail.
What is the difference between gross margin and net margin?
Gross margin counts only the direct cost of the goods sold, which is what this calculator uses. Net margin also subtracts operating expenses such as rent, salaries, marketing and tax. A shop can have a healthy 50% gross margin and still lose money on net. Use our profit calculator for the net figure.
Is margin calculated before or after tax?
Margin should be calculated on the net (tax-exclusive) amounts. Sales tax and VAT are collected on behalf of the government, so they are neither revenue nor profit. If your price includes tax, strip it out first with our sales tax and VAT calculator, then use the net figure here.
How do you calculate a 20% profit margin?
Divide the cost by 0.80. For a $40 item: 40 ÷ 0.80 = $50, which leaves $10 of profit on a $50 sale — exactly 20% of the selling price. Do not add 20% to the cost: $48 would only be a 16.7% margin. The general rule is price = cost ÷ (1 − margin ÷ 100).
What is a good profit margin?
It depends entirely on the industry. Grocery retail commonly runs on 1–3% net margin, restaurants around 3–9%, general retail 20–50% gross, and software 70–90% gross. Compare yourself against your own sector and your own history rather than a universal number.
Can profit margin be more than 100%?
No. Margin is profit as a share of the selling price, and profit can never exceed the price you charged, so margin approaches but cannot reach 100%. If you have calculated a margin above 100%, you have almost certainly calculated markup instead.
Does "margin calculator" mean something different in trading?
Yes — in stock and forex trading, margin means the deposit required to open a leveraged position, which is an unrelated calculation. This page covers business profit margin (pricing). A separate trading margin calculator is planned.
Sources & Further Reading
- Financial Management: Theory & Practice — profitability ratios — Brigham & Ehrhardt, Cengage Learning
- Gross margin and cost of goods sold definitions — U.S. Small Business Administration
- Annual Retail Trade Survey — sector gross margin data — U.S. Census Bureau
Cite This Calculator
Using this calculator in an assignment, article or lesson? Copy a ready-made citation — or the link snippet if you're referencing it from a web page.
The CalculatorsGuide Editorial Team. (2026). Margin Calculator. CalculatorsGuide. Retrieved from https://www.calculatorsguide.com/finance/margin-calculator/