Skip to content
CalculStoreCalculStore
All tools / Money

Margin calculator

Profit margin and markup from cost and price, or the price for a target margin.

About this calculator

This margin calculator works out the gross profit margin and markup on a product or service. Enter what it costs you and what you sell it for, or start from the margin or markup you want.

It helps with pricing, quotes and checking that a sale really makes money.

How it works

Margin is profit as a share of the selling price: (price − cost) ÷ price. Markup is profit as a share of the cost: (price − cost) ÷ cost. A 50% markup is a 33.3% margin.

Last reviewed:

Worked example

  • Start from: Cost and selling price
  • Cost: $60
  • Selling price: $100

Gross margin: 40%

Common questions

What is the difference between margin and markup?

Both compare profit, but against different numbers. Margin divides profit by the price, and markup divides it by the cost. Buying at $60 and selling at $100 is a 40% margin and a 66.7% markup.

What is a good profit margin?

It depends on the industry. Grocery shops often run on thin margins of a few percent, while software and consulting can have much higher ones. Compare yourself with similar businesses.

How do I price for a 30% margin?

Divide the cost by 1 − 0.30. A $70 cost needs a price of $100 for a 30% margin. Choose Cost and target margin to work it out.

The story behind it

Where the idea came from: Luca Pacioli's 1494 book on mathematics spread double-entry bookkeeping across Europe, the system that records cost and profit for every sale.

Venetian merchants already kept careful accounts, and Pacioli wrote their method down for everyone. Knowing the cost and the profit on each sale is still the heart of running a business, whether you sell coffee, cars or code.

Why you can trust this calculator

  • It runs in your browser. Nothing you type into it is sent anywhere.
  • The method is explained on this page, so you can check it yourself.
  • Free to use, with no sign-up.
  • Results are estimates, not financial advice.
  • Spotted a mistake? Tell us and we'll look into it.
Prof. Alexandre Laurent, founder of CalculStore
Built byProf. Alexandre Laurent

After 15 years as a mathematics educator, I built CalculStore to give students, teachers, professionals and anyone working with numbers simple, reliable tools.

Meet the founder