Margin, markup and price, in plain English

Everything starts from gross profit: the selling price minus the cost of goods sold (COGS), meaning what the product or service costs you to buy or make. Margin and markup are two ways of expressing that same profit:

  • Gross margin = gross profit ÷ selling price × 100. It tells you how much of each sale you keep.
  • Markup = gross profit ÷ cost × 100. It tells you how much you added on top of what you paid.
  • Price from a target margin = cost ÷ (1 − margin).
  • Price from a markup = cost × (1 + markup).
  • Maximum cost for a price = price × (1 − margin).

For the same sale, markup is always higher than margin, and the gap widens as margins grow: a 50% margin requires a 100% markup. Shopify sums it up with the same example we use below: a $40 cost and a $50 price give a 20% margin and a 25% markup. QuickBooks treats margin and gross margin as the same thing, and so does this calculator.

How to use the calculator

  1. Pick a mode: price from cost to set a price, margin from price to check an existing product, max cost from price to know what you can pay a supplier.
  2. Enter your unit cost with everything it takes to get the product sellable: purchase price, freight in, packaging.
  3. In the first mode, choose whether your target is a gross margin or a markup: the price is not the same.
  4. Enter prices before sales tax, the way they are shown on a US price tag.
  5. Read the verdict and the detailed formulas, then copy them into your price list.

Worked examples

A retailer buys an item for $50 and wants a 40% gross margin. These are the calculator's default values.

  • Selling price: $50 ÷ (1 − 40%) = $83.33.
  • Gross profit: $83.33 − $50 = $33.33.
  • Markup: $33.33 ÷ $50 = 66.7%.
  • Price-to-cost multiplier: $83.33 ÷ $50 = 1.67.

Checking an existing product: a unit that costs $40 and sells for $50 leaves $10 of gross profit, a 20% margin and a 25% markup.

Working back from the price: a coffee shop sells a latte for $5.50 and wants a 75% gross margin on it. Coffee, milk and cup must cost no more than $5.50 × 25% = $1.375, so about $1.38.

Margin to markup conversion table

Gross marginMarkupPrice multiplier
20%25%1.25
25%33.3%1.33
30%42.9%1.43
40%66.7%1.67
50%100%2.00
60%150%2.50

The conversion formulas: margin = markup ÷ (100 + markup) × 100, and markup = margin ÷ (100 − margin) × 100. The multiplier is 1 ÷ (1 − margin).

Margin or markup: which one should you track?

Both describe the same dollars from two angles. Margin reads straight off your income statement: it is the share of revenue left to pay overhead and profit, so it is the number to compare across products and against your financial goals. Markup is handier at the moment you set a price from a supplier's invoice.

Pick one for your targets and stick to it. QuickBooks uses the example of a $100 price on a $60 cost: a 40% margin, but a markup of about 67%. Same product, same $40, two very different percentages, and comparing one with a goal set in the other skews every pricing decision.

How your margin sets your ad budget

Your gross margin also caps what you can spend on advertising. Break-even ROAS is 1 ÷ gross margin: at a 40% margin, every ad dollar has to bring in at least $2.50 of revenue. Your maximum CPA is the gross profit of one sale: on an $83.33 sale at a 40% margin, you can spend up to $33.33 to win the order before you lose money on it.

That is why a few points of margin matter so much in paid acquisition. At a 50% margin, break-even ROAS drops to 2 and the same $83.33 order can carry $41.67 of ad spend.

What about sales tax?

The US has no VAT. Prices are usually shown before tax, and sales tax is added at checkout. It is collected for the state and the locality and passed on to them, so it is never part of your revenue or your margin: leave it out of every calculation on this page.

Rates vary by state and often by city or county. According to the Tax Foundation's midyear 2026 data, 45 states levy a statewide sales tax and 38 states allow local sales taxes. Five states have no statewide sales tax: Alaska, Delaware, Montana, New Hampshire and Oregon. California has the highest state-level rate at 7.25%, and combined state and local rates are highest in Louisiana. Whatever the rate, your margin math stays the same: it always starts from the pre-tax price.

Common mistakes

  • Applying a target margin as a markup: a 40% markup on a $50 cost gives $70, a 28.6% margin, not 40%.
  • Including sales tax in revenue, which inflates both price and margin.
  • Leaving shipping, packaging or payment processing fees out of unit cost.
  • Confusing gross margin with net profit: rent, payroll and advertising still have to be paid.
  • Using the same markup on every product, whatever its cost and demand.
  • Rounding down to a charm price without rechecking: on a $50 cost, selling at $79.99 instead of $83.33 drops the margin from 40% to 37.5%.

Once you know your margin, work out how much you can spend to win a customer with our CPA calculator, your break-even ad return with the ROAS calculator, and your budget with the Google Ads budget calculator. Our glossary entry on ROI explains how to measure the return on an investment. And to sell more without giving up margin, here is how we manage Google Ads.