Skip to content
Calculator Collection
← All articles
ecommerceJanuary 23, 2026

Profit Margin: How to Calculate the Percentage of Each Sale You Keep

Two shops can sell the same product at the same price and yet one thrives while the other quietly bleeds cash. The difference is almost always margin — the slice of each sale that survives after you pay for the goods you sold. Profit margin turns raw dollars into a percentage you can compare across products, seasons, and competitors. It tells you whether a price is healthy, whether a discount is survivable, and whether a "best-selling" item is actually worth the shelf space. This guide shows you how to calculate gross profit margin and use it to make sharper pricing decisions.

What Profit Margin Is and Why It Matters

Gross profit margin is the percentage of each sales dollar that remains after you subtract the direct cost of the product. If you sell an item for $50 and it cost you $30, you keep $20 — and that $20 expressed as a share of the price is your margin.

The reason margin matters more than raw profit is comparability. A $20 profit sounds identical whether the item sells for $25 or $500, but those are wildly different businesses. Expressed as a percentage, the first is an 80% margin and the second a 4% margin. The percentage instantly tells you how much pricing cushion you have to absorb discounts, returns, rising supplier costs, or a slow month.

Margin is also the figure investors, lenders, and category managers reach for first. It reveals pricing power and operational discipline in a single number, and it lets you benchmark against industry norms regardless of how big or small your sales volume is.

How to Calculate Profit Margin

The formula for gross profit margin is:

Profit Margin (%) = ((Selling Price − Cost) ÷ Selling Price) × 100

The numerator, selling price minus cost, is your gross profit per unit — the dollars you actually keep. Dividing that by the selling price restates it as a fraction of the sale, and multiplying by 100 turns it into a percentage. The key detail is the denominator: margin always divides by the selling price, not the cost. Dividing by cost instead gives you markup, a different (and usually larger) number that people frequently confuse with margin.

Worked example. Suppose you run an online store selling a stainless-steel water bottle.

  • Cost to you (landed cost including supplier price and shipping): $12
  • Selling price to the customer: $30
First, find the gross profit per unit:

1. $30 − $12 = $18 kept per bottle

Then divide by the selling price and convert to a percentage:

2. $18 ÷ $30 = 0.60

3. 0.60 × 100 = 60% profit margin

So 60 cents of every dollar a customer spends on that bottle stays with your business to cover overhead and, eventually, profit. You can run any price-and-cost combination instantly with the Profit Margin calculator by entering your cost and selling price.

Margin vs. Markup, and Using Margin to Price

The single biggest source of confusion is mixing up margin and markup. Markup measures profit against cost; margin measures it against price. In the example above, the markup is $18 ÷ $12 = 150%, even though the margin is 60%. Both describe the same transaction, so always be clear which one a supplier, marketplace, or spreadsheet is quoting.

Margin really earns its keep when you work pricing backward. If you want a target margin and know your cost, rearrange the formula: Selling Price = Cost ÷ (1 − target margin). Wanting a 60% margin on that $12 bottle gives $12 ÷ (1 − 0.60) = $12 ÷ 0.40 = $30 — exactly the price we used. This lets you set prices that hit a margin goal instead of guessing and checking.

Margin also frames discount decisions. On a 60% margin you can afford a generous promotion; on a 15% margin a "20% off" sale would erase your profit entirely and then some. Knowing your margin tells you precisely how much room you have before a discount turns a sale into a loss.

Common Mistakes and How to Avoid Them

Confusing margin with markup. This is the classic error. A "50% markup" and a "50% margin" are not the same price. Always check which base — cost or price — the percentage uses.

Forgetting hidden costs of goods. Your true cost is more than the supplier invoice. Inbound shipping, import duties, payment-processing fees, and packaging all reduce margin. Leaving them out makes your margin look healthier than it is.

Confusing gross margin with net margin. Gross margin only accounts for the direct cost of the product. It does not include rent, salaries, advertising, or software. A strong gross margin can still leave you unprofitable overall if operating costs are high, so track net margin too.

Pricing on a fixed dollar markup. Adding a flat "$10 on everything" produces inconsistent margins — great on cheap items, terrible on expensive ones. Price to a target margin percentage instead.

Ignoring returns and discounts. Your realized margin across a month is lower than the sticker margin once refunds and promotions are factored in. Review actual margin periodically, not just the theoretical figure.

Conclusion

Profit margin reduces the health of a sale to a single, comparable percentage: the share of each dollar you keep after paying for the product itself. By subtracting cost from price and dividing by price, you get a number that lets you benchmark products, set prices that hit a goal, and judge instantly whether a discount is safe. Keep it distinct from markup, fold every direct cost into your calculation, and remember that a strong gross margin is the foundation profit is built on — not the final word on whether the whole business is profitable.

Key Takeaways

Know the formula: Profit Margin = ((Selling Price − Cost) ÷ Selling Price) × 100, always dividing by price, not cost

Margin is not markup: Markup divides profit by cost and reads higher — be clear which one any quote refers to

Price backward to a target: Use Selling Price = Cost ÷ (1 − target margin) and the Profit Margin calculator to hit a margin goal instead of guessing

Count every cost: Fold shipping, duties, and fees into cost, and track net margin separately so overhead doesn't quietly erase your gross profit

Looking for a calculator?

Calculator Collection has 4,000+ free calculators. Browse all calculators →