Profit margin = (price − cost) ÷ price × 100. Markup takes the same profit over a different base: markup = (price − cost) ÷ cost × 100. A $100 item that cost $80 carries a 20% margin and a 25% markup. Same $20 of profit, measured two ways.
Same profit, different denominator
Margin and markup describe the exact same dollar of profit. The only difference is what you divide it by.
- Gross margin = profit ÷ selling price
- Markup = profit ÷ cost
Buy an item for $60 and sell it for $100. The profit is $40 either way. As a share of the $100 the customer paid, that's a 40% margin. As a share of the $60 you paid, it's a 66.7% markup. The sale didn't change. The question did.
On any profitable sale the price is bigger than the cost, so the margin side always divides by the larger number. That means markup is always the bigger number, and it's why swapping one for the other hurts so much. Nothing breaks and no error shows up. You just price lower than you meant to, on every unit, for as long as the mistake lasts.
Memorize the two conversions. They are the whole subject:
- markup = margin ÷ (1 − margin)
- margin = markup ÷ (1 + markup)
The trap: a 40% markup is not a 40% margin
This is how the mistake usually shows up. A buyer decides the business needs a 40% margin. The cost is $60. They multiply by 1.40, get $84 and put it on the shelf.
That $84 price brings in $24 of profit on $84 of revenue: a 28.6% margin. The target was 40%. They're eleven and a half points short with no reason to suspect it, because the number they typed and the number they wanted were both "40".
The right price for a 40% margin on a $60 cost is $100, a 66.7% markup. The gap between $84 and $100 is sixteen dollars of profit per unit, far too big to be rounding. On a product moving a thousand units a month, that's $16,000 a month walking out the door with a smile.
It cuts the other way too. A distributor quoting "50% markup" is describing a 33.3% margin. A supplier promising "you can make 100% on this" means the price is double the cost, which is a 50% margin. Any time someone gives you a percentage without saying which base it sits on, the number is ambiguous, and the difference always costs money.
Why a 100% margin cannot exist
A 100% margin would mean the profit equals the whole selling price, so the item cost you nothing. Above 100% is worse: it takes a negative cost, a supplier paying you to take the goods.
This matters in practice, because the arithmetic actually breaks. Price is cost ÷ (1 − margin), so a 100% margin divides by zero. Calculators that don't check for it return infinity or a blank, and the user blames the tool instead of the request. This one rejects the input and tells you why: if you're reaching for a number above 100%, you're thinking in markup.
Markup has no ceiling at all. A 100% markup means doubling the cost, which is completely ordinary. Fashion apparel routinely runs 100% to 150%. Restaurant wine lists often hit 300%. Prescription eyewear can go past 1,000%. Every one of those is a normal markup, and none of them is possible as a margin. Keep that in mind the next time a headline reports an "800% margin" on something.
What belongs in cost of goods sold
Gross margin is only as honest as the cost you feed it. Cost of goods sold should include everything that moves directly with making or buying the unit you sold:
- The supplier's purchase price, net of any volume rebate you actually receive.
- Inbound freight and import duty, because landing the goods is part of acquiring them.
- Direct labor and materials for anything you manufacture or assemble.
- Packaging that ships with the product.
- Payment processing and marketplace commission, if you want a margin that matches reality instead of a textbook.
What stays out: rent, salaries for people who don't make the product, software subscriptions, advertising and your own salary. Those are operating expenses. They're real, they're often bigger than COGS, and they're exactly what stands between gross margin and money in your account. They go on the line below, not inside the unit cost.
Watch for two traps. The first is forgetting inbound freight, easy to do when the invoice arrives separately from the goods, and it can quietly eat five to fifteen points of margin on heavy or bulky items. The second is counting outbound shipping you charge the customer, which inflates both sides of the math and makes low-margin products look healthier than they are.
Retail, wholesale and SaaS run on different margins
"Is my margin good?" has no answer without a sector. Gross margin doesn't measure how well you negotiate. It's a structural property of the business model, and it only means something next to comparable businesses.
| Business | Typical gross margin | Why |
|---|---|---|
| Grocery | 20-28% | Volume model; perishability and price transparency cap the number. |
| General retail | 35-50% | Has to fund rent, staff and shrinkage out of the gross line. |
| Apparel and beauty | 50-65% | High markdown risk is priced in from the start. |
| Restaurants (food) | 60-70% | Labor and rent sit below the line and eat most of it. |
| Wholesale and distribution | 15-25% | Thin per-unit margin, high turnover, low handling cost. |
| SaaS and software | 75-85% | COGS is hosting and support, not manufacturing. |
| Professional services | 40-60% | COGS is the delivery team's time; utilization drives everything. |
The SaaS row needs a note, because that's where gross margin gets abused most. Software COGS is hosting, third-party API costs, payment fees and the support and onboarding staff who keep accounts running. Sales, marketing and engineering don't go in it. A company reporting 90% gross margin has usually pushed support costs into operating expense. One reporting 60% is either heavy on infrastructure or honestly counting a services piece. Both numbers can be defended, and you can't compare them without knowing what went into the cost line.
A discount costs far more than the discount
Discounts feel like they come out of revenue. They come out of profit, and profit is a much smaller pool.
Take a product priced at $100 with a $70 cost: 30% margin, $30 of profit. Knock 10% off and the price drops to $90 while the cost stays at $70. Profit is now $20. You gave away 10% of the price and a third of the profit. As a rule, the share of profit you lose equals the discount divided by the margin. That's why the same 10% off is survivable at a 60% margin and lethal at 12%.
The volume you need to make up for it is what catches people. To earn the same $30 of total profit at $20 a unit, you have to sell 50% more units, not 10% more. Those extra units bring their own picking, packing, shipping and support costs, so the real break-even volume is higher still.
There's also a hard floor. Once the discount reaches the margin, profit is exactly zero, and every unit past that is a loss you're financing. On a 30% margin, 30% off is the limit. That's why a blanket "25% off everything" sale is dangerous across a mixed catalog: on high-margin lines it costs a slice of profit, and on thin ones it sells below cost.
When your cost goes up, raise the price by the same percentage
A supplier raises your cost from $60 to $66. The instinct is to add $6 to the price and move on. That protects profit per unit (you still make $40), but it quietly drops the margin from 40% to 37.7%. It also ignores the extra $6 of working capital now tied up in every unit sitting in your warehouse.
To hold the margin, raise the price by the same percentage as the cost. Since price = cost ÷ (1 − margin), price is a fixed multiple of cost: a 10% cost increase needs a 10% price increase, from $100 to $110, at any margin level. The tool calculates this directly and also shows what happens if you absorb the increase. With cost at $66 and price held at $100, the margin falls to 34%. Six points gone.
Six points sounds small until you hold it up against net margin. A retailer running a 6% net margin who absorbs six points of gross margin is left with no profit at all.
Gross, contribution and net margin are three different numbers
Gross margin is the first line, not the last. People use three margins interchangeably, and each one answers a separate question.
- Gross margin is price minus the cost of the goods. It tells you whether the product itself works and whether your pricing can absorb a discount.
- Contribution margin is price minus every cost that moves with the sale: goods, commission, payment fees, freight out. It tells you how much each extra sale puts toward fixed costs, which is the number you need for break-even and for deciding whether to take a marginal order.
- Net margin is what's left after everything, including rent, salaries, marketing and tax. It's the only one that answers "am I making money?"
The distance between them is where businesses fail without noticing. A 40% gross margin sounds comfortable. If operating expenses run 30% of revenue and tax takes another 6%, net margin is 4%, and one point of gross margin lost to discounting wipes out a quarter of the profit. Put your real overhead and tax figures into the calculator and the gross number stops looking reassuring. That's the point.
Privacy
Every figure stays in your browser. Nothing is uploaded, nothing is logged and there is no account. That matters more here than on most calculators, because what you type is your supplier pricing, your cost base and the margins you wouldn't paste into a stranger's form.
Frequently asked questions
What is the difference between margin and markup?
Same profit, different divisor. Margin is profit divided by the selling price. Markup is profit divided by the cost. Buy for $60, sell for $100, and the $40 of profit is a 40% margin and a 66.7% markup. Both are correct, and neither is a matter of opinion. They answer different questions: margin tells you how much of the customer's money you keep, and markup tells you how much you added on top of what you paid.
If I want a 40% margin, what markup do I apply?
66.7%. The formula is markup = margin ÷ (1 − margin), so 0.40 ÷ 0.60 = 0.667. Apply a 40% markup instead and a $60 cost sells for $84, which is a 28.6% margin. That is more than eleven points under target, low enough to turn a profitable product into a break-even one once overhead is counted. It is the most common pricing error in retail, and it never announces itself.
Can a margin be more than 100%?
No. Margin is profit as a share of the selling price, and profit can't be bigger than the price unless the product cost less than nothing. A margin of exactly 100% means the item cost you zero. Markup has no ceiling: a 100% markup just means doubling the cost, and 400% is routine in jewelry, cosmetics and restaurant drinks. When a supplier or a course promises a 200% margin, they mean markup.
How much profit does a 10% discount actually cost me?
More than 10%. The discount comes out of profit, not revenue, so the share of profit you lose is the discount divided by the margin. At a 30% margin, 10% off wipes out a third of the profit, and you need to sell 50% more units to bring home the same money. At a 20% margin the same discount takes half. When the discount equals the margin, profit is exactly zero no matter how much volume you move.
My supplier raised the cost 10%. How much do I raise the price?
Raise it 10%, not by the dollars the cost went up. Price equals cost divided by one minus the margin, so price is a fixed multiple of cost. Whatever percentage the cost rises, the price has to rise by the same percentage to hold the margin. Passing on only the extra dollars keeps your profit per unit but lowers the margin. On a 40% margin item whose cost goes from $60 to $66, holding the price at $100 drops the margin to 34%.
Is a 50% margin good?
Depends on what sits below the gross line. A software company at 50% gross margin is in trouble: the sector norm is 75% to 85%, and investors price the gap. A grocery chain at 50% would be extraordinary, since the norm is closer to 25%. Gross margin has to pay for everything else (rent, salaries, marketing, tax), so the real question is whether it's high enough to cover what comes after it.
Are my numbers sent anywhere?
No. Everything runs in your browser as plain arithmetic. Nothing is uploaded, nothing is stored and there is no account. That matters here, because what you type is your real cost base and your pricing strategy.