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
- Gross margin subtracts only the direct cost of the product or service (materials, wholesale cost, labor to produce it).
- Operating margin also subtracts overhead such as rent, software, marketing and salaries.
- Net margin is what remains after everything, including interest and taxes. It is the number that really pays you.
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.
| Margin | Markup needed | Price 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
- Add every direct cost: materials, packaging, shipping you pay, labor and per-unit fees.
- Choose a target margin that also covers overhead and leaves real profit.
- Calculate the price with the formula above.
- Compare it with competitors and with what your customers are willing to pay.
- 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
- Payment processing fees charged on every card sale.
- Marketplace fees and ads if you sell on Etsy, Amazon, eBay or Shopify apps.
- Shipping, returns and refunds that you absorb.
- Discounts and coupons that cut the price while the cost stays the same.
- Sales tax is collected on top of your price and should not be counted as revenue.
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.