Profit Margin Calculator (Margin & Markup)

This free profit margin calculator finds gross profit, profit margin and markup from cost and selling price – or works out the selling price you need to hit a target margin or markup. Built for shop owners, resellers and freelancers.

Reviewed by [Reviewer name] · Updated October 2026 · Formula & sources below

Enter your details

$

Your result

Profit margin—
Selling price—
Gross profit—
Markup—

What is profit margin?

Profit margin is the share of each sale that you keep as profit. A 40% margin means 40 of every 100 in sales is profit before overheads. Markup is the same profit measured against cost instead of price. Business owners use a profit margin calculator to set prices, check whether a product is worth selling and compare suppliers.

Profit margin calculator formulas for margin and markup
Margin and markup formulas used by the profit margin calculator.

How to use this margin calculator

  1. Choose what you know: cost and price, cost and a target margin, or cost and a target markup.
  2. Enter the cost of the product or service (what you pay).
  3. Enter the second value. The profit margin calculator shows margin, markup, profit and selling price together.

Profit margin and markup formulas

Gross profit = price − cost
Margin % = (price − cost) ÷ price × 100
Markup % = (price − cost) ÷ cost × 100

Price from a target margin or markup

Price = cost ÷ (1 − margin)
Price = cost × (1 + markup)

Profit margin calculator example

You buy an item for 60 and sell it for 100:

  1. Profit = 100 − 60 = 40
  2. Margin = 40 ÷ 100 = 40%
  3. Markup = 40 ÷ 60 ≈ 66.67%
Profit margin calculator example: cost 60 and price 100 give a 40% margin
Worked example from the profit margin calculator.

To reach a 40% margin on a cost of 60: price = 60 ÷ (1 − 0.40) = 100. Adding a 40% markup instead gives only 84 – a 28.6% margin.

Selling price for a target margin

Target marginPrice on a cost of 60Markup
20%75.0025%
30%85.7142.86%
40%100.0066.67%
50%120.00100%
Profit margin calculator target margin price table
Selling prices needed for common target margins.

Margin vs markup at a glance

MarkupMargin
25%20%
50%33.33%
66.67%40%
100%50%
200%66.67%

Margin can never reach 100%, but markup can be any size. Mixing the two up is one of the most common pricing mistakes: a shop that adds a 30% markup thinking it earns a 30% margin actually earns about 23%.

Gross margin vs net margin

This calculator gives gross margin, which uses only the direct cost of the item. Net margin also subtracts rent, salaries, marketing, fees and tax. For example, a business with 100,000 in sales, 60,000 cost of goods and 25,000 of other expenses has a 40% gross margin but a 15% net margin.

How to improve your profit margin

  • Negotiate better supplier prices or buy in larger quantities.
  • Raise prices on products with strong demand or little competition.
  • Bundle low-margin items with higher-margin ones.
  • Cut returns, waste and payment fees.
  • Track margin per product, not just overall.

Use the ROI Calculator to judge whether a bigger investment, such as new equipment or advertising, pays for itself.

Frequently asked questions

What is the difference between margin and markup?

Margin is profit as a share of the selling price. Markup is profit as a share of the cost. The same sale gives a lower margin percentage than markup percentage.

How do I calculate profit margin?

Subtract cost from the selling price to get profit, divide by the selling price and multiply by 100. Cost 60 and price 100 gives a 40% margin.

How do I calculate the selling price from margin?

Divide the cost by (1 − margin). For a 30% margin on a cost of 70: 70 ÷ 0.70 = 100.

What is a good profit margin?

It varies by industry. Grocery retail often runs on thin margins, while software and services can be much higher. Compare with businesses like yours.

Is this gross or net margin?

Gross margin, using only the direct cost of the item. Net margin also subtracts overheads and taxes.

Can profit margin be more than 100%?

No. Margin is profit divided by price, so it is always below 100%. Markup can be above 100%.

How do I convert markup to margin?

Margin = markup ÷ (1 + markup). A 50% markup equals a 33.33% margin.

How do I convert margin to markup?

Markup = margin ÷ (1 − margin). A 40% margin equals a 66.67% markup.

Should I include shipping and fees in cost?

Yes. Include every direct cost of selling one unit – purchase price, shipping, packaging and platform fees – for an accurate margin.

What does a negative margin mean?

It means the selling price is below cost, so each sale loses money.

Sources