1. Home
  2. Guides
  3. Profit margin

How to Calculate Profit Margin (Formula and Examples)

The profit margin formula in plain English, with worked examples for sellers, gross, operating and net margin, real industry averages and a table of prices for any margin you want.

Pricing8 min readUpdated 31 October 2026By M Shahid

Short answer: To calculate profit margin, subtract your cost from the selling price, divide by the selling price and multiply by 100. The profit margin formula is (price − cost) ÷ price × 100. An item that costs $40.00 and sells for $60.00 makes $20.00 profit, a 33.33% profit margin.

What is profit margin?

Profit margin is the share of the selling price you keep as profit after paying your costs. It is a percentage. A 25% margin means that from every $100 of sales, $25 is profit and $75 paid your costs.

It answers a simple question: how much of each sale do I actually keep? That makes it the best number for comparing products, months or ways of selling, even when the prices are very different.

The profit margin formula

Profit = selling price − cost
Profit margin % = profit ÷ selling price × 100
Price for a target margin = cost ÷ (1 − margin ÷ 100)

The key detail is what you divide by. Margin always divides by the selling price. If you divide by the cost instead, you get markup, which is a different number.

How to calculate profit margin, step by step

  1. Add up everything the item cost you, including fees and postage.
  2. Take that cost away from the selling price. This is your profit.
  3. Divide the profit by the selling price.
  4. Multiply by 100 to get a percentage.

Example: you sell a phone case for $60.00 that cost you $40.00. Profit is $60.00 − $40.00 = $20.00. Then $20.00 ÷ $60.00 = 0.3333, so the profit margin is 33.33%.

Example: an eBay sale before and after fees

Marketplace fees are a cost too, and they are easy to forget. This US example uses eBay’s fee for most categories, 13.6% of the total sale plus $0.40 per order (checked on 31 October 2026).

StepAmount
Item price + shipping the buyer pays ($45.00 + $6.00)$51.00
What the item cost you$18.00
Postage you pay$6.00
eBay fees: 13.6% of $51.00 = $6.94, plus $0.40$7.34
Profit ($51.00 − $18.00 − $6.00 − $7.34)$19.66
Margin if you forget the fees ($27.00 ÷ $51.00)52.94%
Real margin after fees ($19.66 ÷ $51.00)38.55%

The fees took more than 14 points off the margin. Our eBay fee calculator works out the fees and profit for any sale.

What should you count as cost?

  • What you paid for the item, or the materials to make it.
  • Marketplace and payment fees, such as eBay, PayPal or Stripe.
  • Postage and packaging you pay.
  • Advertising for that sale, such as promoted listings.
  • Returns and refunds, if you have them often.

Do not count sales tax or VAT as income. It belongs to the tax office, not to you.

Gross, operating and net profit margin

All three use the same formula. They differ in which costs come off first:

Gross margin = (sales − cost of goods sold) ÷ sales × 100
Operating margin = operating profit ÷ sales × 100Operating profit also takes off running costs such as fees, ads, software and wages
Net margin = net profit ÷ sales × 100Net profit takes off everything, including interest and income tax

One example month for a small online shop:

AmountMargin
Sales$10,000
Gross profit (after $5,200 cost of goods)$4,80048%
Operating profit (after $2,900 of fees, ads and tools)$1,90019%
Net profit (after $400 of interest and tax)$1,50015%

When you compare your margin with someone else’s, check that you both mean the same one.

What is contribution margin?

Contribution margin is the selling price minus only the variable costs, the ones that rise with each sale. It shows how much each sale adds towards fixed costs such as rent and software.

An item that sells for $60.00 with $45.00 of variable costs (the item, fees and postage) has a $15.00 contribution, a 25% contribution margin.

What is a good profit margin?

There is no single good number. A good margin pays every cost, pays you for your time and leaves money to grow. For a sense of scale, these are average margins for US companies by industry (data as of January 2026):

IndustryGross marginOperating marginNet margin
Apparel56.88%9.11%3.85%
Shoes43.88%9.03%6.27%
Household products51.04%18.62%11.68%
Restaurants and dining32.24%15.79%9.37%
Retail: special lines35.30%7.73%5.19%
Retail: general33.18%6.80%5.61%
Retail: grocery and food26.31%2.29%1.32%
Business and consumer services33.38%12.27%7.03%
Software71.72%32.98%25.49%
All US industries37.76%12.82%9.74%

Source: Margins by sector (US), Aswath Damodaran, NYU Stern, data as of January 2026, read on 31 October 2026. Operating margin is the pre-tax unadjusted figure. These are averages for large US public companies, so a small seller’s numbers can differ a lot.

Two things stand out. For the industries closest to online sellers (apparel, shoes, household products and retail), gross margins run from about 26% to 57%, but net margins are only about 1% to 12%. Most gross profit goes on running costs, so a healthy gross margin does not mean a healthy business.

How to price for the margin you want

Work backwards: price = cost ÷ (1 − margin). To add a 40% margin to a $40.00 cost, charge $40.00 ÷ 0.60 = $66.67. Adding 40% to the cost gives $56.00, which is only a 28.57% margin.

This table answers “what is a 20%, 30% or 75% margin” for a $25.00 cost, with the markup each one needs:

Margin you wantPrice for a $25.00 costMarkup neededMultiply cost by (rounded)
10%$27.7811.11%× 1.11
20%$31.2525%× 1.25
25%$33.3333.33%× 1.33
30%$35.7142.86%× 1.43
40%$41.6766.67%× 1.67
50%$50.00100%× 2
60%$62.50150%× 2.5
75%$100.00300%× 4

Markup is the exact figure. Worked out on the price rounded to the cent, it can differ by a few hundredths, as our calculator shows.

A 50% margin means charging double your cost, and a 75% margin means four times your cost. The “Cost + margin” mode of our profit margin calculator does this for any cost.

What is a 20% or 30% margin on $100?

  • If you sell for $100: a 20% margin is $20 of profit, so the item can cost $80. A 30% margin is $30 of profit, so it can cost $70.
  • If the item costs $100: for a 20% margin sell at $100 ÷ 0.80 = $125.00. For 30%, sell at $100 ÷ 0.70 = $142.86.

Adding 20% to a $100 cost and charging $120 gives a 20% markup, but the margin is only 16.67%.

How to find the most you can pay for an item

If you know your selling price, work out the highest cost that still gives your margin: cost = price × (1 − margin). To sell at $80.00 with a 35% margin, pay no more than $80.00 × 0.65 = $52.00, including fees and postage. This helps when you buy stock to resell.

Profit margin vs markup

Markup divides profit by the cost. Margin divides it by the selling price. The same $20.00 profit on a $40.00 cost is a 50% markup but a 33.33% margin. Margin can never reach 100%, but markup can go far above it. Our markup calculator shows both side by side.

How to calculate profit margin in Excel or Google Sheets

Put the selling price in A2 and the cost in B2. In C2, type =(A2-B2)/A2 and format the cell as a percentage. For a $60 price and a $40 cost, it shows 33.33%. To find the price for a target margin, put the cost in A2 and the margin in B2 (such as 40%), then type =A2/(1-B2). The same formulas work in both programs.

How to increase your profit margin

Margin grows in only two ways: a higher price or lower costs. Small changes add up quickly.

  • Raise prices a little. On the $60.00 case that cost $40.00, a $5.00 rise lifts the margin from 33.33% to 38.46%.
  • Buy for less. Cutting the cost from $40.00 to $36.00 at the same $60.00 price gives a 40% margin.
  • Cut fees. Compare card and marketplace fees with our PayPal fee calculator and Stripe and Square fee calculator.
  • Charge shipping that covers postage and packaging. Free shipping still costs you money.
  • Fix thin-margin products. Sort your products by margin. Reprice or drop the ones at the bottom, since they often take as much work as the best sellers.

Common mistakes

  • Dividing by the cost. That gives markup, not margin.
  • Adding the margin % to the cost. A 40% margin needs a price of cost ÷ 0.60, not cost × 1.40.
  • Leaving out fees and postage. Your margin will look higher than the money you keep.
  • Counting sales tax or VAT as sales. It is not yours.
  • Comparing gross with net. Compare like with like.

This guide explains how the numbers work. It is not tax or financial advice. See how we calculate for the rounding our calculators use.

Frequently asked questions

It depends on what you sell. In our table of US industries, average net margins run from about 1% to 25%, and retail net margins from about 1% to 6% (NYU Stern, January 2026). A good margin for you covers every cost, pays for your time and leaves something to reinvest.

For gross margin, 30% is below the US average of 37.76% but close to many retail sectors. For net margin, 30% is very high: the US average is 9.74%. So always ask which margin you mean before you judge it, and compare it with your own costs and goals.

It can be negative: if a $30.00 item sells for $25.00, the margin is −20%, which means you lose money on each sale. It cannot reach 100%, because that would mean the item cost nothing. Markup, which divides by the cost, can go above 100%.

Not always. Profit margin divides profit by the selling price. Some people say “profit percentage” when they divide by the cost, which is really markup. A $20.00 profit on a $40.00 cost is a 33.33% margin but a 50% return on cost. Check which one someone means.

Use the price and cost of one item. Subtract the cost of one unit, including its share of fees and postage, from its selling price, then divide by the selling price. The margin per unit equals the margin on the whole order, as long as every unit has the same price and cost.

M ShahidFounder of PlainSeller. ACCA qualified. University of Edinburgh.

M Shahid is a founder of PlainSeller, is ACCA qualified and studied at the University of Edinburgh. M Shahid writes the PlainSeller guides on pricing, fees and invoicing. About the author

This guide is general information to help you plan. It is not tax, legal or financial advice. Check important numbers with a qualified professional or an official source.