How to use the markup calculator
Markup and margin are the two pricing percentages people confuse most, and the confusion is expensive: price a product at a "40% margin" by adding 40% to its cost and you end up with a margin of only 28.57%. This markup calculator removes the guesswork. It works from whatever you already know, sets out every formula it uses on this page, and keeps all of the math in your browser.
- Enter any two values. The Markup tab has five fields: cost, markup %, selling price, gross margin % and profit. Type any two and the other three fill in. The two you typed most recently are the inputs; type in a third field and the oldest input becomes a calculated value. The only pair that can't work is markup plus margin, because they describe the same ratio and fix no dollar amount.
- Read the results card. You get the selling price, the profit per unit, the markup on cost and the gross margin on price, plus a bar that splits the price into cost and profit. Enter a price below cost and the calculator says so in words, not only with a minus sign.
- Add sales tax if you want the shelf price. Tax goes on top of the selling price and never changes the markup or margin; more on that below.
- Use the other tabs for the follow-up questions. Margin ↔ Markup converts one percentage to the other and highlights your row in a conversion chart. Discount shows what a sale does to your profit and margin, the largest discount you can give before selling at a loss, and how many more units you'd have to sell to make the same gross profit. Break-even finds the units and sales you need to cover fixed costs. Price list applies one markup or target margin to a whole list of items, rounds the prices if you like, and exports a CSV file.
The tool works as a markup percentage calculator, a gross margin calculator, a selling price calculator (or retail price calculator, if you buy wholesale and sell retail) and a reverse markup calculator that finds the cost behind a price. Choose a currency to change the symbol; the math is the same in any currency.
The markup formula
Markup is the profit on an item expressed as a percentage of what the item cost you. Cost here means the cost of the goods themselves: what you paid a supplier, or what it cost to make, before rent, wages and other overhead. With the cost C, the selling price before tax P, and the markup m as a decimal (50% is 0.50):
profit = P − C
markup % = (P − C) ÷ C × 100
selling price = C × (1 + m)
gross margin % = (P − C) ÷ P × 100
That is how to calculate markup by hand. In a spreadsheet with the cost in A2 and the price in B2, the markup formula is =(B2-A2)/A2 formatted as a percentage, and the price for a markup in C2 is =A2*(1+C2).
Example 1: a 50% markup on a $40 item
An item costs $40.00 and you add a 50% markup. The selling price is $40 × 1.50 = $60.00 and the profit is $20.00 per unit. As a share of the selling price, that $20 profit is a gross margin of 33.33%, exactly one third. Same item, same profit, two different percentages: that gap is the whole markup vs. margin question in one line.
Example 2: from cost and price to markup
You buy an item for $40.00 and sell it for $100.00. The profit is $60.00, so the markup is $60 ÷ $40 = 150.00% and the gross margin is $60 ÷ $100 = 60.00%. A markup above 100% is perfectly normal: it only means the price is more than double the cost.
Selling below cost
The formula still works when the price is lower than the cost, and the result turns negative. An item that cost $50.00 and sells for $40.00 loses $10.00 per unit, a markup of -20.00% and a margin of -25.00%. The calculator flags this as selling below cost, which can be a deliberate choice for clearance stock, but rarely one you want to make by accident.
Markup vs. margin
Markup and margin use the same dollar profit. The only difference is what you divide it by. Markup is on cost: profit ÷ cost. Gross margin is on the selling price: profit ÷ price. Because the selling price is larger than the cost whenever you make a profit, the margin on an item is always a smaller percentage than its markup. The two are equal only at zero.
- A 50% markup is not a 50% margin. A 50% markup gives a 33.33% margin, and a 50% margin takes a 100.00% markup.
- Keystone pricing means doubling the cost: a 100% markup and a 50.00% gross margin. An item that costs $40.00 sells for $80.00.
- Margin has a ceiling; markup doesn't. A margin can never reach 100%, because that would need a cost of zero. A markup can be any size: a 200% markup means the price is three times the cost, which is a 66.67% margin.
Always say which base you mean. Some trades use "markup" for a percentage of the selling price ("markup on retail"); even IRS Publication 334, in its section on testing gross profit, talks about marking up merchandise to realize a gross profit of a given percentage of sales, which is a margin. When someone quotes you a markup, ask: on cost, or on price? This page and the tool always mean markup on cost and margin on price.
Percentage points are a related trap. If your margin falls from 40% to 25%, it dropped by 15 percentage points, while the margin itself shrank by more than a third. Say "points" when you compare two percentages.
Markup to margin conversion chart
Because both percentages come from the same profit, one converts exactly into the other. With both written as decimals:
margin = markup ÷ (1 + markup)
markup = margin ÷ (1 − margin)
The tables below are the same ones the Margin ↔ Markup tab shows, computed by the same code. Use the first to see what margin a markup gives you, and the second to find the markup you need for a target margin.
| Markup | Margin |
|---|---|
| 10% | 9.09% |
| 15% | 13.04% |
| 20% | 16.67% |
| 25% | 20.00% |
| 30% | 23.08% |
| 33.33% | 25.00% |
| 40% | 28.57% |
| 50% | 33.33% |
| 60% | 37.50% |
| 75% | 42.86% |
| 100% (keystone) | 50.00% |
| 150% | 60.00% |
| 200% | 66.67% |
| 300% | 75.00% |
| Margin | Markup |
|---|---|
| 10% | 11.11% |
| 15% | 17.65% |
| 20% | 25.00% |
| 25% | 33.33% |
| 30% | 42.86% |
| 35% | 53.85% |
| 40% | 66.67% |
| 45% | 81.82% |
| 50% | 100.00% |
| 55% | 122.22% |
| 60% | 150.00% |
| 65% | 185.71% |
| 70% | 233.33% |
| 75% | 300.00% |
| 80% | 400.00% |
| 90% | 900.00% |
Notice how fast the markup climbs at high margins. Going from a 50% to a 75% margin takes the markup from 100% to 300%, and a 90% margin needs the price to be ten times the cost. The 33.33% row also shows why rounding matters: a markup of exactly one third is a 25% margin, and 33.33% typed as a rounded figure lands a hair under it, which only shows up after the second decimal.
How to find the selling price from cost and margin
If you plan by margin, which most income statements and many buyers do, you need the price that delivers that margin on your cost. The price calculator formula is:
selling price = cost ÷ (1 − margin)
Example 3: a 30% margin on a $70 cost
A product costs $70.00 and you want a 30% gross margin. The price is $70 ÷ (1 − 0.30) = $70 ÷ 0.70 = $100.00. The profit is $30.00, which is 30% of the $100 price, and the markup on cost is $30 ÷ $70 = 42.86%.
The common mistake is to add the margin to the cost as if it were a markup: $70 × 1.30 = $91.00. That price leaves $21.00 of profit, a margin of only 23.08%. On a product line that has to reach a 30% gross margin to cover overhead, the difference between those two prices decides whether the line makes money.
Reverse markup: cost from the selling price
Sometimes you know the price and the percentage and need the cost: what can you afford to pay a supplier if an item must sell for a set price, or what did a reseller pay if you know their markup? Run the formulas backward:
cost = price ÷ (1 + markup)
cost = price × (1 − margin)
Example 4: a $100 price with a 25% markup
At a selling price of $100.00 and a 25% markup, the cost is $100 ÷ 1.25 = $80.00. The profit is $20.00, a gross margin of 20.00%.
Read the same "25%" as a margin and the answer changes: $100 × (1 − 0.25) = $75.00, with $25.00 of profit and a markup of 33.33%. A reverse markup calculation is only as good as knowing which of the two percentages you were given.
Multi-stage markups: maker to wholesaler to retailer
Most products pass through several hands, and each one adds its own markup to the price it paid. Those markups multiply rather than add, because each is a percentage of a cost that already includes the markups before it:
final price = cost × (1 + m1) × (1 + m2) × …
total markup = (1 + m1) × (1 + m2) × … − 1
Example 7: a 30% wholesale markup, then keystone at retail
A maker sells an item at a cost of $10.00. A wholesaler adds a 30% wholesale markup and sells it for $13.00. The retailer then keystones it, a 100% markup, and puts it on the shelf at $26.00. From the maker's cost to the shelf, the total markup is 1.30 × 2 − 1 = 160.00%, not the 130% you'd get by adding the two percentages.
Adding them would price the item at $23.00 instead of $26. Each business still earns its own margin on its own cost: the retailer's gross margin on the shelf price is 50.00%, while the spread between the maker's cost and the shelf price is $16.00, or 61.54% of what the customer pays. Wholesale to retail price calculations work the same way: the wholesale price is the retailer's cost.
Discounts and your margin
A discount is taken off the selling price, but every dollar of it comes out of your profit, because the cost doesn't change. That's why a modest-looking discount can remove a large share of the profit on an item. With the original margin g and a discount d, both as fractions of the regular price:
sale price = price × (1 − d)
margin after discount = (g − d) ÷ (1 − d)
largest discount = g (beyond it you sell below cost)
extra units needed = d ÷ (g − d) (to keep the same gross profit)
Example 5: 20% off a $100 item that costs $60
An item lists at $100.00 and costs you $60.00, so it carries a 40.00% gross margin (a 66.67% markup). At 20% off, it sells for $80.00. The customer saves $20.00, and your profit per unit falls from $40.00 to $20.00: a 20% discount has halved your profit. The margin on the sale price drops to 25.00%, a markup of 33.33% on cost.
To earn the same total gross profit at the sale price, you'd have to sell 100.00% more units: 200 instead of 100. That is the sales increase needed to stand still, assuming the unit cost stays the same, and it doesn't count any extra handling or shipping. The largest discount you can give before you sell below cost is 40.00%, the original margin, at which point the sale price equals the cost.
Smaller discounts are much cheaper to recover. At 10% off the same item, the price is $90.00, the margin is 33.33%, and you need 33.33% more units, 134 instead of 100, to keep the same gross profit.
Stacked discounts compound
"20% off, then an extra 10% off at checkout" is not 30% off. The second discount applies to the already reduced price, so the item sells for $72.00, an effective discount of 28.00%. Your profit falls to $12.00 and the margin to 16.67%; you would need 233.33% more units to make the same gross profit. The Discount tab runs these numbers for up to three stacked discounts and warns you in red when a sale goes below cost.
Break-even point and contribution margin
Markup tells you the profit on each item. The break-even point tells you how many items you have to sell before those profits cover the costs that don't depend on sales at all. The U.S. Small Business Administration defines the break-even point as the point at which total cost and total revenue are equal, meaning there is no loss or gain, and gives the formula as Fixed Costs ÷ (Price – Variable Costs) = Break-Even Point in Units. Fixed costs, such as rent, salaries and insurance, don't change as you produce more or less; variable costs, such as the goods themselves, packaging and a sales commission paid per unit, rise with every unit.
contribution margin per unit = price − variable cost per unit
contribution margin ratio = contribution margin ÷ price
break-even units = fixed costs ÷ contribution margin per unit
break-even revenue = break-even units × price
Example 6: $5,000 of fixed costs, a $25 price and a $15 variable cost
With fixed costs of $5,000.00 a month, a price of $25.00 and a variable cost of $15.00 per unit, each sale contributes $10.00 toward fixed costs, a contribution margin ratio of 40.00% (and a markup of 66.67% on variable cost). You break even at $5,000 ÷ $10 = 500 units, or $12,500.00 in sales. To earn a $2,000.00 profit on top, you need 700 units, $17,500.00 in sales.
The answer is rarely a whole number. Drop the price to $24 and the contribution falls to $9.00, so break-even is 555.56 units. You can't sell part of a unit, and rounding down leaves a small loss, so the calculator rounds up to 556 and shows the exact figure in a hint. The Break-even tab also draws revenue against total cost, so you can see where the lines cross. Like any break-even calculator, it assumes the price and the cost per unit stay the same at every volume.
Sales tax is not markup
Sales tax sits on top of your price; it isn't part of it. Calculate markup and margin on the price before tax, then add the tax for the amount the customer pays:
tax = price × tax rate
customer pays = price × (1 + tax rate)
price before tax = amount paid ÷ (1 + tax rate)
Example 8: an 8% sales tax on a $60 price
At an illustrative 8% rate, not any particular state's, a $60.00 price carries $4.80 of tax and the customer pays $64.80. If the item cost you $40.00, your gross margin is still 33.33%, worked out on the $60 you keep, not on the $64.80 the customer hands over.
Including the tax would overstate both your markup and your margin, because the tax isn't your money. IRS Publication 334 says that if you are required to collect state and local taxes imposed on the buyer and turn them over to state or local governments, you generally do not include these amounts in income. The same publication notes the opposite case: a tax imposed on you as the seller, even if you collect it from the buyer, is included in gross receipts.
Sales tax rules and rates vary by state, county and city, and by country for VAT and GST. Washington State, for example, has a state portion and a local portion of its retail sales tax, and the rate depends on where the customer receives the goods. The Streamlined Sales Tax Governing Board exists because those rules differ so much from state to state. The calculator doesn't look up rates; enter the rate that applies to your sale.
Rounding prices to .99
Prices rarely come out of a formula as neat amounts. The price list can round its prices four ways. With no rounding, each price is taken to the nearest cent, the same way every amount in the tool is shown. The other three options round up, never down, so they can only raise your margin, never lower it. After rounding, the price list shows the markup and margin you actually get at the rounded price, not the ones you asked for.
| Rounding | Price | Profit | Markup | Margin |
|---|---|---|---|---|
| Nearest cent | $16.88 | $4.38 | 35.04% | 25.95% |
| Whole amount | $17.00 | $4.50 | 36.00% | 26.47% |
| Up to .99 | $16.99 | $4.49 | 35.92% | 26.43% |
| Up to .95 | $16.95 | $4.45 | 35.60% | 26.25% |
Rounding to .99 always moves to the next .99 at or above the price. A $60.00 price becomes $60.99, which lifts the margin from 33.33% to 34.42%. A price that already ends in .99 stays where it is. If you would rather end at the .99 just below a round number, enter that price yourself: the calculator will show the lower margin it gives.
How to choose a markup
There is no single correct markup, and a number that works for one business can sink another. A markup has to do three jobs at once: cover the cost of the goods, cover a share of your overhead (rent, wages, software, payment fees, returns, shipping you don't charge for), and leave the profit you're aiming for. What customers will pay, and what competitors charge, sets the ceiling. Cost-plus pricing, adding a fixed markup to every item, is simple; the work is in choosing the "plus".
- Add up your overhead for a period, say a month, and decide on the profit you want for the same period.
- Estimate how many units you'll sell in that period, then divide overhead plus profit by that number. That's the gross profit each unit has to earn.
- Turn that into a price, then a markup. Enter the cost and the per-unit profit in the calculator and read off the price, markup and margin.
- Check the price against the market, and test what a discount or a slower month would do with the Discount and Break-even tabs.
For example, with an item cost of $40.00, $8,000 of monthly overhead, a $4,000 profit goal and an estimated 1,000 units a month, each unit has to earn $12.00 of gross profit. The price is $52.00, a markup of 30.00% and a margin of 23.08%. The break-even check agrees: at that price, the $8,000 of overhead is covered after 667 units, and the profit goal is reached at 1,000. If you need a 40% margin instead, the conversion chart says you need a markup of 66.67%.
For context only, the U.S. Census Bureau's Annual Retail Trade Survey reports gross margin as a percentage of sales by kind of business. In its 2022 figures, gross margin was 31.1% of sales for U.S. retail as a whole, 28.0% for grocery stores and 50.6% for clothing stores. The all-retail figure is the same as a markup on cost of about 45.14%. These are averages for whole kinds of business in a single year, gross margins rather than markups, and they say nothing about what your own costs and customers will support. Averages aren't targets.
Gross vs. net vs. contribution margin
"Profit margin" means different things depending on which costs you subtract. This tool is a gross profit margin calculator: its margin is the gross margin.
- Gross margin is gross profit as a share of sales. IRS Publication 334 figures gross profit by subtracting the cost of goods sold from net receipts (gross receipts minus returns and allowances), and it notes that you must determine gross profit before you can deduct any business expenses. Cost of goods sold (COGS) is beginning inventory plus purchases and other production costs, minus ending inventory. How you value inventory changes that cost figure; IRS Publication 538 covers the accepted methods.
- Net margin is what's left after all business expenses, overhead and taxes included, as a share of sales. A high gross margin can still go with a net loss if overhead is too high. Net margin needs your full income statement, which this calculator doesn't model.
- Contribution margin is the price minus all variable costs per unit, which is what the Break-even tab uses. It can differ from gross profit in either direction: it subtracts variable costs that aren't part of the cost of goods, such as card fees or a per-unit commission, and leaves out fixed costs that some businesses count in the cost of goods.
Pub 334's own example of testing gross profit accuracy shows the two bases side by side: net receipts of $300,000 and a cost of goods sold of $200,000 leave a gross profit of $100,000.00, which is 33.33% of sales (the publication writes 33⅓%). On cost, the same profit is a markup of 50.00%. The IRS compares that result with your markup policy, which is why it pays to know which percentage your policy uses.
Markup on cost can look like a return on investment for one item, but ROI counts everything you put into the business, not only the product cost, so the two aren't interchangeable.
How we calculate
Every figure on this page and in the tool comes from the same code, and the examples above are checked against it automatically. These are the rules it follows:
- Definitions. Profit = price − cost. Markup = profit ÷ cost. Margin = profit ÷ price, which is the gross margin. Prices are selling prices before sales tax, and cost is the cost of the goods per unit.
- Any two values. From cost and price we compute the profit; from cost and markup, price = cost × (1 + markup); from cost and margin, price = cost ÷ (1 − margin); from price and markup, cost = price ÷ (1 + markup); from price and margin, cost = price × (1 − margin); from profit and a percentage, cost = profit ÷ markup or price = profit ÷ margin. Markup and margin together don't fix a dollar amount, so that pair is refused.
- Limits. A margin must be below 100%; a 100% margin would mean the item cost nothing. A markup must be above −100%, or the price would be negative. With a cost of zero, markup is undefined and shown as "—", never as infinity.
- Full precision, rounded for display. Results are kept unrounded and shown to the cent, with percentages to two decimals. Money rounds half away from zero. In the price list, rounding a price to .99, .95 or a whole amount is a separate pricing step that always rounds up; with no rounding, the price is taken to the nearest cent. Either way, the markup and margin are then recomputed from the rounded price.
- Discounts are percentages of the regular price and stack by multiplying. The extra volume needed after a discount is old profit ÷ new profit − 1, which assumes the unit cost doesn't change and ignores fixed costs.
- Break-even uses the SBA formula, rounds units up to the next whole unit, and assumes a constant price and variable cost per unit.
- Sales tax is price × rate, added on top and kept out of markup and margin.
Your numbers stay in your browser
Costs and prices are commercially sensitive, so the calculator never sends them anywhere. Every calculation runs as JavaScript in your own browser tab.
- Nothing is uploaded. The tool has no code that sends data anywhere, and the page's Content-Security-Policy only allows connections back to this site. Pasting a price list from a spreadsheet parses it in the page itself.
- It keeps working offline. Once the page has loaded, you can disconnect and keep calculating.
- No account, no cookies. The tool remembers your last inputs and tab in your browser's local storage, on your device only.
Frequently asked questions
What is the difference between markup and margin?
Both start from the same gross profit, the selling price minus the cost. Markup divides that profit by the cost; margin divides it by the selling price. An item that costs $40.00 and sells for $60.00 has a 50% markup and a 33.33% gross margin. Some businesses say "markup" when they mean a percentage of the selling price (an example in IRS Publication 334 does), so always check which base a figure uses.
How do I calculate a 30% markup?
Multiply the cost by 1.30. On a $50.00 cost the selling price is $65.00, and the $15.00 profit is a 23.08% gross margin on that price. In a spreadsheet with the cost in cell A2, the formula is =A2*1.3.
Is a 50% markup the same as a 50% margin?
No. A 50% markup gives a 33.33% margin: an item that costs $40.00 sells for $60.00. A 50% margin needs a 100% markup, which means doubling the cost, often called keystone pricing.
How do I calculate the selling price from cost and margin?
Divide the cost by one minus the margin: price = cost ÷ (1 − margin). A $70.00 cost at a 30% margin gives $70 ÷ 0.70 = $100.00. Adding 30% to the cost instead gives only $91.00, which is a 23.08% margin.
How do I convert markup to margin, or margin to markup?
With both as decimals, margin = markup ÷ (1 + markup) and markup = margin ÷ (1 − margin). A 25% markup is a 20.00% margin, and a 40% margin is a 66.67% markup. The conversion chart on this page lists the common values.
What is keystone pricing?
Keystone pricing means setting the selling price at double the cost. That is a 100% markup and a 50.00% gross margin: an item that costs $40.00 sells for $80.00.
What is a good markup percentage?
There is no single right number. Your markup has to cover the cost of the goods, your overhead (rent, wages, shipping, payment fees) and the profit you want, and what customers will pay sets the ceiling. Start from the gross margin you need and convert it to a markup. For context only, the U.S. Census Bureau's Annual Retail Trade Survey put gross margin at 31.1% of sales for U.S. retail as a whole in 2022, with wide variation by kind of business, for example 28.0% for grocery stores and 50.6% for clothing stores. Averages are not targets.
Can margin be over 100%? Can markup?
A gross margin can't reach 100% unless the item cost nothing, because the profit can never be larger than the selling price. Markup has no upper limit: a 200% markup means the price is three times the cost, which is a 66.67% margin.
How do I find the cost from the selling price (reverse markup)?
Divide the price by one plus the markup, or multiply it by one minus the margin. A $100.00 price with a 25% markup means a cost of $80.00; the same price with a 25% margin means a cost of $75.00.
How does a discount affect my margin?
A discount comes straight out of your profit. An item with a $100.00 list price that costs $60.00 has a 40.00% margin. At 20% off it sells for $80.00, the profit falls from $40.00 to $20.00 and the margin to 25.00%. Any discount larger than the original margin, here 40.00%, sells the item below cost.
How do I calculate the break-even point?
Use the SBA's formula: fixed costs ÷ (price − variable cost per unit). With $5,000.00 of fixed costs, a $25.00 price and a $15.00 variable cost, that is $5,000 ÷ $10.00 = 500 units, or $12,500.00 in sales. Round a fractional answer up to the next whole unit.
Should sales tax be included when calculating markup?
No. Calculate markup and margin on the price before tax. According to IRS Publication 334, sales tax imposed on the buyer that you collect and turn over to state or local governments is generally not included in your income, while a tax imposed on you as the seller is included in gross receipts even if you collect it from the buyer. Rules and rates vary by state, county and city.
Sources
- IRS Publication 334: Tax Guide for Small Business, chapters on figuring cost of goods sold and gross profit, testing gross profit accuracy, and sales taxes collected from customers.
- IRS Publication 538: Accounting Periods and Methods, on identifying and valuing inventory.
- U.S. Small Business Administration: Plan your business, break-even point definition and formula.
- U.S. Census Bureau: Annual Retail Trade Survey, program page.
- U.S. Census Bureau: Annual Retail Trade Survey, 2022 benchmarked tables, including Estimated Annual Gross Margin as a Percentage of Sales of U.S. Retail Firms by Kind of Business: 1993-2022 (spreadsheet).
- Washington State Department of Revenue: Retail sales tax, an example of how a state's sales tax is structured.
- Streamlined Sales Tax Governing Board: About us.
This is an educational tool, not financial, accounting or tax advice. Check important pricing and tax decisions with a qualified professional. Discount and break-even results assume the price and unit costs stay the same.