Business math, made visible
Markup vs. margin calculator
Markup vs. margin calculator
Choose the denominator before setting a price.
Inputs stay in this browser. Results use your entries and the formula below.
A markup and a margin use different bases. This calculator turns a unit cost and a target percentage into a selling price, then displays the profit, markup on cost, and margin on selling price together. Choose whether your target is a markup or a margin before calculating. The IRS examples show why an identical target percentage can produce different prices. Use this tool for the arithmetic of a price decision after deciding which costs belong in your unit cost.
Worked example
| Source item | Published value |
|---|---|
| Cost | $1.20 |
| Markup on cost | 25 percent |
| Selling price | $1.50 |
| Gross profit margin | 20 percent |
The IRS illustrates a cost of $1.20 marked up by 25 percent, giving a $1.50 selling price and 20 percent margin. Switching this tool to a target margin of 25 percent produces $1.60, matching the second IRS example. Source: IRS: gross profit ratio and markup examples.
How it works
Markup (%) = (price - cost) / cost * 100
Margin (%) = (price - cost) / price * 100
Price for markup = cost * (1 + markup / 100)
Price for margin = cost / (1 - margin / 100)
Formula basis: IRS: gross profit ratio and markup examples. Ratios are converted to percentages for display. Intermediate values retain full calculation precision; displayed amounts are rounded.
Start with a consistently defined unit cost
Use the cost for the same item and quantity as the selling price. Decide which costs your pricing process includes before entering the number. This tool does not allocate overhead, shipping, or other expenses for you. A price that meets the selected markup on the entered cost may still fail to cover expenses that were left out. Keep the input definition with the result when sharing a price calculation.
Why equal percentages produce different prices
Markup compares the difference between price and cost with cost. Margin compares that same difference with selling price. Because the denominators differ, the percentages differ even though the profit amount is unchanged. The tool solves the relevant ratio for price, then recomputes both percentages from that price. Use the displayed margin to check a markup target and the displayed markup to check a margin target.
Know the target limits
Positive unit cost is required. A target margin at or above the full selling price cannot produce a finite positive selling price for positive cost. A markup that removes the entire cost also cannot produce a positive selling price. This tool rejects those cases. It accepts negative targets within its stated range to illustrate selling below cost. Such a calculation describes a loss on the entered cost basis, not a recommended discount.
Use the formula in a spreadsheet
With cost in A1 and a target entered as a percentage number in B1, use =A1*(1+B1/100) for markup or =A1/(1-B1/100) for margin. If B1 is already a percentage-formatted fraction, omit the division by 100.
Frequently asked questions
What is the difference between markup and margin?
Markup uses cost as the denominator. Margin uses selling price. The same dollar difference therefore produces different percentage ratios.
How do I calculate markup with margin?
Choose the margin target, enter cost and the target percentage, then calculate. The result includes the markup needed for that price.
Can I use the formulas in Excel?
Yes. Use cost times one plus markup for a markup target, or cost divided by one minus margin for a margin target. Keep percentage units consistent.
Does a markup target equal the margin target?
Usually not. The IRS example shows that the same stated percentage can imply different prices depending on which denominator is used.
Why is a full-price margin rejected?
With positive cost, a margin equal to all of the selling price leaves no share to cover that cost. The price formula would divide by zero.
Are taxes and selling fees included?
Only if your chosen cost input incorporates them consistently. The calculator does not add taxes or platform fees automatically.
Sources
Data as of 2026-10-05. Examples are historical teaching examples, not current prices or market benchmarks. Calculated results are derived from entered values.
Return to the business calculator hub to choose another measure.