Margin Calculator
Result
Gross margin
- Gross profit
- 40.00
- Markup
- 66.67%
- Markup minus margin
- 26.67%
Gross margin is the share of each sale you keep after the goods cost, and this calculator works it out from the two numbers a sale already leaves behind: what the item cost you and what you sold it for. It also prints the markup on the same sale, because the two percentages describe one profit and almost never match — a 40 percent margin is a 66.67 percent markup, and treating them as interchangeable is the most common pricing error there is. The difference between them gets its own line, so the size of the confusion is visible rather than something you have to remember.
The same margin expressed as a markup, from 10 to 60 percent
| Gross margin | Equivalent markup | Price as a multiple of cost |
|---|---|---|
| 10 | 11.11 | 1.111 |
| 20 | 25 | 1.25 |
| 30 | 42.86 | 1.429 |
| 40 | 66.67 | 1.667 |
| 50 | 100 | 2 |
| 60 | 150 | 2.5 |
No money appears in this table, and none is needed: each row converts a margin into the markup and the price multiple that describe the same sale, whatever the amounts involved. The axis is the margin, because that is the figure a reader arrives with after using the calculator above — if you sold something at a 30 percent margin, the row tells you that you charged a 42.86 percent markup and 1.429 times what you paid. The third column is the one to carry around: a price multiple is what a margin of 10 percent means in the language of a shop — charging a tenth more than cost — and it is the only column here that stays meaningful when the underlying amounts change. Notice the spacing between rows. From a 10 percent margin to 20, the markup moves 13.89 points; from 50 to 60 it moves 50 points. That acceleration is why the margin and the markup can be treated as near-synonyms in a low-margin business and why the habit becomes dangerous in a high-margin one.
Formula
Gross profit = revenue − cost; gross margin = gross profit ÷ revenue × 100; markup = gross profit ÷ cost × 100; the gap is the markup minus the margin
- Cost
- What the item cost you, before anything else. For a reseller this is the purchase price; for a maker it is the direct cost of the materials and labour that went into this unit. It does not include rent, salaries or marketing, which is what separates this figure from a net profit.
- Revenue
- What the customer paid, before any discount is deducted elsewhere. It is the selling price of the unit, or the total of the sale if you are looking at a batch — the arithmetic is the same either way as long as the cost covers the same units.
- Gross profit
- Revenue minus cost, in money. It is the same absolute figure whichever way you express it as a percentage, which is the reason a margin and a markup can describe one sale without being comparable numbers.
- Gross margin
- Gross profit divided by revenue. It answers what share of the price you kept, and it can never reach 100 percent while the item costs anything at all — a free item is the only one with a 100 percent margin.
- Markup
- Gross profit divided by cost. It answers how much you added to what you paid, and it has no ceiling: buy at 1 and sell at 100 and the markup is 9,900 percent. Dividing by the smaller number is what makes it the larger of the two percentages.
Use it when the sale has already happened or the price has already been set, and what you want is to measure it. Both inputs come off documents you have — an invoice and a receipt — so the answer is a fact about a sale rather than a decision about one. The direction is worth stating plainly, because this page has a twin: here you have the cost and the revenue and the percentage is the output; on the markup page you have the cost and a percentage you want to add and the price is the output. Same arithmetic, opposite direction, and the giveaway is which of the two fields is money. Two things to watch. Gross margin is not net margin: it is calculated before rent, wages, marketing and tax, so a healthy-looking 40 percent can still leave nothing at the bottom, and no figure here will tell you whether it does. And the gap between the margin and the markup grows as the margin rises — at 20 percent it is 5 points, at 50 percent it is 100 points — so the two numbers agree closely in low-margin businesses and diverge wildly in high-margin ones, which is precisely where people stop checking.
Worked examples
Buy at 60, sell at 100
- Gross profit: 100 − 60 = 40
- Gross margin: 40 ÷ 100 = 40 percent
- Markup: 40 ÷ 60 = 66.67 percent
- Gap: 66.67 − 40 = 26.67 points
One profit, two percentages, and 26.67 points of daylight between them. This is the same sale the markup page solves from the other end — enter a cost of 60 and a markup of 66.666667 there and it returns a price of 100 — which is the simplest demonstration that the two pages are one calculation asked in two directions.
Buy at 80, sell at 100 — the classic mix-up
- Gross profit: 100 − 80 = 20
- Gross margin: 20 ÷ 100 = 20 percent
- Markup: 20 ÷ 80 = 25 percent
- Gap: 5 points
A 20 percent margin and a 25 percent markup are the same 20 dollars. Both sentences are true of this sale, which is why a business that thinks it is pricing at a 20 percent markup while measuring a 20 percent margin is quietly charging less than it intends. The gap is small here, which is exactly why the error survives unnoticed in low-margin businesses.
Selling below cost: 120 cost, 100 revenue
- Gross profit: 100 − 120 = −20
- Gross margin: −20 ÷ 100 = −20 percent
- Markup: −20 ÷ 120 = −16.67 percent
- Gap: −16.67 − (−20) = 3.33 points
Both percentages go negative, and the gap stays positive because the markup is always the milder of the two when they are on the same side of zero — dividing the same loss by the larger denominator shrinks it. Losing money is a legitimate input here rather than an error, since a clearance sale is a real thing and its margin is a real number.
A high-margin item: 25 cost, 75 revenue
- Gross profit: 75 − 25 = 50
- Gross margin: 50 ÷ 75 = 66.67 percent
- Markup: 50 ÷ 25 = 200 percent
- Gap: 200 − 66.67 = 133.33 points
At high margins the two figures stop looking like variations on each other: a margin can never reach 100 percent, while a markup of 200 percent here is unremarkable. The gap tracks the margin, so if you only remember one rule, remember that the gap is small when the margin is small — and that the dangerous zone is the high-margin business where someone quotes a markup as though it were a margin.
Awkward money: cost 12.50, revenue 19.99
- Gross profit: 19.99 − 12.50 = 7.49
- Gross margin: 7.49 ÷ 19.99 = 37.47 percent
- Markup: 7.49 ÷ 12.50 = 59.92 percent
- Gap: 59.92 − 37.47 = 22.45 points
The percentages are derived from the rounded gross profit of 7.49, not from the full-precision difference, which is why the four figures on the panel always agree with each other. Work the margin out from an unrounded profit and you get a slightly different number than the one you would get by taking the printed profit and the printed revenue, and a reader who checks the arithmetic by hand would find a discrepancy that is not there.
Limitations
This is gross margin, measured before everything that is not the cost of the goods. Rent, wages, marketing, payment fees, shipping and tax all come out of the 40 percent, so a margin that looks healthy can leave nothing at the bottom, and nothing on this page will tell you whether yours does. It is a measure of a single sale or of a batch with a uniform cost, not of a business with a mix of products: averaging margins across items with different costs quietly overweights the cheap ones, which is why the blended figure a shop reports rarely matches any individual product. The inputs are also treated as certain — a cost that later turns out to be higher, or a price that gets discounted after the fact, changes the answer and the page cannot warn you. And a margin is not a target: knowing what you did keep says nothing about what you should charge.
Frequently asked questions
- Margin vs markup — what is the difference?
- The numerator is the same gross profit; the denominator changes. Margin divides it by revenue, markup divides it by cost. Buy at 60 and sell at 100 and the profit is 40, which is 40 percent of the revenue and 66.67 percent of the cost — one profit, two percentages, neither wrong. Because the cost is always the smaller number in a profitable sale, the markup is always the larger of the two, and the gap widens as margins rise: 5 points at a 20 percent margin, 26.67 points at 40, and 133.33 points at 66.67.
- Which one should I quote?
- Quote the one your audience uses, and say which it is. Retail and accounting tend to work in margins, because a margin is what is left from the price and prices are what the business controls; trades and wholesale tend to work in markups, because the cost is the known quantity and the question is what to add to it. The failure mode is not choosing the wrong one, it is using the words interchangeably — a supplier quoting a 40 percent markup as though it were a 40 percent margin is charging 33.33 rather than 40 on a cost of 100. If you need to convert, this page's table does it without needing any money at all.
- Is gross margin the same as profit?
- No. It is profit after the cost of the goods and before everything else, so a 40 percent gross margin is 40 percent of the price left to cover rent, wages, marketing, delivery, payment fees and tax, plus whatever is meant to be kept. A business can run a 40 percent gross margin and lose money, which is why the figure is useful for comparing products and useless on its own for judging a business. If the question is whether the business makes money, the figure you want is net margin.
- Can the margin be more than 100 percent, or negative?
- Never more than 100: the denominator is the revenue and the numerator cannot exceed it unless the cost is negative, which the page refuses. Negative is normal and allowed — selling at 120 what cost you 100 gives minus 20 percent, which is what a clearance or a loss leader genuinely looks like. The markup can go past 100 percent easily, since it divides by the cost: a one-pound item sold for one hundred is a 9,900 percent markup.
- Does this include shipping, fees or returns?
- Only if you put them in the cost field. The page takes two numbers and knows nothing about how you arrived at them, so whether the margin it prints is the one your accounts show depends entirely on what you counted as cost. A marketplace fee of 15 percent of the price is not a cost of the goods, so it does not belong there, but it does come out of the margin you just measured — which is a reasonable way to use the page for a quick what-if: enter the fee as part of the cost and watch how much of the margin survives.
- Why does the difference between the two get its own output?
- Because the pair is the single most confused thing in pricing, and a number is harder to argue with than a warning. At a 40 percent margin the gap is 26.67 points, which is not a rounding difference or a matter of convention — it is the distance between what a business thinks it is earning and what it is actually earning if the two words have been swapped. Printing it makes the size of the mistake visible on every calculation rather than only in the cases where someone happens to notice.
References
- Profit — the glossary definition of the money left after costs, including the distinction between gross profit and the profit a business finally keeps — Investor.gov, U.S. Securities and Exchange Commission (United States)
- Markups — the glossary entry on the amount added to a cost to arrive at a price, and on why a markup and a margin are not the same percentage — Investor.gov, U.S. Securities and Exchange Commission (United States)
- Publication 334 (2025), Tax Guide for Small Business — how the cost of goods sold is determined for a business that buys and resells, which is the cost that belongs in the field above — Internal Revenue Service (United States)