Home / Financial / Margin Calculator

Margin Calculator: Gross Margin, Markup and Profit

Know any two of cost, selling price and gross margin percentage? This calculator finds the missing one, along with the profit and the matching markup, and explains why margin and markup differ.

By Adzita Editorial Team · Updated 2026-11-03 · How we build and check our tools

Margin formulas

Gross margin is the share of the selling price that is profit. The three quantities are linked by a single identity, so knowing two of them fixes the third.

Take the example: cost 150 and margin 25%. Price is 150 ÷ 0.75 = 200, profit is 50, and 50 ÷ 200 is 25%.

Margin versus markup

Margin divides profit by the selling price. Markup divides the same profit by the cost. Because price is larger than cost, margin is always the smaller percentage, and the two only look alike at very small values. A 50% markup is a 33.3% margin. A 100% markup, which doubles the cost, is a 50% margin.

Converting between them: margin = markup ÷ (1 + markup) and markup = margin ÷ (1 − margin). The table in the result applies the second formula. Confusing the two is a common reason a product ends up priced below target. A person who adds 30% to cost expecting a 30% margin actually earns about 23.1%.

Choosing which inputs to use

Use cost and price to see what an existing price earns. Use cost and margin to set a price that hits a target. Use price and margin when the market fixes the price and you need to know the maximum cost you can afford.

This is gross margin: it ignores overheads, taxes, discounts and shipping unless you have included them in cost. Net margin, which subtracts all expenses, will be lower. A margin of 100% is impossible with a positive cost, which is why the margin field stops just below it. For a related tool, see the markup calculator.

Reading margins in context

There is no single good margin. Businesses that sell high volumes at thin prices, such as grocery, run on low single-digit or low double-digit margins, while products with high design or service content can carry much more. Compare your figure with your own costs and goals rather than with a generic target.

When you review a result, ask three questions. Does the margin cover overheads such as rent and wages once volume is taken into account? Is the cost figure complete, including freight, packaging and payment fees? And what happens to the margin if the supplier raises the cost by 5% while the price stays put? Running the calculator with a higher cost answers the last question in seconds.

Worked example

A retailer pays 150 for an item and wants a 25% gross margin. What should the selling price be?

Inputs

I knowCost and desired margin
Cost per item150
Gross margin25 %

Result

25.00% gross margin

Profit of 50.00 on a selling price of 200.00.

Cost150.00
Selling price200.00
Profit50.00
Gross margin (profit ÷ price)25.00%
Markup (profit ÷ cost)33.33%

Margin and the markup that produces it

Gross marginMarkup on cost needed
10%11.11%
20%25.00%
25%33.33%
30%42.86%
40%66.67%
50%100.00%
60%150.00%
75%300.00%

Financial disclaimer: Results are estimates for planning and education. They are not financial, tax or legal advice. Fees, taxes, rates and rules vary by lender, product and country, so confirm figures with your provider or a qualified adviser before making decisions.

Frequently asked questions

What is the formula for gross margin?

Gross margin equals selling price minus cost, divided by selling price. Multiply by 100 for a percentage.

Is margin the same as markup?

No. Margin is profit as a share of price and markup is profit as a share of cost. The same sale has a higher markup percentage than margin percentage.

How do I find the selling price for a target margin?

Divide the cost by one minus the margin as a decimal. For a 40% margin and a cost of 60, the price is 60 ÷ 0.6 = 100.

Can margin be negative?

Yes, if you sell below cost. Enter the cost and price to see a negative margin. The target-margin modes accept only zero or positive margins.

Does this include tax or overheads?

No. It uses only the cost you enter. Add any per-item overhead or shipping to the cost if you want it reflected.

Markup CalculatorSelling price, profit and implied margin from cost and markup percentage.Break-Even CalculatorBreak-even units and revenue from fixed cost, price and variable cost, with optional profit target.Percentage CalculatorPercent of a number, percent change, and increase or decrease by a percent, with working.Discount CalculatorSale price, savings and the combined effect of two successive percentage discounts.

References and sources

  1. Accounting textbooks define gross profit margin as gross profit divided by revenue; see Investopedia or any introductory financial accounting text.
  2. IFRS Foundation: presentation of revenue and cost of sales. Link

Check primary sources for anything you rely on.