Margin and Markup Calculator

Known values

Margin is profit as a percentage of the selling price; markup is profit as a percentage of cost. Choose which two values you know.

Results

Enter your values and select Calculate.

m=p−cp×100%,k=p−cc×100%m=\frac{p-c}{p}\times100\%,\quad k=\frac{p-c}{c}\times100\%

About this tool

Margin and markup both describe the profit on a sale, but they divide it by different numbers. Gross margin compares profit with the selling price, while markup compares it with the cost. Mixing them up is a common pricing mistake: a 50% markup is only a 33.3% margin. This calculator converts between them and finds the selling price for a target margin or markup.

How it works

Choose which two values you know: cost and selling price, cost and a target margin, cost and a markup, or selling price and a target margin. Enter them per item in one currency and select Calculate.

The calculator returns the cost, selling price, gross profit, gross margin and markup together, so you can see both percentages for the same price. Use the price-and-margin option to find the most you can pay for an item and still reach your target margin.

m=p−cp×100%,k=p−cc×100%m=\frac{p-c}{p}\times100\%,\quad k=\frac{p-c}{c}\times100\%

Example

An item costs 60 and sells for 100. The gross profit is 40, so the margin is 40/100=40%40/100 = 40\% and the markup is 40/60≈66.67%40/60 \approx 66.67\%.

To reach a 40% margin on an item that costs 60, the price must be 60/(1−0.40)=10060/(1 - 0.40) = 100. Applying a 40% markup instead gives only 60×1.40=8460 \times 1.40 = 84, which is a margin of about 28.6%.

Assumptions and limits

The calculator works with gross margin on a single item: cost means the direct cost of the item, not overheads, shipping, payment fees or taxes unless you include them. Margins of 100% or more are impossible because they would require a zero cost. Sales tax or VAT should be excluded from the selling price.

Frequently asked questions

What is the difference between margin and markup?

Margin is profit divided by the selling price; markup is profit divided by the cost. For the same sale the markup is always larger than the margin when there is a profit.

How do I convert markup to margin?

Use m=k/(1+k)m = k/(1 + k) with both as decimals. A 50% markup is 0.5/1.5≈33.3%0.5/1.5 \approx 33.3\% margin. To go the other way, use k=m/(1−m)k = m/(1 - m).

How do I calculate a selling price from a desired margin?

Divide the cost by one minus the margin: p=c/(1−m)p = c/(1 - m). For a cost of 60 and a 25% margin the price is 60/0.75=8060/0.75 = 80.

Can margin be negative?

Yes. If the selling price is below cost, the profit is negative and so are both margin and markup, which shows the item is sold at a loss.

What is a good profit margin?

It varies widely by industry. Grocery retailers may work with gross margins of 20% to 30%, while software and luxury goods can exceed 70%. Compare with businesses like yours and make sure the margin covers your operating costs.

Link with your values

Add these parameters to this page’s address to open it with the values filled in, for example to share a calculation or to link to it from an AI assistant. The result is calculated in the browser: the page HTML shows an example for the default values, and the tool sets the data-url-params attribute once the link’s values are applied.

ParameterValueIf omitted
modeKnown valuesone of: cost_price, cost_margin, cost_markup, price_margindefault cost_price
costCost per itemamount without a currency symbol; allowed ≥ 0; used with mode = cost_price, cost_margin, cost_markuprequired
priceSelling price per itemamount without a currency symbol; allowed ≥ 0; used with mode = cost_price, price_marginrequired
margin_pctGross marginpercent: 6.5 means 6.5%; used with mode = cost_margin, price_marginrequired
markup_pctMarkuppercent: 6.5 means 6.5%; used with mode = cost_markuprequired

Examples

  • ?cost=42&price=70
  • ?cost=60&margin_pct=35
  • ?cost=18.5&markup_pct=120
  • ?price=249&margin_pct=45

Write decimals with a point. Encode a space as %20, + as %2B, # as %23 and & as %26.

Result elements: [data-result-block="margin_markup_calculator"]