What Is Profit Margin?
Profit margin is the percentage of every sale that stays with you as profit, once the cost of the thing you sold has been paid for. It is the single number that answers the question every seller asks: out of every dollar that comes in, how many cents do I actually keep?
If you sell a product for $100 and it costs you $60 to buy or make, you keep $40. That $40 is your gross profit, and as a share of the selling price it is a 40% profit margin. This profit margin calculator is built around that simple relationship — cost, price, profit, margin — and then extends it to cover everything else that eats into what you keep: shipping, marketplace fees, payment processing, ads, returns, and business-level expenses like rent, salaries, interest, and taxes.
Profit Margin Formula
The core profit margin formula is straightforward:
Profit Margin = (Selling Price − Cost) ÷ Selling Price × 100
Equivalently, you can think of it as Gross Profit ÷ Revenue × 100, which is the same thing written differently. Both forms show up in textbooks; they always give the same answer, and this calculator displays the result either way.
Some people prefer to work with margin cost — the cost implied by a target margin on a given price. Rearranging the formula gives Cost = Price × (1 − Margin). If you want a 40% margin on a $100 sale, your cost has to stay at or below $60. That is what the "Max cost for margin" mode of this calculator is for: it tells you the ceiling your cost can hit before the margin you want stops being achievable.
Margin vs Markup — the Distinction That Trips Everyone Up
Margin and markup are the two most confused numbers in pricing, and mixing them up is the fastest way to underprice a product and not notice until the end of the quarter.
- Margin = profit ÷ selling price. A $40 profit on a $100 sale is a 40% margin.
- Markup = profit ÷ cost. The same $40 profit on a $60 cost is a 66.67% markup.
Same transaction, two different percentages. A 50% markup on cost is only a 33.33% margin on price — a fact that has quietly wrecked the pricing of many otherwise well-run businesses. This calculator always shows both numbers side by side so you can see exactly how they relate for your specific cost and price, and the Target markup → price mode exists so you can work from either end without having to do the algebra by hand.
Gross Margin Formula and Gross Profit Margin Formula
When people say "gross margin" or "gross profit margin," they mean the same thing: profit calculated using only the direct cost of goods sold (COGS), before subtracting operating expenses. The gross margin formula is:
Gross Margin = (Revenue − COGS) ÷ Revenue × 100
The gross profit margin formula is identical — "gross margin" and "gross profit margin" are interchangeable terms, and the gp margin formula is just a shorthand some people use for the same equation. If you see "gp profit" written somewhere, that is gross profit — revenue minus COGS — the dollar figure that the margin percentage describes.
What does not belong in gross margin: rent, salaries, marketing, interest, taxes. Those are operating and financing costs, and they belong in the business margin calculations further down this page. Mixing them in produces a number that looks like gross margin but is not one, and it makes comparisons across products or periods meaningless.
How to Calculate Gross Margin
Figuring gross margin from a single product is the easiest case:
- Start with the selling price (revenue per unit).
- Subtract the cost of goods sold per unit — what you paid for the item itself, landed at your door.
- Divide the result by the selling price.
- Multiply by 100 to express it as a percentage.
For a whole business or product line, do the same thing with totals: total revenue minus total COGS, divided by total revenue. This is figuring gross margin at scale, and it is the calculation that tells you whether your core product economics are healthy before any operating costs are layered on top.
Figuring profit margin at the business level is subtly different: once you subtract operating expenses, interest, and taxes from gross profit, you get net profit, and dividing that by revenue gives net margin. That is the number that shows up at the bottom of an income statement, and it is the number that ultimately determines whether the business is sustainable.
Gross vs Operating vs Net Margin
These three margins stack on top of each other, each subtracting a broader set of costs:
| Margin | What it subtracts | What it tells you |
|---|---|---|
| Gross margin | Revenue − COGS | Are the core product economics viable? |
| Operating margin | Gross profit − operating expenses (rent, salaries, marketing) | Does the business cover its day-to-day costs? |
| Net margin | Operating profit − interest − taxes | What actually ends up as profit? |
A company with a healthy 50% gross margin can still have a negative net margin if its operating expenses are out of control. Conversely, a business with a modest 20% gross margin can be very profitable if it runs lean. That is why this business margin calculator mode shows all three side by side — a single margin number in isolation rarely tells the whole story.
How to Find the Right Selling Price for a Target Margin
Working backward from a target margin is one of the most useful things a margin calculator can do, and it is surprisingly easy to get wrong by hand. The formula is:
Selling Price = Cost ÷ (1 − Target Margin)
If your cost is $60 and you want a 40% margin, the price is $60 ÷ 0.60 = $100. Note that you do not simply add 40% to cost — that would give $84, which is only a 28.57% margin on the resulting price. This is exactly the trap the Target margin → price mode exists to avoid.
The same logic works for a price margin calculator workflow where you already know the price and want to know the implied margin, or for a cost margin calculator workflow where you know the margin and want to find the maximum cost you can afford. All three directions are supported here.
Product Margin Calculator: Fees, Shipping, Ads, and Returns
Real products rarely sell at a clean price with no other costs attached. A product margin calculator has to account for everything that comes off the top before the seller sees any money:
- Marketplace fee — what Amazon, eBay, Etsy, or a similar platform takes, often a percentage plus a small flat fee per order.
- Payment processing — what Stripe, PayPal, or a card processor charges to move the money, again often percentage plus flat.
- Shipping and packaging — the physical cost of getting the item to the buyer.
- Advertising / customer acquisition cost — the per-unit share of ad spend it took to make the sale happen.
- Returns and refunds — the percentage of orders that come back, which is a real cost even when the item is restocked.
Once you subtract all of those from net revenue (the price after any discount), you get adjusted margin — the percentage that actually reflects what the product earns after the real-world costs of selling it. For many sellers this is 10 to 20 points lower than the headline gross margin, and it is the number that should drive pricing decisions. The product margin mode of this calculator lets you enter every one of those costs and see the adjusted margin instantly.
Discount Impact: Why Small Discounts Hurt More Than They Look
A 10% discount does not reduce margin by 10% — it reduces it by much more, because the cost stays the same while the revenue drops. On a $100 product with a $60 cost (40% margin), a 10% discount brings revenue to $90, profit to $30, and margin to 33.33%. That is a 6.67-point drop in margin from a 10% discount. On a thinner-margin product, the same discount can wipe out the profit entirely.
This is why this calculator has a dedicated Discount impact mode: it isolates the effect of a discount from all other costs, so you can see exactly how much margin you are giving away before you commit to a promotion.
Common Margin Calculation Mistakes
- Confusing margin and markup. They are two different percentages on the same transaction. A 50% markup is a 33.33% margin, not 50%.
- Adding margin to cost instead of dividing. Price is cost ÷ (1 − margin), not cost × (1 + margin). The two give very different answers.
- Ignoring fees and shipping. A 40% gross margin can easily become 15% after marketplace, payment, shipping, and ad costs.
- Mixing gross and net. Gross margin uses only COGS. If you include rent and salaries, you are calculating operating or net margin, not gross.
- Forgetting that discounts cut both revenue and margin. A discount is not just a lower price — it is a lower margin on the same cost.
- Comparing margins across businesses without context. A 20% margin can be excellent in grocery and terrible in software; industry context always matters.
What Counts as a Good Margin?
There is no universal answer, because "good" depends on the industry, the business model, and the volume. As a rough guide for orientation only:
- Grocery and high-volume retail: single-digit to low-double-digit gross margins are normal.
- General e-commerce and consumer goods: 20% to 50% gross margin is common.
- Software, digital products, and services: 70% to 90% gross margin is typical, because there is almost no per-unit cost.
- Luxury and specialty: 60%+ gross margin is often expected.
The more useful question is not "is my margin good?" but "is my margin improving, and is it high enough to cover my operating costs and still leave a profit?" A margin that looks fine in isolation can still be too thin for the business model it sits inside.
Margin, Markup, and the Earning Margin Concept
Some people describe margin as the earning margin — the share of revenue the business actually earns as profit. That framing is fine as long as it is applied consistently: earnings divided by revenue, not earnings divided by cost. Once cost enters the denominator, you have switched to markup, and the number changes.
What matters is consistency. Pick one definition, apply it across every product and every period, and compare like with like. Margin, markup, gross, operating, and net are all legitimate ways to measure profitability — but only if you know which one you are looking at.