Home › Calculators › Profit Margin Calculator

Profit Margin Calculator

Enter any two of cost, selling price, profit, margin or markup and the rest is solved instantly. Switch to bulk mode to price a whole product list and export it as CSV.

Or just type in any two fields – the last two you edit are used.

Gross profit–
Gross margin–
Markup–
Cost–
Selling price–
Advertisement

Margin ↔ markup converter

MarginMarkupPrice for a $100 costProfit

How to use the Profit Margin Calculator

  1. Type any two values, for example the cost and the selling price. The two fields you edited last are used as inputs and the others are calculated.
  2. Or pick the known values from the Solve from list, such as Cost + Margin % to find the price for a target margin.
  3. Read the results: gross profit, margin and markup, plus the formulas used.
  4. Convert margin and markup with the converter below the results.
  5. For many products, open the Bulk tab, paste one item per line (cost and price, or cost and target margin) and download the table as CSV.

Profit margin and markup formulas

All of the results come from three simple relationships between cost, selling price and profit:

  • Gross profit = selling price − cost
  • Gross margin % = profit ÷ selling price × 100
  • Markup % = profit ÷ cost × 100
  • Price from a target margin = cost ÷ (1 − margin)
  • Price from a markup = cost × (1 + markup)
  • Margin from markup = markup ÷ (1 + markup), and markup from margin = margin ÷ (1 − margin)

Worked example: you buy a lamp for $45 and want a 40% gross margin. The price is 45 ÷ (1 − 0.40) = $75. Your profit is $30, which is 40% of the $75 price and a 66.67% markup on the $45 cost.

Margin vs markup: the most common pricing mistake

Many sellers add their target margin to the cost as if it were a markup. Adding 30% to a $100 cost gives a $130 price, but the margin is only 30 ÷ 130 = 23.1%. To really earn a 30% margin you need to charge 100 ÷ 0.70 = $142.86. The gap grows quickly at higher margins:

Target marginMarkup neededPrice on a $100 costIf you added the margin as markup
20%25%$125.00$120.00 (16.7% margin)
30%42.86%$142.86$130.00 (23.1% margin)
40%66.67%$166.67$140.00 (28.6% margin)
50%100%$200.00$150.00 (33.3% margin)
60%150%$250.00$160.00 (37.5% margin)

Average margin or overall margin?

In bulk mode you get two different margins for the list. The average margin is the simple mean of each row's margin, so a cheap item counts as much as an expensive one. The overall (weighted) margin is total profit divided by total revenue, which is the figure your accounts will show if you sell one of each item. When high-priced items have thin margins, the overall margin is lower than the average, and that is usually the number to plan with.

Keep in mind that gross margin ignores overheads such as rent, wages, shipping, payment fees and advertising. Make sure your gross margin leaves enough room to cover them and still produce a net profit.

Frequently asked questions

What is the difference between margin and markup?

Both compare profit with a base amount. Margin divides profit by the selling price, markup divides profit by the cost. A product that costs $60 and sells for $100 has a $40 profit, a 40% margin and a 66.67% markup. Margin can never reach 100%, but markup can be any size.

How do I calculate the selling price from cost and margin?

Divide the cost by one minus the margin as a decimal. For a $60 cost and a 40% target margin the price is 60 / (1 - 0.40) = $100. Simply adding 40% to the cost gives $84, which is only a 28.6% margin.

How do I convert markup to margin?

Margin = markup / (1 + markup). A 50% markup equals 0.5 / 1.5 = 33.33% margin. To go the other way, markup = margin / (1 - margin), so a 25% margin is a 33.33% markup.

What is a good profit margin?

It depends on the industry. Grocery and fuel retail often run gross margins of 15 to 30%, general retail and restaurants 30 to 60%, and software or digital products 70 to 90%. Compare yourself with businesses in the same sector, and remember gross margin is before overheads like rent and wages.

Is gross margin the same as net profit margin?

No. Gross margin only subtracts the direct cost of the goods sold. Net profit margin also subtracts operating expenses, interest and taxes, so it is always lower. This calculator works out gross margin per product or order.

Why can't the margin be 100% or more?

Margin is profit divided by price, and profit can only equal the price if the cost is zero. A margin over 100% would need a negative cost. Negative margins are possible, though, and mean you are selling below cost.

Related tools