Skip to content
Popular Calculators
Browse Business calculators

Profit Margin Calculator

Profit margin from cost and price, the price that hits a target margin, or the most you can pay — with markup alongside so the two are never confused.

What do you want to work out?

Optional. To see the profit on a batch.

About the Profit Margin Calculator

Profit margin is the share of each sale that you keep as profit. It is the single most useful number for pricing, and one of the most commonly mixed up, because it sits right next to a very similar number — markup — that uses the same profit but a different base.

This profit margin calculator works in three directions. It finds the margin from a cost and a selling price; the price you need to charge to hit a target margin; and the maximum cost you can pay for an item that has to sell at a set price and margin. Whatever you ask, it shows the profit, the margin and the markup side by side, so the two are never confused.

How to Use the Profit Margin Calculator

Choose what you want to find:

Find the margin — enter the cost per item and the selling price.

Price for a target margin — enter the cost and the margin you want.

Maximum cost for a price — enter the selling price and the margin you want.

Optionally, enter a quantity to see the profit on a whole batch.

Use prices before sales tax or VAT. Tax is collected for the government and is not part of your margin.

How Profit Margin Is Calculated

  profit   =  price − cost
  margin   =  profit ÷ price
  markup   =  profit ÷ cost

  price for a margin    =  cost ÷ (1 − margin)
  cost for a margin     =  price × (1 − margin)

Step-by-Step Example

An item costs 60 and sells for 100.

  Profit:   100 − 60      =  40
  Margin:   40 ÷ 100      =  40%
  Markup:   40 ÷ 60       =  66.67%

What price gives a 40% margin on a cost of 60?

  Price:    60 ÷ (1 − 0.40)  =  60 ÷ 0.60  =  100

What is the most you can pay for something that sells for 50, at a 30% margin?

  Cost:     50 × (1 − 0.30)  =  35
  Check:    (50 − 35) ÷ 50   =  30%

Margin vs Markup

MarkupMargin
25%20%
50%33.33%
66.67%40%
100%50%
200%66.67%
300%75%

Margin is always the smaller number, and it can never reach 100% unless the item cost nothing. Markup has no ceiling.

The mistake to avoid is adding your target margin to the cost. Adding 40% to a cost of 60 gives 84 — and 24 of profit on a price of 84 is only a 28.57% margin. To hit a 40% margin you have to divide by 0.60, which gives 100.

Gross Margin and Net Margin

Gross margin uses the direct cost of the goods sold: what you paid for the stock or spent on materials and production. It is what this calculator gives when you enter the item's cost.

Net margin takes every expense into account — rent, wages, marketing, software, interest and tax — and divides the profit left by total revenue. It is always lower than gross margin, and it is what shows whether the business as a whole is making money.

A healthy gross margin has to be large enough to pay all those overheads and still leave a net profit. That is why businesses with high fixed costs need high gross margins.

Setting Prices with Margins

Start from the margin you need, not the markup you are used to. Work out the gross margin that covers your overheads and target profit, then use the price mode to set each price.

Check discounts against margin. A 20% discount on an item with a 40% margin halves your profit on it: the price drops from 100 to 80, and profit from 40 to 20.

Watch costs rise. If the cost goes up and the price does not, the margin shrinks. Re-run the price mode whenever a supplier puts prices up.

Margin Across a Whole Range

Most businesses sell more than one product, and each has its own margin. The margin of the business as a whole is not the average of those percentages; it is total profit divided by total revenue, so the products that sell most count most.

A shop selling mostly low-margin items and a few high-margin ones can have a lower overall margin than its best products suggest. Run the calculator for each main product, multiply each profit by the quantity sold, and compare the total with total sales. That shows which products really carry the business, and which look profitable on paper but add little.

Understanding Your Result

Result answers the question you asked: the margin, the price to charge, or the most you can pay.

Profit is the price less the cost, per item and for your quantity.

Margin is the profit as a share of the selling price.

Markup is the same profit as a share of the cost.

Price and cost shows the figures used, or the batch totals.

Worth knowing compares margin with markup, or warns when the price is below cost.

When Should You Use This Calculator?

Setting prices for a new product or service.

Checking quotes before sending them to customers.

Reviewing a supplier's price rise and what it does to your margin.

Deciding how much you can pay for stock that has to sell at a market price.

Planning discounts and promotions.

Common Mistakes

Confusing margin with markup. A 50% markup is only a 33.33% margin.

Adding the margin to the cost. Divide by (1 − margin) instead.

Including sales tax in the price. Tax is not revenue for your margin.

Forgetting overheads. A good gross margin can still be a net loss.

Discounting without checking margin. Small discounts take large bites out of profit.

Frequently Asked Questions

How do I calculate profit margin?

Subtract the cost from the selling price to get the profit, then divide the profit by the selling price. An item that costs 60 and sells for 100 makes 40 of profit, which is a 40 percent margin.

What is the difference between margin and markup?

Both use the same profit but a different base. Margin divides it by the selling price; markup divides it by the cost. The item above has a 40 percent margin but a 66.67 percent markup. Margin is always the smaller of the two.

What price do I need for a 40 percent margin?

Divide the cost by one minus the margin. On a cost of 60, that is 60 ÷ 0.60 = 100. Adding 40 percent to the cost gives only 84, which is a 28.57 percent margin, a common and expensive mistake.

What is a good profit margin?

It depends heavily on the industry. Grocery retail often works on gross margins in the twenties, while software and services can run far higher. Compare against businesses like yours, and remember that gross margin must still cover overheads before any net profit is left.

Is this gross margin or net margin?

Gross margin, if you enter the direct cost of the item. Net margin uses profit after every expense, including rent, wages and tax, divided by revenue. The formula is the same; only the costs you include change.

Can a margin be 100 percent or more?

No. A margin is a share of the selling price, so it can only reach 100 percent if the item cost nothing. Markup has no upper limit: a 300 percent markup is a 75 percent margin.

Last reviewed September 28, 2026 by the CalculatorPeak editorial team.