ILInvoiceLuxeAll toolsContact
home Home
Home / Tools / Profit Margin Calculator

Profit Margin Calculator

Free · No signup · Updated November 2026

Find your profit margin, markup and the selling price you need. Enter your cost and either a price or a target, and the numbers update as you type.

Selling price-
Profit-
Profit margin-
Markup-

Formula

Profit = Selling price - Cost
Margin % = Profit / Selling price x 100
Markup % = Profit / Cost x 100
Price from margin = Cost / (1 - Margin %)

What is profit margin and how do you calculate it?

Profit margin shows how many cents of every dollar of sales you keep as profit. The basic formula for gross profit margin is: (selling price − cost) ÷ selling price × 100. If you buy an item for $40 and sell it for $100, your gross profit is $60 and your gross margin is 60%. This free profit margin calculator does the math as you type and also gives you markup and the selling price you need to hit a target.

Gross margin, operating margin and net margin

This tool focuses on gross margin and markup, which is what you need to set a price. Always check that your gross margin is high enough to cover your overhead and still leave a profit.

Margin vs. markup: the mistake that costs small businesses money

Margin is profit as a share of the selling price. Markup is profit as a share of your cost. They describe the same dollars, but the percentages are different. A product that costs $40 and sells for $100 has a 60% margin and a 150% markup. If you wanted a 40% margin but only added a 40% markup, you would be underpricing: $40 × 1.40 = $56, which is only a 28.6% margin.

MarginMarkup neededPrice on a $40 cost
20%25%$50.00
25%33.3%$53.33
30%42.9%$57.14
40%66.7%$66.67
50%100%$80.00
60%150%$100.00

The conversion is simple: markup = margin ÷ (1 − margin) and margin = markup ÷ (1 + markup). Use the dropdown in the calculator to start from a target margin or a target markup.

How to set a selling price from your cost

When you know your cost and the margin you want, divide the cost by (1 minus the margin as a decimal). For a $40 cost and a 40% target margin: 40 ÷ 0.60 = $66.67. Your profit is $26.67, which is exactly 40% of the price. Here is a second example for a small online seller: a candle that costs $12 to make and ship, with a 45% target margin, should be priced at 12 ÷ 0.55 = $21.82.

Pricing checklist for sellers and freelancers

  1. Add every direct cost: materials, packaging, shipping you pay, labor and per-unit fees.
  2. Choose a target margin that also covers overhead and leaves real profit.
  3. Calculate the price with the formula above.
  4. Compare it with competitors and with what your customers are willing to pay.
  5. Re-check the margin after every discount, coupon or sale.

What is a good profit margin?

There is no single answer because it depends on the industry. Many retailers work with gross margins between 20% and 50%. Software and digital products often have much higher gross margins because the cost of each extra sale is low, while grocery and fuel retailers operate on thin margins and rely on volume. The best benchmark is your own business: calculate your fixed costs, estimate your sales volume and work backward to the margin you need to break even and grow.

Hidden costs that shrink your margin

Build these into your cost per item and the margin you see will match the margin you actually earn. Need to send a customer the final price? Create a professional quote or a PDF invoice for free.

Frequently asked questions

How do I calculate profit margin?

Subtract your cost from the selling price to get profit, then divide the profit by the selling price and multiply by 100. A $100 price with a $40 cost gives $60 profit and a 60% margin.

What is the difference between margin and markup?

Margin is profit divided by the selling price. Markup is profit divided by cost. A $40 cost sold at $100 is a 60% margin and a 150% markup.

How do I find the selling price for a target margin?

Divide your cost by (1 minus the margin as a decimal). With a $40 cost and a 40% margin target, the price is $40 / 0.60 = $66.67.

What is a good profit margin?

It depends on the industry. Many retailers work with 20-50% gross margin, while software and service businesses often aim higher. Compare against your own sector and your fixed costs.

How do I convert markup to margin?

Margin = markup / (1 + markup). A 100% markup is a 50% margin, and a 50% markup is a 33.3% margin.

Is gross margin the same as net margin?

No. Gross margin only subtracts the direct cost of the product. Net margin subtracts all expenses, interest and taxes, so it is always lower.

Need to send an invoice?

Create a professional PDF invoice in seconds. Free, no signup, works offline.

Create an invoice

More free tools