Markup Calculator: Selling Price, Profit and Margin
Markup divides profit by what the product cost. Gross margin divides the same profit by the selling price. The calculator keeps those two jobs separate.

On this page & data scope
- Use the calculator
- How to use the calculator
- What markup means
- What gross margin means
- Markup versus gross margin
- Why 40% markup is not 40% margin
- Rounding a target to a price you can charge
- What one selling price is made of
- Gross margin is not the profit of the business
- Common pricing mistakes
- Frequently asked questions
- Sources and references
Markup and gross margin both start from the same dollar difference between what a product costs and what you charge. They divide that difference by different numbers. Markup uses the cost. Gross margin uses the selling price. A 40% markup is not a 40% margin, and using one formula when you meant the other sets the wrong price.
Calculator
Markup calculator
Markup divides the difference by the cost. Gross margin divides the same difference by the selling price. Nothing you type leaves this browser.
Gross profit per unit$10
A $40 cost and a $50 price leave $10 of gross profit: 25% markup on the cost, 20% gross margin on the price.
- Selling price
- $50
- Gross profit per unit
- $10
- Markup (on cost)
- 25%
- Gross margin (on price)
- 20%
- Product cost
- $40
- Gross profit
- $10
- Selling price
- $50
How to use the calculator
The tool has three jobs. Pick the one that matches the numbers you already have.
- You have a cost and a price. It reports the gross profit, the markup and the gross margin.
- You have a cost and a markup you want. It finds the selling price, then the margin that price actually produces.
- You have a cost and a gross margin you want. It finds the selling price, then the markup that price actually produces.
A target that does not land on an exact cent is rounded up, so the price you see still meets the target. The percentages under the result are calculated from that cent price, not from the unrounded fraction.
What markup means
Markup is the amount you add to the product cost, usually written as a percentage of that cost.
AccountingCoach’s example is a product that costs $8 and sells for $10. The $2 difference divided by the $8 cost is a 25% markup. Shopify uses the same relationship on larger numbers: $40 of cost and $50 of price is $10 of profit, and $10 ÷ $40 is again 25%.
Same $10, two denominators
A $40 cost and a $50 price leave $10. Markup divides that $10 by the $40 cost (25%). Gross margin divides it by the $50 price (20%). Illustrative numbers, not a recommended price.
AccountingCoach: gross margin versus markup. Shopify: the $40 cost and $50 price example.
The formula is:
Markup % = (selling price − cost) ÷ cost × 100
To go the other way, from a cost and a markup you want:
Selling price = cost × (1 + markup)
A $60 cost and a 40% markup is $60 × 1.40 = $84. The gross profit is $24. The gross margin on that $84 price is $24 ÷ $84, about 28.57%, not 40%.
What gross margin means
Gross margin is that same dollar profit written as a percentage of the selling price.
On the $8 and $10 example, $2 ÷ $10 is a 20% gross margin. On the $40 and $50 example it is the same 20%. The profit did not change. Only the denominator did.
Gross margin % = (selling price − cost) ÷ selling price × 100
To set a price from a margin you want:
Selling price = cost ÷ (1 − margin)
The margin has to be under 100%. A 100% gross margin would mean the cost was zero. The calculator will not invent a price for that.
A $60 cost and a 40% gross margin is $60 ÷ 0.60 = $100. The gross profit is $40, and the markup is $40 ÷ $60, about 66.67%.
Markup versus gross margin
| Markup | Gross margin | |
|---|---|---|
| Question it answers | How much did I add to the cost? | How much of the price is left after the product cost? |
| Denominator | Cost | Selling price |
| $40 cost, $50 price, $10 profit | 25% | 20% |
| Usual job | Setting a price from a known cost | Comparing how much of each sale is gross profit |
| Question | Use |
|---|---|
| How much did I add to my cost? | Markup |
| What share of the selling price is gross profit? | Gross margin |
| How many sales cover my fixed costs? | Break-even calculator |
Xero’s conversion formulas match the two directions above. Markup to margin: divide the markup by 1 plus the markup. Margin to markup: divide the margin by 1 minus the margin. A 25% markup converts to a 20% margin. A 40% margin converts to a markup of about 66.67%.
Why 40% markup is not 40% margin
The same 40% is not the same price
The same 40% target produces different selling prices because the percentages use different denominators.
Both bars start from a $60 cost, drawn to the same scale. A 40% markup stops at $84. A 40% gross margin needs $100. The percentages use different denominators, so the prices differ by $16.
Shopify: markup versus margin. The $60 cost and 40% margin ($100) is theirs; $84 is that cost marked up 40%.
If you want 40% of the selling price left after the product cost, and you instead add 40% to the cost, you stop $16 short on every unit in this example: $84 instead of $100, and a margin of about 28.57% instead of 40%. Shopify uses this pair to show the same miss.
The reverse mistake overshoots. Treating a 40% markup target as a margin target prices the $60 product at $100 when $84 would have met the markup.
Rounding a target to a price you can charge
Cost $18, target gross margin 30%. The exact price is $18 ÷ 0.70 = $25.714285….
Charging $25.71 produces a margin a fraction under 30%. Charging $25.72 produces a margin a fraction over 30%. The calculator uses $25.72 and then shows the margin that $25.72 actually earns. It does not print “30%” next to a price that misses 30%.
The cent that still meets 30%
An $18 cost and a 30% gross margin need $18 ÷ 0.70, which is $25.714285…. At $25.71 the margin is 29.9883%, short of 30%. At $25.72 it is 30.0156%. The calculator charges $25.72 and shows that achieved margin.
The rounding rule used by this calculator: the lowest whole-cent price that still meets the target.
What one selling price is made of
What one selling price is made of
On the $50 example, $40 replaces the product cost and $10 is gross profit on that unit. Nothing in the bar has paid rent, payroll or tax. Gross profit is not net profit.
AccountingCoach and Xero: gross margin is profit after product cost, measured against the selling price.
On the $50 example, $40 replaces the product cost and $10 is gross profit on that unit. That $10 is not net profit. It has not paid rent, salaries, insurance, advertising, interest or income tax, and it is not the owner’s take-home pay.
Shipping, a card fee or a marketplace commission changes the result only if you have already put it in the cost you typed, or taken it out of the price. The calculator does not guess which of those belong in the product cost. A discount works the same way: use the price the customer actually pays.
Sales tax you collect for a state and later remit is not part of the selling price you keep. Leave it out of the price field.
Gross margin is not the profit of the business
A product can show a healthy gross margin and the business can still lose money. Operating expenses sit outside this calculation. So do the number of units you will sell. The profit margin calculator takes the whole period instead of one unit: revenue, cost of goods sold, operating expenses, and the gross, operating and net margin they leave.
The break-even calculator answers the volume question: how many sales cover a month of fixed costs plus the variable cost of each sale. This page only prices one unit. To set a price that also covers fees and a share of fixed costs, see how to price a product. Use a cost here that matches the variable cost you would enter there, and do not paste a gross-margin percentage into the break-even formula as if it were a contribution margin, unless you have checked that they describe the same costs.
The SBA’s startup-cost guidance separates one-time launch spending from monthly operating costs. Neither of those belongs in a single unit’s product cost unless you have a reason, stated in your own books, to treat a piece of it that way.
Common pricing mistakes
- Dividing by the selling price when you meant the cost, or the other way around.
- Calling the result net profit, operating profit or take-home pay.
- Leaving out a direct cost you do bear on every unit, such as packaging you always include.
- Leaving a discount or a coupon in the “full price” and then wondering why the margin missed.
- Rounding a target price down to a tidy number and quietly missing the margin you named.
- Copying a markup from another trade and treating it as a rule. No percentage here is a recommended markup for every product.
Frequently asked questions
How do I calculate markup?
Subtract the product cost from the selling price, then divide by the cost. A $50 price and a $40 cost is $10 ÷ $40 = 25%.
What is a 30% markup?
The price is 30% above the cost. On a $40 cost that is $12 of gross profit and a $52 price. The gross margin on $52 is $12 ÷ $52, about 23.08%, not 30%.
Is 30% markup the same as 30% margin?
No. A 30% markup adds 30% of the cost. A 30% margin means 30% of the selling price is gross profit, so the price is the cost divided by 0.70. On $18 of cost, that price is $25.72 after rounding up to the cent.
How do I calculate a selling price from cost?
For a markup target, multiply the cost by 1 plus the markup. For a margin target, divide the cost by 1 minus the margin. Use the second only when the margin is under 100%.
How much markup should I charge?
There is no percentage that fits every product or every business. The useful check is whether the gross profit on the units you can sell covers the costs this calculator does not include. A copied industry figure does not do that check.
Can markup be negative?
Yes, when the price is below the cost. A $40 price on a $50 cost is a $10 gross loss: −20% markup and −25% gross margin. That is a loss on the product cost you entered, not a full picture of the business.
What if the product cost is zero?
Gross profit equals the selling price and the gross margin is 100%. Markup is not defined, because the formula would divide by zero. The calculator says so instead of showing an infinite markup.
Does markup include overhead?
Not unless you have folded a share of overhead into the cost you enter. By itself the formula uses only that cost and the price. Rent and payroll are outside it. The break-even guide is the place for costs that stay put when you sell one more unit.
How do I convert margin to markup?
Divide the margin by 1 minus the margin. A 20% margin is 0.20 ÷ 0.80 = 25% markup. The other way, a 25% markup is 0.25 ÷ 1.25 = 20% margin.
Is gross margin the same as net profit?
No. Gross margin is what remains of the selling price after the product cost in this calculation. Net profit is what remains after the rest of the business’s expenses and taxes as well.
Evidence record
Sources and references
- What is the difference between gross margin and markup? — AccountingCoach
- Markup vs. margin: key differences and how to calculate — Shopify
- Margin vs markup — Xero
- Calculate your startup costs — U.S. Small Business Administration