Profit Margin Calculator

Work out profit, profit margin and markup from your cost and selling price.

How to use

  1. Enter what the item costs you.
  2. Enter the price you sell it at.
  3. Press Calculate.

Good to know

Margin is profit as a share of the selling price. Markup is profit as a share of cost. They are different numbers, so use the same one consistently.

How do you calculate profit margin from cost and selling price?

This free online profit margin calculator takes a cost price and a selling price and works out the profit, the profit margin and the markup. Type both prices, press Calculate, and the tool shows how much you earn per sale and what that is as a percentage of the selling price and of the cost. A negative profit is shown as a loss, with negative numbers.

What does the profit margin calculator do and why is it useful?

Margin and markup are two ways of describing the same profit, and they are often confused. A seller who adds 25 percent to cost does not earn a 25 percent margin. Knowing which figure you are looking at matters when you set prices, compare products or read a supplier quote.

The tool reports three numbers:

  • Profit: selling price minus cost price.
  • Profit margin: profit as a percentage of the selling price.
  • Markup: profit as a percentage of the cost price.

It is useful for shop owners, online sellers, freelancers who resell materials, and students learning business arithmetic. It saves repeated manual division and removes the risk of dividing by the wrong number.

How does the profit margin calculator work under the hood?

The formulas are simple and are applied exactly as follows:

  • Profit = selling price - cost price.
  • Profit margin % = profit / selling price x 100.
  • Markup % = profit / cost price x 100.

The difference comes from the denominator. Margin divides by the selling price, so it can never reach 100 percent for a positive cost. Markup divides by the cost, so it can exceed 100 percent when you sell for more than double your cost. For the same profit, markup is always larger than margin when profit is positive.

If the selling price is lower than the cost, profit is negative. The margin and markup are then also negative, which tells you that the sale is a loss. The calculation happens only when you press the button, so changing a field does nothing until you press Calculate again.

How do you use the profit margin calculator step by step?

  1. Enter the cost price, which is what you pay to buy or make one item.
  2. Enter the selling price, which is what the customer pays.
  3. Press the Calculate button.
  4. Read the profit, the profit margin and the markup.
  5. Change either price and press Calculate again to compare another scenario.

What are some worked examples?

Every figure was computed and rounded to two decimals.

Example 1: a clean 20 percent margin

Input: cost 800, selling price 1000. Profit: 200.00. Profit margin: 200 / 1000 = 20.00 percent. Markup: 200 / 800 = 25.00 percent.

Example 2: a small retail item

Input: cost 250, selling price 300. Profit: 50.00. Profit margin: 50 / 300 = 16.67 percent. Markup: 50 / 250 = 20.00 percent.

Example 3: selling at double the cost

Input: cost 45, selling price 90. Profit: 45.00. Profit margin: 45 / 90 = 50.00 percent. Markup: 45 / 45 = 100.00 percent. Doubling the cost always gives a 100 percent markup but only a 50 percent margin.

Example 4: selling below cost

Input: cost 1200, selling price 1000. Profit: -200.00, which means a loss of 200. Profit margin: -200 / 1000 = -20.00 percent. Markup: -200 / 1200 = -16.67 percent.

Example 5: a small loss

Input: cost 60, selling price 50. Profit: -10.00. Profit margin: -10 / 50 = -20.00 percent. Markup: -10 / 60 = -16.67 percent.

Example 6: checking a pricing target

Suppose you want a 30 percent margin on an item that costs 70. Trying a selling price of 100, the tool gives profit 30.00, margin 30.00 percent and markup 42.86 percent. So a 30 percent margin needs a markup of about 42.86 percent on cost, not 30 percent.

CostSelling priceProfitMarginMarkup
8001000200.0020.00%25.00%
25030050.0016.67%20.00%
459045.0050.00%100.00%
12001000-200.00-20.00%-16.67%
7010030.0030.00%42.86%

How are margin and markup related?

For a positive profit, the two figures are linked by a simple rule. If the markup is m written as a decimal, the margin is m / (1 + m). A 25 percent markup (0.25) gives 0.25 / 1.25 = 20 percent margin. A 50 percent markup gives 0.5 / 1.5 = 33.33 percent margin. A 100 percent markup gives 1 / 2 = 50 percent margin. Going the other way, the markup is margin / (1 - margin), so a 20 percent margin means 0.2 / 0.8 = 25 percent markup. You can confirm any pair by entering a cost of 100 and the matching selling price in the calculator: 125 shows a 20.00 percent margin and a 25.00 percent markup, 150 shows 33.33 percent and 50.00 percent, and 200 shows 50.00 percent and 100.00 percent.

This is why a seller who says "we add 50 percent" and a buyer who hears "a 50 percent margin" can be talking about very different prices. Whenever a number is quoted, ask what it is a percentage of.

What tips help you price better?

  • Decide whether your goal is a margin or a markup before you start. Quote the same one in every comparison.
  • Include all costs in the cost price you enter, such as materials, packaging and delivery that you pay for. The tool uses only the two numbers you type.
  • Try several selling prices and compare the margins. A small price change can shift the margin noticeably on low-cost items.
  • If you offer discounts, work out the discounted price with the Discount Calculator and then test that price here to see what is left.
  • Use the Percentage Calculator for related share-of-total questions.
  • When tax is part of the price, the GST Calculator can separate the tax so you enter the net selling price.

What are common mistakes?

  • Mixing up margin and markup. A 25 percent markup is a 20 percent margin, as Example 1 shows.
  • Entering the price with tax as the selling price. Tax is not your income, so enter the price without it.
  • Leaving costs out. If a hidden cost is missing from the cost price, the margin is overstated.
  • Swapping the two fields. Entering the selling price in the cost field flips the sign of the profit.
  • Expecting live results. The numbers appear only after you press Calculate.

Who uses a profit margin calculator?

Retailers and market traders use it when they set shelf prices. Online sellers use it to check whether a listing is worth keeping. Small manufacturers use it to compare products. Freelancers who bill materials use it to see their share. Students of accounting and business use it to practise the difference between margin and markup. Buyers sometimes use it to understand how much room a seller has to negotiate.

Is my data private?

Yes. The calculation runs entirely in your browser. The prices you enter are not uploaded, not stored and not shared, and there is no history of past calculations. Refreshing the page clears the fields.

What are the limitations?

  • It works with one cost price and one selling price. There is no quantity or multi-item mode.
  • It reports profit, margin and markup only, not overheads, tax or fees.
  • It does not solve backwards. You cannot enter a target margin and get a price, so you test prices instead, as in Example 6.
  • It uses the numbers exactly as typed, so correct inputs are your responsibility.
  • Results appear only after pressing Calculate.

The tool gives general information, not financial advice.

Frequently asked questions

What is the formula for profit margin?

Profit margin percent = (selling price - cost price) / selling price x 100.

What is the formula for markup?

Markup percent = (selling price - cost price) / cost price x 100.

Why is markup higher than margin?

Both use the same profit, but markup divides by the smaller cost price, while margin divides by the larger selling price.

What does a negative result mean?

The selling price is below the cost, so the sale makes a loss. Profit, margin and markup are all shown as negative numbers.

Can the margin be above 100 percent?

Not with a positive cost price. Markup can be above 100 percent, for example when selling at more than double the cost.

Does the tool include tax or shipping?

No. It uses only the two prices you enter, so include any costs you want counted in the cost price.

Is my information stored?

No. The tool runs in your browser and nothing is uploaded or stored.

Do the results update as I type?

No. Press Calculate to see the figures.

Price with confidence

Understanding the difference between margin and markup keeps pricing honest and profits visible. Enter your two prices, press Calculate, and explore more free tools for day-to-day business math.

Scroll to Top