Margin and Markup Calculator

Work out selling price, gross margin and markup from cost. Enter any combination of cost, selling price, margin % or markup % and the calculator will fill in the rest, including profit per unit and the maximum discount you can offer before you break even.

Helpful for pricing products, quoting projects, and checking that promotions still leave a healthy profit.

Inputs
What it costs you to buy or produce one unit.
What you charge your customer per unit.
%
Profit as a percentage of selling price.
%
Profit as a percentage of cost.
Display only — math is unit-agnostic.
Controls how amounts and percentages are shown.
Gross margin on this price

Markup

Profit as a percentage of cost.

Gross profit per unit

Selling price minus cost per unit.

Cost & price

Cost:

Max discount before break-even

Largest price discount before profit hits zero.

Price and profit summary

Enter a cost and either a selling price, desired margin or markup to see profit per unit and how the selling price splits between cost and profit.

  • Cost per unit:
  • Selling price per unit:
  • Profit share of price:

Cost vs gross profit in price

Cost — 100%
Profit — 0%
Profit vs quantity at current price
Total profit as quantity increases

How this margin and markup calculator works

Every price can be described in three basic parts: cost, selling price, and profit. From those we can calculate margin and markup:

  • Gross profit = price − cost
  • Margin % = profit ÷ price
  • Markup % = profit ÷ cost

The calculator lets you choose a mode:

  • Cost + Price → Margin & Markup (analyse an existing price).
  • Cost + Margin% → Price (set a target margin and get the price).
  • Cost + Markup% → Price (mark up your cost by a percentage).

It then fills in the missing values and shows a breakdown of how much of your selling price is covering cost versus profit.

Margin vs markup formulas

For a unit with cost C and selling price P:

Profit       = P − C
Margin (m)   = (P − C) / P
Markup (u)   = (P − C) / C

From cost and margin:
P = C / (1 − m)

From cost and markup:
P = C × (1 + u)

A common mistake is to confuse margin and markup. For example, a 50% markup on cost does not give a 50% margin. If cost is 10 and you add a 50% markup, price is 15. Profit is 5, so margin is 5/15 ≈ 33.3%.

Example: converting cost to price using margin

Suppose your product costs $40 and you want a 30% margin.

  • Cost C = 40
  • Margin m = 0.30

Using the formula:

Price P = C / (1 − m)
        = 40 / (1 − 0.30)
        = 40 / 0.70
        ≈ 57.14

So a selling price of about $57.14 gives a 30% gross margin. The calculator will also show the equivalent markup (about 42.9% in this case).

Example: checking margin on an existing price

You currently buy an item for $25 and sell it for $39. Plugging those into the calculator in “Cost + Price → Margin & Markup” mode shows:

  • Profit per unit = 39 − 25 = 14
  • Margin ≈ 35.9% (14/39)
  • Markup = 56% (14/25)
  • Maximum discount before you lose money ≈ 35.9%

This makes it easy to decide how far you can discount without going below zero gross profit.

Why margin and markup both matter

  • Margin matches how financial reports are usually presented, so it is better for comparing profitability across products or periods.
  • Markup is handy when building prices from cost (for example, “we add 40% markup on all parts”).
  • Using markup while thinking in margin terms can cause under-pricing, so it’s helpful to see both side by side.

Frequently asked questions

What is a “good” margin?

It depends on your industry and cost structure. Groceries might run on single digit margins, while software or digital products can support much higher margins. The key is to cover overheads and still leave a healthy net profit.

Does the calculator include tax?

No. All values are assumed to be either pre-tax or post-tax consistently. If you need to work with VAT or sales tax, strip it out first or add it after you’ve decided on your net selling price.

Can I use this for services as well as products?

Yes. Treat cost as the full cost of delivering the service (including labour, tools and overhead allocation) and price as what you charge the client.

What if my margin or markup comes out negative?

A negative result means your selling price is below cost: you are losing money on each unit. The calculator will still show the numbers so you can see how far below break-even you are.