Margin Calculator
A $100 cost sold for $150 gives a gross margin of 33.3% and a markup of 50%. Margin divides profit by price, markup divides profit by cost, so the same sale reads as two different percentages. Hit a 40% margin on a $60 cost by charging $100.
| Gross margin | |
| Markup on cost | |
| Gross profit per unit | |
| Net margin after operating cost | |
| Net profit per unit | |
| Cost as a share of price | |
| Revenue at the quantity entered | |
| Net profit at the quantity entered |
Gross margin divides profit by price, markup divides profit by cost. All calculations run in your browser, and nothing you type is uploaded or stored.
Enter your cost and selling price to see gross margin, markup and profit in dollars, then add operating costs to see the net margin you keep.
Key takeaways
- A $100 cost sold at $150 is a 33.3% margin and a 50% markup
- Markup divides by cost and margin divides by price, so 50% markup is only 33.3% margin
- To earn a 40% margin on a $60 cost, charge $100
- Net margin subtracts operating costs: $35 left on a $50 gross profit
- Grocery gross margins run 25% to 30%, software 75% to 85%
On this page
Gross margin, in one sentence
Gross margin is the share of each sales dollar left after you pay for the thing you sold. If an item costs you $100 and you sell it for $150, you keep $50, and $50 out of $150 is 33.3 cents on the dollar.
The formula is: margin = (price - cost) ÷ price × 100. It is always a percentage of the selling price, never of the cost. That single choice of denominator is where most pricing arguments start, because the same $50 is 33.3% of the price and 50% of the cost.
Gross margin stops at the cost of goods. It does not pay rent, wages, card fees, ads, insurance or your own time. Those belong to net margin, which is the number that decides whether the business survives. A 50% gross margin sounds healthy until the operating costs land at 45%.
The calculator shows both, plus the markup, so you can see the three numbers side by side for the same sale.
Margin and markup are not the same number
Markup is profit divided by cost. Margin is profit divided by price. Cost $100, price $150, and the profit is $50 either way, but markup is 50 ÷ 100 = 50% and margin is 50 ÷ 150 = 33.3%.
The gap widens as the numbers grow. A 100% markup is a 50% margin. A 200% markup is a 66.7% margin. There is no markup percentage that produces a margin above 100%, and no margin above 50% without a markup above 100%. The conversion is margin = markup ÷ (1 + markup), and markup = margin ÷ (1 - margin).
| Cost | Price | Profit | Gross margin | Markup |
|---|---|---|---|---|
| $100 | $110 | $10 | 9.1% | 10% |
| $100 | $125 | $25 | 20.0% | 25% |
| $100 | $150 | $50 | 33.3% | 50% |
| $100 | $175 | $75 | 42.9% | 75% |
| $100 | $200 | $100 | 50.0% | 100% |
Read the last row carefully. Doubling your cost is the only way to reach a 50% margin. A seller who says "I run a 50% markup" and a seller who says "I run a 50% margin" are describing businesses that are 17 points apart, and the second one charges $200 for the same $100 item.
This is why a supplier's price sheet and a retailer's margin report never seem to agree. The sheet quotes markup over cost. The report quotes margin over sales. Both are honest, and mixing them up costs real money.
Worked example: cost 100, price 150
Take the most common example in pricing, and run every number the calculator shows.
- Unit cost: $100.00
- Selling price: $150.00
- Gross profit: $50.00
- Gross margin: 50 ÷ 150 = 33.3%
- Markup: 50 ÷ 100 = 50.0%
Now add $15 of operating cost per unit, which could be a card fee, packing and a share of the rent. Net profit is $35.00, and net margin is 35 ÷ 150 = 23.3%. The gross margin did not move. Only the net number did.
Multiply by volume and the stakes get clearer. At 200 units a month the revenue is $30,000, gross profit is $10,000 and net profit is $7,000. Cut the price to $140 to win a customer and gross profit per unit falls to $40, so 200 units now produce $8,000 instead of $10,000. You would need 250 units to match the old gross profit, a 25% increase in volume for a 6.7% price cut.
That trade is the whole argument about discounting. A small price cut needs a large volume increase to break even, and most discounts do not produce it.
Net margin: what is left after you operate
Gross margin is the first checkpoint, not the finish line. Net margin subtracts the cost of running the business: payment processing, outbound shipping, packaging, advertising, software, rent, wages, insurance and taxes.
Work a $50 sale with a $20 cost. Gross profit is $30, a 60% gross margin. Then the card fee takes $1.50, shipping $6.00, ads $4.00 and allocated overhead $6.00. That is $17.50 of operating cost, so net profit is $12.50 and net margin is 25%. The business kept half of what the gross margin suggested.
For a physical product, the three costs that surprise people most are shipping, returns and marketplace fees. A 15% marketplace commission on a $50 sale is $7.50, which takes 15 points off that 60% gross margin and leaves only $5.00 of the $12.50 net profit. Payment fees look small at 2.9% plus 30 cents, but on a $12 item the fixed 30 cents alone is 2.5% of the price.
Service businesses have the opposite problem. There is no cost of goods, so gross margin looks like 90% or more, and then labor arrives. If you bill $100 an hour and pay a technician $30, the gross margin is 70%, but only if the technician is billable every hour. At 70% utilization the real cost per billed hour is $42.86 and the margin drops to 57%.
Pricing to a target margin
Working forward from cost and price gives you the margin you have. Working backward from a target margin gives you the price you need. The formula is price = cost ÷ (1 - target margin).
On a $100 cost, a 20% target margin needs a price of $125. A 30% target needs $142.86. A 40% target needs $166.67. A 50% target needs $200, because 50% margin is a 100% markup.
| Target margin | Price at $100 cost | Markup needed | Profit per unit |
|---|---|---|---|
| 20% | $125.00 | 25% | $25.00 |
| 30% | $142.86 | 42.9% | $42.86 |
| 40% | $166.67 | 66.7% | $66.67 |
| 50% | $200.00 | 100% | $100.00 |
| 60% | $250.00 | 150% | $150.00 |
Notice how the price curve steepens. Going from a 20% to a 30% target adds $17.86 to the price. Going from 50% to 60% adds $50. Each extra point of margin costs more than the one before, which is why high margin categories are usually high price categories or low cost ones.
The SBA guide to startup costs is a useful checklist for the operating costs that have to fit inside the gap between gross and net margin.
Industry benchmarks and why they differ
A margin that is healthy in one trade is impossible in another. The ranges below are typical gross margins, drawn from the NYU Stern margin data by industry and the Census Annual Retail Trade Survey.
| Business type | Typical gross margin | What drives it |
|---|---|---|
| Grocery stores | 25% to 30% | Volume, thin spoilage tolerance, price-sensitive shoppers |
| Auto dealers | 12% to 18% | Large ticket, heavy competition, profit in service and finance |
| Consumer electronics | 15% to 25% | Price transparency, fast obsolescence |
| Hardware and home improvement | 40% to 45% | Mixed inventory, private label lines |
| Furniture | 45% to 50% | Slow turns, high handling cost |
| Apparel | 50% to 60% | Markdown risk, seasonality |
| Restaurants, food only | 60% to 70% | Labor sits below the gross line |
| Software and digital goods | 75% to 85% | Near zero marginal cost per copy |
The pattern is inventory risk. A grocery store turns stock 12 to 15 times a year on a 27% margin and still pays the bills, because the same dollar of inventory earns its margin again every month. A furniture store on 48% margin turns stock three or four times and needs the fatter margin to survive the wait.
So the useful comparison is not "what margin should I have" but "what margin does my category support, and how fast does my stock turn". A 20% margin with 15 turns beats a 50% margin with 2 turns on the same capital.
Four ways a margin report lies to you
The arithmetic is simple. The inputs are where errors live.
- Markup reported as margin. A 50% markup entered as a 50% margin understates the price by $50 on a $100 cost, and the seller wonders why the year ends short.
- Cost that leaves out freight. If inbound shipping is 6% of the unit cost and you price on the ex works cost, your real margin is about 6 points lower than the report says.
- Fees and returns outside the model. A 40% margin with 8% returns and 3% card fees is closer to 32% once both are counted.
- A blended average that hides a loser. A shop selling 70% margin accessories and 8% margin laptops can report 25% overall while the laptop line loses money on every unit after shipping.
Fix all four the same way: build the margin from the invoice, not from memory. Cost of goods includes freight and duty, revenue is net of discounts and returns, and every fee that appears on a statement belongs in the net calculation.
One more habit is worth the effort. Track margin by product, not just by month. A store with a flat 32% blended margin can be quietly swapping profitable sales for volume, and the average will not show it until the cash runs out.
Frequently asked questions
What is the difference between margin and markup?
Margin is profit divided by price. Markup is profit divided by cost. A $100 cost sold at $150 is a 33.3% margin and a 50% markup, and both describe the same $50.
How do you calculate gross margin?
Subtract cost from price, then divide by price and multiply by 100. On a $40 sale with a $25 cost, the profit is $15 and the margin is 15 ÷ 40 = 37.5%.
What is a 40% margin on a $60 cost?
A price of $100. Divide the cost by one minus the target margin: 60 ÷ 0.60 = 100. The profit is $40, which is 40% of the price and a 66.7% markup.
Is a 50% markup the same as a 50% margin?
No. A 50% markup on a $100 cost gives a $150 price, which is a 33.3% margin. To reach a 50% margin you need a 100% markup, so the price has to be double the cost.
What is a good gross margin?
It depends on the trade. Grocery stores run 25% to 30%, hardware 40% to 45%, apparel 50% to 60% and software 75% to 85%. Compare with your own category, not with the highest number you can find.
What is net margin?
What is left after operating costs. A $50 sale with a $20 cost has a 60% gross margin, but payment fees, shipping, ads and overhead of $17.50 leave $12.50, which is a 25% net margin.
How do I convert margin to markup?
Divide the margin by one minus the margin. A 33.3% margin is 0.333 ÷ 0.667 = 50% markup. A 20% margin is 25% markup, and a 40% margin is 66.7% markup.
How much extra volume does a 10% price cut need?
At a 50% margin, cutting the price 10% takes profit per unit from $50 to $40, so you need 25% more units to keep the same gross profit. At a 20% margin the same cut needs 100% more units.
Does shipping count in cost of goods?
Inbound freight to your door usually does, because it is part of getting the item ready to sell. Outbound shipping to the customer is normally an operating cost, and it belongs in the net margin calculation.
What margin do restaurants make?
Food gross margin runs 60% to 70%, but labor, rent and utilities take most of it back. Net margin for a full service restaurant is often 3% to 5% of sales, which is why a 60% food margin is not a 60% profit.
How do payment fees affect margin?
They come straight off the top. A 2.9% plus 30 cent card fee on a $50 sale is $1.75, which cuts a 60% gross margin to about 56.5% before any other cost.
What is a blended margin?
The average across everything you sell, weighted by sales. A shop with 70% margin on cables and 8% on laptops can post a 25% blended margin, and that average hides which product is paying the rent.
Should I price to a margin or a markup?
Price to the margin you need, then check the markup so you can compare with competitors who quote it that way. A target margin translates directly into profit per dollar of sales, which is what covers fixed costs.
How do returns affect margin?
Every return costs the sale, the shipping both ways and sometimes the item. If 8% of orders come back and the goods cannot be resold, a 40% margin on $100 orders falls to about 34% of the sales you keep.
Spotted a wrong number or a broken result?
More Finance tools
- $100,000 Loan for 15 Years Calculator
- $15 an Hour Is How Much a Year?
- $15,000 Loan Over 5 Years Calculator
- $20 an Hour Is How Much a Year?
- $25 an Hour Is How Much a Year?
- $30 an Hour Is How Much a Year?
- 1 Year CD Rate Calculator
- 10 Year ARM Mortgage Calculator
- 10 Year Equipment Loan Calculator
- 10-Year Balloon Mortgage Calculator
- 10-Year Fixed Loan Calculator
- 10-Year Fixed Mortgage Calculator
- 10-Year Fixed Mortgage Rates Calculator
- 10-Year Second Mortgage Calculator
- 10/1 ARM vs 30 Year Fixed Calculator
- 1099 vs W-2 Calculator
Fee schedules, rates and rules change without notice. Always confirm important figures with the official source before you rely on them.