Margin & Markup Calculator

Calculate profit margin, markup, cost, revenue, and profit from any two known values. See exactly why margin and markup are never the same number.

Loading calculator…

What are margin and markup?

Margin and markup both describe how much profit a sale makes, and both start from the exact same number — profit, which is revenue minus cost. Where they differ is the denominator: margin expresses profit as a percentage of what you sold it for (revenue), while markup expresses profit as a percentage of what it cost you (cost). Mixing the two up is one of the most common pricing mistakes in retail and e-commerce — quoting a "50% markup" when you meant a 50% margin will price a product noticeably too low.

This calculator works from any two of five related quantities — cost, revenue, profit, margin %, and markup % — and fills in the other three, so you can start from whichever numbers you actually have.

The core formulas

Margin %=ProfitRevenue×100Markup %=ProfitCost×100\text{Margin \%} = \frac{\text{Profit}}{\text{Revenue}} \times 100 \qquad \text{Markup \%} = \frac{\text{Profit}}{\text{Cost}} \times 100

  • Profit = Revenue − Cost
  • Margin divides profit by revenue (the selling price)
  • Markup divides profit by cost (what you paid or spent to make it)

Because revenue is always bigger than cost on a profitable sale, margin is always the smaller of the two numbers.

Tip: If someone tells you a "50% markup," don't assume that's a 50% margin — it converts to a 33.33% margin. Always ask (or compute) which one they mean before repricing anything.

Worked examples

1. Cost and revenue given. A product costs $120 to make and sells for $150. Profit = 150 − 120 = $30. Margin = 30 ÷ 150 × 100 = 20%. Markup = 30 ÷ 120 × 100 = 25%.

2. Cost and markup given. A product costs $80, and you apply a 50% markup. Revenue = 80 × 1.50 = $120. Profit = 120 − 80 = $40. Margin = 40 ÷ 120 × 100 = 33.33% — notice the 50% markup converts to a smaller 33.33% margin, not 50%.

3. Revenue and margin given. You want a 20% margin on an item that sells for $150. Cost = 150 × (1 − 0.20) = $120, matching example 1 from the other direction. Markup works out to 25%, same as before — margin and markup describe the same sale, just relative to different bases.

Tip: A markup of exactly 100% (doubling your cost to set the price) always converts to a 50% margin — never 100%. This is the single most common margin/markup mix-up in retail pricing.

Common mistakes

  • Reporting markup but calling it margin (or vice versa). A "43% markup" is only a ~30.07% margin — quoting the wrong one to a manager or investor overstates profitability.
  • Forgetting margin can never exceed 100%. Since margin = profit ÷ revenue and profit can never exceed revenue at a finite cost, margin approaches but never reaches 100% — that would require a cost of exactly $0, in the limit.
  • Confusing the markup-to-margin conversion direction. Margin = markup ÷ (1 + markup); the profit, cost, and revenue values themselves don't affect the conversion — only the markup percentage does.
  • Assuming a $0 cost breaks the calculator. It doesn't — margin is still fully defined at a $0 cost (100% margin); only markup, which divides by cost, becomes undefined.

Related calculators

For a related "same-profit, different-base" retail pricing question, the discount calculator figures out a sale price from a percentage off, and the sales tax calculator adds a percentage on top at checkout. If you're tracking how a price or cost moved between two points in time rather than comparing it to profit, the percentage change calculator is the more direct tool.

Frequently asked questions

What is the difference between margin and markup?
Margin and markup both start from the same profit (revenue minus cost), but they divide it by different things. Margin divides profit by revenue; markup divides profit by cost. Since revenue is always greater than cost on a profitable sale, margin is always smaller than markup for the same sale.
How do I calculate margin from cost and revenue?
Margin % = (Revenue − Cost) ÷ Revenue × 100. For example, a $150 sale on a $120 cost gives profit of $30, and margin = 30 ÷ 150 × 100 = 20%.
How do I convert a markup percentage to a margin percentage?
Margin = Markup ÷ (1 + Markup), with markup entered as a decimal. A 25% markup (0.25) converts to a margin of 0.25 ÷ 1.25 = 20%. A 100% markup converts to exactly 50% margin — doubling your cost to set the price is a 50% margin, not a 100% margin.
What happens if I enter a cost of $0?
A $0 cost can only arise as a computed result (for example, solving for cost from revenue and a 100% margin) — it means the item cost nothing to produce. Markup, which divides profit by cost, is mathematically undefined in that case and displays as "undefined" rather than a percentage; margin is unaffected and still displays normally.
Can margin or markup be negative?
Yes — a negative margin or markup means the item sold for less than it cost, i.e. a loss. Enter a revenue lower than cost (or a negative markup/margin percentage) to model a loss scenario; the calculator handles it the same way as a profitable sale.
Why is margin always less than markup for the same sale?
Because margin's denominator (revenue) is always larger than markup's denominator (cost) whenever there's a profit. Dividing the same profit by a bigger number always gives a smaller percentage, so margin < markup on every profitable sale, without exception.
What's a "good" margin percentage for retail?
It varies enormously by industry — grocery margins often run 2–5%, while software or luxury goods can exceed 70–90%. There's no universal target; compare your margin to others in your specific industry rather than to a fixed benchmark.

Related calculators