Profit Margin Calculator

Enter any two of cost, price and margin to calculate the rest.

100Selling price
60Cost
40Gross profit
40%Gross margin
66.67%Markup

How to calculate profit margin

  1. Choose what you know: cost and price, cost and target margin, cost and markup, or price and margin.
  2. Enter the numbers.
  3. See the selling price, cost, gross profit, margin and markup together.

Formulas

  • Gross profit = price − cost
  • Margin = (price − cost) ÷ price × 100
  • Markup = (price − cost) ÷ cost × 100
  • Price from margin = cost ÷ (1 − margin)
  • Price from markup = cost × (1 + markup)

Why it matters

Confusing margin and markup is one of the most common pricing mistakes in small businesses: adding a 30% markup gives only a 23% margin. Always check which one your target refers to, especially when comparing with industry benchmarks, which are usually quoted as margins.

Related: Invoice Generator, Loan Calculator.

Gross margin vs. net margin

This calculator works out gross margin: the difference between selling price and the direct cost of the product, such as purchase price, materials or manufacturing. Net margin also subtracts operating costs like rent, salaries, marketing, payment fees and taxes, so it is always lower. A product with a 40% gross margin might leave a business with a 5–15% net margin.

Margin and markup conversion table

  • 20% margin = 25% markup
  • 25% margin = 33.3% markup
  • 33.3% margin = 50% markup
  • 40% margin = 66.7% markup
  • 50% margin = 100% markup
  • 60% margin = 150% markup

To convert margin to markup: markup = margin ÷ (1 − margin). To convert markup to margin: margin = markup ÷ (1 + markup).

Typical margins by industry

Gross margins vary widely. Grocery retail often runs at 20–30%, clothing and fashion retail at 50–60%, restaurants at around 60–70% on food cost, and software businesses at 70–90%. Use industry figures as a rough guide only; your costs, volume and pricing strategy matter more.

Pricing with discounts in mind

If you plan to run sales, set your regular price high enough that the discounted price still meets your minimum margin. For example, with a cost of 60 and a 20% sale, a regular price of 100 leaves a sale price of 80 and a 25% margin; a regular price of 90 would leave only about 17%.

Including all costs

For an accurate gross margin, include every direct cost of the item: purchase price, shipping to you, import duties, packaging and payment processing fees per order. Leaving out shipping or marketplace fees is the most common reason a product that looks profitable on paper loses money in practice.

Frequently asked questions

What is the difference between margin and markup?

Margin is profit as a percentage of the selling price; markup is profit as a percentage of cost. Buying at $60 and selling at $100 is a 40% margin but a 66.7% markup.

How do I price for a target margin?

Divide cost by (1 − margin). For a 40% margin on a $60 cost: 60 ÷ 0.6 = $100. Choose “Cost & target margin” to calculate it.

Can margin be 100% or more?

No. Margin can approach 100% only if cost approaches zero. Markup, however, can be any percentage.

Last updated · By the Toolbenchly team · How we build and test our tools