Skip to content

Margin and Markup Calculator

Profit margin, markup and selling price from cost, price or a target percentage.

More options

Calculated on your device. Nothing you enter is sent anywhere.

Gross margin

Gross margin: 42.86%

Selling at $840.00 with a cost of $480.00 makes $360.00 profit: a 42.86% margin on the price, or a 75% markup on the cost.

Selling price
$840.00
Cost
$480.00
Gross profit
$360.00
Markup
75%

In short

Margin and markup both describe profit, the selling price minus the cost, but they divide it by different things. Markup divides the profit by the cost. Margin divides it by the selling price. So an item that costs $60 and sells for $100 has a $40 profit, a 40% margin and a 66.7% markup. Margin can never reach 100%, while markup has no upper limit.

How it works

Everything starts from the gross profit on one item or one sale:

Gross profit

profit = selling price − cost

Markup expresses the profit as a share of the cost. Retailers set prices this way: OpenStax Contemporary Mathematics defines the retail price as the cost times (1 + percent markup).

Markup

markup = profit ÷ cost price = cost × (1 + markup)

Margin expresses the same profit as a share of the selling price. In accounting, the gross profit margin ratio is (net sales − cost of goods sold) ÷ net sales, the share of each sale left to pay operating costs and profit.

Margin

margin = profit ÷ price price = cost ÷ (1 − margin)

Because the price is always larger than the cost when there is a profit, the margin is always smaller than the markup. They convert into each other directly:

Converting between them

margin = markup ÷ (1 + markup) markup = margin ÷ (1 − margin)

Worked examples

A phone that costs $480 and sells for $840

The profit is $840 − $480 = $360.00. As a share of the cost, that is a markup of 75%, the answer in OpenStax’s Example 6.20. As a share of the price, it is a margin of only 42.86%. Same sale, two very different percentages.

Open this example in the calculator

Pricing a $62 item for a 40% margin

Choose “Cost and the margin I want”. The price is $62 ÷ (1 − 0.40) = $62 ÷ 0.6 = $103.33. Adding 40% to the cost would give only $86.80, a margin of 28.6%. To get a 40% margin you need a markup of 66.66%.

Open this example in the calculator

What a retailer paid for a $29.50 T-shirt with an 18% markup

Choose “Selling price and markup”. Since price = cost × 1.18, the cost is $29.50 ÷ 1.18 = $25.00, as in OpenStax’s Example 6.21. Taking 18% off the price instead would give $24.19, because 18% of the price is more than 18% of the cost.

Open this example in the calculator

Using this calculator well

  • Agree on which one you mean. Suppliers and retailers often quote markup, while financial statements and investors use margin. A “30%” target means very different prices depending on which it is.
  • Gross margin is not net profit. It only covers the cost of the goods. Rent, wages, shipping and taxes come out of it, so a 40% gross margin might leave a few percent of net profit.
  • Discounts eat margin quickly. On a 40% margin, a 20% discount removes half of the profit: a $100 item costing $60 sells for $80, leaving $20 instead of $40.
  • Use the same basis for cost and price. Leave sales tax or VAT out of the selling price, since that money goes to the tax authority, not to you.

Frequently asked questions

What is the difference between margin and markup?

Both use the same profit, price minus cost. Markup divides it by the cost, and margin divides it by the selling price. A product bought for $50 and sold for $75 has a $25 profit, a 50% markup and a 33.3% margin. Markup is always the larger percentage when there is a profit.

How do I calculate the selling price from cost and margin?

Divide the cost by 1 minus the margin as a decimal. For a 25% margin on a $30 cost: $30 ÷ 0.75 = $40. Check it: the $10 profit is 25% of $40. Multiplying the cost by 1.25 instead gives $37.50, which is a 25% markup and only a 20% margin.

Can a margin be more than 100%?

No. Margin is profit divided by price, and the profit can never be more than the price unless the cost is negative. A margin approaches 100% as the cost approaches zero. Markup has no such limit: selling a $10 item for $50 is a 400% markup, but an 80% margin.

How do I convert markup to margin?

Divide the markup by 1 plus the markup, using decimals. A 50% markup is 0.5 ÷ 1.5 = 33.3% margin, and a 100% markup is a 50% margin. To go the other way, divide the margin by 1 minus the margin: a 20% margin is 0.2 ÷ 0.8 = 25% markup.

What is a good profit margin?

It varies widely by industry. Grocery and fuel retailers work on thin gross margins, while software and luxury goods run very high ones. Compare your margin with businesses selling similar products, and look at net margin after all expenses, not just gross margin, before judging whether prices are right.

Sources and methodology

  1. Contemporary Mathematics, 6.2 Discounts, Markups, and Sales Tax, OpenStax, Rice University, markup = percent markup × cost; retail price = cost × (1 + percent markup); Examples 6.16–6.21 (accessed November 24, 2026)
  2. Principles of Accounting, Volume 1, 6.6 Describe and Prepare Multi-Step and Simple Income Statements for Merchandising Companies, OpenStax, Rice University, gross profit margin ratio = (net sales − cost of goods sold) ÷ net sales; CBS: ($293,500 − $180,000) ÷ $293,500 = 0.39 (accessed November 24, 2026)

Rounding: Prices and costs are rounded half-up to the smallest unit of the currency (for example the cent). Percentages are rounded to 4 decimal places and shown to 2.

Review status: formulas verified against the cited sources by automated tests; editorial review pending. Version 1.0.0, content updated November 24, 2026.

Changelog
  • 1.0.0 · November 24, 2026: First published.

How we build and test calculators

Embed this calculator on your site

Paste this code into your page. The calculator runs in a frame, with no tracking and no cookies, and links back here for the formula and sources.

<iframe src="https://northcalculator.com/embed/en/margin" title="Margin and Markup Calculator" width="100%" height="760" style="border:0" loading="lazy"></iframe>