What Is Profit Margin?
Profit margin is the percentage of the selling price you keep as profit after subtracting the cost of the product or service you sold. If you sell for $100 and the cost is $60, your profit is $40 and your profit margin is 40% ($40 ÷ $100). Margin describes what share of revenue is profit. It is not the same as markup — the distinction matters and is covered further down the page.
Profit Margin Formula
Profit = Revenue − Cost
Profit Margin = Profit ÷ Revenue × 100
Cost % of Revenue = Cost ÷ Revenue × 100
For a single product with a clean cost and price, profit margin % + cost % = 100%. That identity breaks down once fees, discounts, or period-level expenses enter the picture, which is why the calculator shows the two figures separately.
Worked Example
Revenue $100, cost $60.
- Profit = $100 − $60 = $40
- Profit margin = $40 ÷ $100 × 100 = 40%
- Markup = $40 ÷ $60 × 100 = 66.67%
- Cost % of revenue = $60 ÷ $100 × 100 = 60%
The same sale is a 40% margin and a 66.67% markup. Both are correct — they describe the same $40 from two different bases.
Gross Margin Formula
Gross margin uses revenue minus cost of goods sold (COGS) — the direct cost of the product only, before operating expenses, interest, or taxes.
Gross Profit = Revenue − COGS
Gross Margin = Gross Profit ÷ Revenue × 100
If a product sells for $100 and its COGS is $60, gross margin is 40%. The gross profit margin formula and the gp margin formula are the same equation under different names — gross margin, gross profit margin, and gp margin all refer to the same calculation. If you see gp profit written somewhere, that is gross profit — the dollar figure the 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.
Margin vs Markup
This is the single most common source of pricing errors, and it is worth being precise.
- 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.
Because cost is a smaller number than price (assuming you are selling at a profit), markup is always the higher percentage for the same sale. A 50% markup on a $60 cost gives a $90 price, which is only a 33.33% margin. A 100% markup is a 50% margin. There is no way to make them equal — it is arithmetic, not convention.
To convert between them:
- Margin = Markup ÷ (1 + Markup)
- Markup = Margin ÷ (1 − Margin)
Percentages must be converted to decimals first. The Target markup → price mode handles this indirectly — it uses markup as the input and shows the resulting margin alongside.
Target Margin Pricing
Working backward from a target margin is one of the most useful things a margin calculator can do, and it is 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.
Maximum Cost for a Target Margin
The reverse question is just as useful for negotiating with suppliers: what is the highest cost I can pay and still hit a target margin at a given price? The formula is:
Maximum Cost = Price × (1 − Target Margin)
If the price is $100 and you want a 40% margin, the maximum cost is $100 × 0.60 = $60. The Max cost for margin mode shows this number directly.
Product Margin With Fees and Discounts
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.
- Payment processing — what Stripe, PayPal, or a card processor charges, 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.
Once you subtract all of those from net revenue (the price after any discount), you get the adjusted margin — the percentage the product actually 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 (fees) mode lets you enter each of those costs and see the adjusted margin.
Discount Impact
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.
The Discount impact mode isolates this effect so you can see exactly how much margin a promotion costs before you commit to it.
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 |
|---|---|
| Gross margin | Revenue − COGS |
| Operating margin | Gross profit − operating expenses (rent, salaries, marketing) |
| Net margin | Operating profit − interest − taxes |
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 the Business margins mode shows all three side by side — a single margin number in isolation rarely tells the whole story.
Limitations
Margin alone does not determine business profitability. A product can have a healthy gross margin and still lose money once operating expenses, financing costs, and taxes are layered on top. Margin also tells you nothing about sales volume — a 5% margin on a million units beats a 50% margin on ten. Use this calculator as a pricing and per-unit profitability tool; the business mode gives the period-level view, but it does not replace a full P&L or cash-flow analysis.