Margin Calculator

Share calculator:
Embed this tool:

Fill in your cost and one of revenue, profit or margin to see the other figures instantly. The guide explains gross margin, net margin and how margin differs from markup.

How to use the margin calculator

Type the cost of the product or service first. Then supply whichever one of the remaining quantities you already know:

  • Revenue, the selling price, to get the profit, margin and markup.
  • Profit, the dollar amount you keep per sale, to get the revenue, margin and markup.
  • Margin (%), your target, to get the price you need to charge and the profit it yields.

If more than one of those boxes is filled, revenue takes priority, then profit, then margin. Zero counts as an empty box. A margin of 100% or more cannot be reached with a positive cost, so the calculator rejects it.

What is gross profit margin?

Gross profit margin is the share of each sales dollar that is left after paying the direct cost of what you sold. Direct costs, often called cost of goods sold, include materials, manufacturing labour and anything else tied to producing a unit. Rent, marketing and admin salaries are not part of it.

The figure shows how much room a business has to cover its other expenses and still make money. A rising gross margin usually means better pricing or cheaper inputs; a falling one often signals discounting or cost creep.

What is net profit margin?

Net profit margin goes further down the income statement. It subtracts every expense, including operating costs, interest and taxes, before dividing by revenue. It is the portion of sales that finally reaches the owners.

This calculator works from a single cost figure, so it gives the gross view of one product or sale. To get a net margin, pass the all-in cost for the period through the same formula.

Margin formulas

gross profit = revenue − cost of goods sold

gross margin % = (revenue − cost) ÷ revenue × 100

net margin % = (revenue − all expenses) ÷ revenue × 100

revenue = cost ÷ (1 − margin % ÷ 100)Use this to price an item from a target margin.

Example (gross): a retailer takes in $480,000 in a year and spends $312,000 on the goods it sold. Gross profit is $168,000 and gross margin is 168,000 ÷ 480,000 = 35%.

Example (net): the same retailer also pays $96,000 in operating costs, $12,000 in interest and $18,000 in tax, so total expenses are 312,000 + 96,000 + 12,000 + 18,000 = $438,000. Net profit is $42,000 and net margin is 42,000 ÷ 480,000 = 8.75%.

How to calculate a price from a target margin

To hit a chosen margin, divide the cost by one minus the margin as a decimal. Do not simply add the margin percentage to the cost; that gives a smaller margin than you wanted.

Example: an item costs $60 and you want a 40% margin. The price is 60 ÷ (1 − 0.40) = 60 ÷ 0.60 = $100. Profit is $40, and relative to cost that is a markup of 40 ÷ 60 = 66.67%.

Going the other way, a product that costs $1,200 and sells for $1,500 earns $300, so its margin is 300 ÷ 1,500 = 20%.

Margin versus markup

Margin is profit divided by revenue; markup is profit divided by cost. Because revenue exceeds cost on a profitable sale, margin is always the smaller number, and it can never reach 100%.

markup % = margin % ÷ (100 − margin %) × 100

Markup required to reach a given margin
MarginMarkup 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%

What is a good profit margin?

There is no single answer, because margins depend on the business model. Grocery and fuel retail typically work on thin margins and make up for it with volume, while software, consulting and luxury goods often carry much higher ones. Compare your figure with similar businesses and with your own history rather than with a universal target.

  • A margin that covers your operating expenses and leaves a profit is healthy for that business.
  • Track margin per product line; a strong average can hide items that lose money.
  • Test price changes against volume, because a higher margin on fewer sales may earn less in total. The break-even calculator shows how many units you need to cover fixed costs.

Results are arithmetic estimates and do not replace advice from an accountant or financial adviser. See our disclaimer.

Frequently asked questions

How do I calculate profit margin?

Subtract the cost from the revenue to get the profit, divide that by the revenue and multiply by 100. Revenue of $100 on a cost of $80 gives a profit of $20 and a margin of 20%.

What is the difference between margin and markup?

Margin measures profit as a share of the selling price, while markup measures the same profit as a share of the cost. A 20% margin corresponds to a 25% markup.

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

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

Why can't the margin be 100% or more?

A 100% margin would mean the item costs nothing, and anything higher would need a negative cost. For a positive cost the margin is always below 100%, although it can be negative if you sell at a loss.

Cite this calculator and page

If you use this page in your work, you can cite it as:

Reeliy Editorial Team. (2026). Margin Calculator. Reeliy. https://reeliy.com/calculators/profit-margin-calculator“Margin Calculator.” Reeliy, 2026, https://reeliy.com/calculators/profit-margin-calculator.