Home / Finance

Margin Calculator for Profit Margin and Markup

Our margin calculator finds your profit, margin and markup from a cost and a selling price. It also works as a markup calculator, sets a price from the margin you want and finds the most you can pay for a product. Enter your numbers to see what each sale really earns.

What Profit Margin Means

Profit margin is the share of the selling price that you keep as profit. If you sell a product for $100 and it cost you $60, your gross profit is $40 and your margin is 40%. In other words, 40 cents of every dollar of sales is profit before other expenses.

Margin is one of the clearest signs of a healthy product. A low margin leaves little room for rent, wages, ads and returns. A margin calculator shows the number instantly, so you can check prices before you commit to them.

How to Use the Margin Calculator

  • Choose what you already know from the four modes.
  • Enter the cost, the selling price, the margin or the markup.
  • Add the number of units if you want totals for a whole order.

The results show the selling price or cost, the gross profit per unit, the margin and the markup. The formula appears under the results so you can follow the math. If the price is below cost, the tool warns you in red.

Margin vs Markup

Margin and markup both describe profit, but they divide by different numbers. Margin divides profit by the selling price. Markup divides profit by the cost, which is why the markup number is always bigger.

Take a product that costs $60 and sells for $100. The profit is $40, so the margin is 40% and the markup is 66.67%. Mixing the two up in a markup calculator is a common pricing mistake that can wipe out the profit you planned.

MarkupEqual margin
25%20%
50%33.33%
66.67%40%
100%50%

A 50% markup gives only a 33.33% margin, not 50%. To reach a 50% margin you need a 100% markup, which means doubling the cost. The markup calculator mode lets you test any figure.

How to Calculate Profit Margin

To find the margin, subtract the cost from the selling price, divide by the selling price and multiply by 100. For a $100 price and a $60 cost, that is (100 − 60) ÷ 100 × 100 = 40%. This is the figure most businesses quote when they talk about margin.

To find the markup, divide the same profit by the cost instead, as a markup calculator does. Here that is 40 ÷ 60 × 100 = 66.67%. Both numbers describe the same sale from two angles.

Setting a Price From a Target Margin

If you know your cost and the margin you want, divide the cost by 1 minus the margin. A product that costs $25 needs a price of 25 ÷ (1 − 0.40) = $41.67 to give a 40% margin. A common mistake is to add 40% to the cost in a markup calculator, which gives $35.00 and a margin of only 28.57%.

The tool does this division for you in the second mode. Round the result to a price that suits your store, such as $41.99. Then check the margin again at the rounded price with the markup calculator.

Margin Calculator Examples

A Retail Product

A shop buys a lamp for $60 and sells it for $100. The margin calculator shows a gross profit of $40, a 40% margin and a 66.67% markup. Selling 200 lamps brings in $20,000 of revenue and $8,000 of gross profit.

Pricing With a Markup

A café adds a 40% markup to an ingredient cost of $25 per batch. The markup calculator gives a price of $35.00 and a margin of 28.57%. If the café needs a 40% margin to cover rent, the markup has to rise to 66.67%.

Finding Your Maximum Cost

A seller wants to sell a product at $49.99 with a 35% margin. The fourth mode shows a maximum cost of $32.49. Any supplier quote above that figure means a lower margin or a higher price.

Gross, Operating and Net Margin

The tool works out gross margin, which counts only the direct cost of the product. That cost is often called cost of goods sold, and it includes materials, stock and direct labor. Gross margin tells you how much each sale contributes before overheads.

Operating margin also takes out running costs such as rent, wages and marketing. Net profit margin goes further and subtracts interest and taxes too. A business can have a strong gross margin and still lose money if overheads are too high.

Working Out Net Margin

Divide net profit by total revenue and multiply by 100. A company with $500,000 of revenue and $40,000 of net profit has an 8% net margin. Track all three margins over time to see where money is gained or lost.

What Is a Good Margin

There is no single right answer, because margins vary a lot by industry. Grocery stores run on thin margins, while software firms keep most of each sale. Compare your figures with businesses like yours, not with every company.

  • Retail stores often aim for gross margins of 25% to 50%.
  • Restaurants usually watch food cost closely and keep it near 30% of menu prices.
  • Online stores need room for shipping, returns and ad costs.

Use the markup calculator to see how a price change moves your margin. A small rise in price often lifts profit more than a big rise in sales. Test a few prices before you decide.

Discounts and Your Margin

Discounts eat into margin faster than most people expect. A product priced at $100 with a $60 cost has a 40% margin. Cut the price by 20% to $80 and the profit falls from $40 to $20, a margin of only 25%.

You would need to sell twice as many units to earn the same profit. Check any sale with our Discount Calculator and then run the new price through the margin calculator. Both views together show whether a promotion is worth it.

Tips for Better Margins

  • Know your full cost, including shipping, packaging and payment fees.
  • Price from the margin you need, not from what competitors charge.
  • Review supplier prices every few months.

Small improvements add up across thousands of sales. A one dollar cost saving on a product that sells 5,000 times a year is $5,000 of extra profit. Run your numbers through the markup calculator whenever a cost changes.

Why Use Our Margin Calculator

It works in four directions: from cost and price, from a target margin, from a markup and from a selling price back to cost. It shows margin and markup side by side, so you never mix them up. It runs in your browser with no sign up. Enter your cost and price your products now.

Frequently asked questions

Is this margin calculator free?

Yes, it is free with no sign up and no limit.

How to calculate profit margin from cost and price?

Subtract the cost from the price, divide by the price and multiply by 100.

What is the difference between margin and markup?

Margin divides profit by the price, while markup divides it by the cost.

Can the markup calculator set a price for me?

Yes, enter the cost and the markup and it gives the selling price.

Why can a margin never reach 100%?

A 100% margin would mean the product cost nothing at all.

What markup gives a 50% margin?

A 100% markup, which means selling at double the cost.

What cost should I enter?

Use the cost of goods sold, which is the direct cost of each unit.

Does the margin calculator include overheads?

No, it shows gross margin, so subtract overheads to find net profit margin.

Related calculators

Other tools people use alongside the margin calculator.

Browse all calculators