Skip to main content
Free calculator

Profit Margin Calculator

Enter a selling price or revenue and the cost behind it. You get the gross profit, the gross profit margin and the markup, with margin and markup clearly separated.

Enter your numbers

What the customer pays, or your total revenue for the item or period. It must be above zero.

What it costs you to make or deliver what you sold: materials, direct labor, packaging, delivery and fees. Enter 0 if none.

Your result

Enter a selling price or revenue and a cost to see your gross profit, margin and markup.

How the profit margin calculation works

The calculator uses three formulas, and it shows margin and markup side by side because they are easy to mix up.

Gross profit = Revenue - CostWhat is left from a sale after the direct cost of what you sold.
Profit margin (%) = (Gross profit / Revenue) x 100Gross profit as a share of the selling price.
Markup (%) = (Gross profit / Cost) x 100Gross profit as a share of the cost.

Margin and markup are not the same

Both describe the same profit, but they divide by different things. Margin divides by the selling price, and markup divides by the cost. Because the cost is smaller than the price, markup is always the larger percentage when you are making a profit.

This causes real mistakes. If you add 50% to your cost to set a price, your margin is not 50%, it is lower. Mixing them up can make a price look more profitable than it is.

Worked examples

Illustrative numbers only

These figures are made up to show the arithmetic. They are not a benchmark.

  1. Selling price: 100. Cost: 60.
  2. Gross profit = 100 - 60 = 40.
  3. Margin = (40 / 100) x 100 = 40%.
  4. Markup = (40 / 60) x 100 = 66.7%.
Illustrative numbers only: a 50% markup
  1. Cost: 100. You add a 50% markup, so the price is 150.
  2. Gross profit = 150 - 100 = 50.
  3. Margin = (50 / 150) x 100 = 33.3%, not 50%.

Setting a price from a target margin

If you know the margin you want, work backwards from your cost:

Price = Cost / (1 - Target margin)Enter the target margin as a decimal, for example 40% = 0.40.

For example, a cost of 60 and a target margin of 40% gives a price of 60 / (1 - 0.40) = 100. You can check it by entering 100 and 60 above.

What your result means

A margin tells you how much of each sale is left to pay for everything else: rent, software, marketing, salaries and your own profit. A higher margin gives you more room, and a very low or negative margin means a sale does not even cover its direct cost. What counts as a good margin differs a lot between businesses, so compare with your own costs and your own past results, not with a number from a different kind of business.

What this calculator cannot tell you

This calculator shows gross profit, which only subtracts the direct cost of what you sold. It is not your net profit.

Ways to improve your margin

You can raise the price, lower the cost, or both. A strong brand can support higher prices, as explained in premium pricing, and the way you present a price matters too (price anchoring). If you sell related items, bundling can change both your price and your cost per sale. Lower-priced entry products work differently: see why low-price products drive customer growth for the trade-off.

Frequently asked questions

What is the difference between gross margin and net margin?

Gross margin subtracts only the direct cost of what you sold. Net margin also subtracts your other expenses, such as rent, marketing and salaries, and usually taxes and interest. This calculator shows gross margin.

What is a good profit margin?

It varies widely between businesses and depends on your other costs. A useful margin is one that covers your overhead and leaves the profit you want. Compare it with your own history and your own costs.

Can margin be negative?

Yes. If your cost is higher than your revenue, the gross profit and the margin are negative, which means you lose money on that sale before any other expense.

Why does markup show as not defined?

Markup divides by your cost, so it cannot be calculated when the cost is zero. Margin still works, because it divides by revenue.