People type this into search every day: gross profit margin calculator.
Gross profit is what remains after the cost of the goods you sold. Gross profit margin is that leftover divided by revenue. IRS Publication 334 figures gross profit as net receipts minus cost of goods sold, then tests the result as a percentage of those receipts. The SEC’s beginners’ guide to financial statements walks the same stretch of an income statement: sales, then cost of sales, then gross profit. A one-page income-statement guide from the SEC names that remainder gross profit too.
The gross profit margin calculator is that ratio for one period you choose:
Gross profit = revenue − cost of goods sold
Gross profit margin = gross profit ÷ revenue
Net receipts already have returns and allowances taken off. Rent, salaries, and income tax stay out of this box. They belong on the net profit margin calculator, which the net profit post walks. A target margin used to set one unit’s price is the markup vs margin calculator.
These are labeled examples for a period you type in. They are not a tax return, and they are not business advice.
Fig 1
Receipts down to a margin
Cost of goods sold comes off before the percent
Gross profit is net receipts minus cost of goods sold. The margin divides that profit by the same receipts.
Example 1. The IRS shop check
Publication 334’s worked shop is the calculator’s published example.
- Revenue (net receipts): $300,000
- Cost of goods sold: $200,000
Gross profit = 300,000 − 200,000 = $100,000.00.
Margin = 100,000 ÷ 300,000 = 33.333…%, which the calculator prints as 33.3%.
Cost of goods sold is 200,000 ÷ 300,000 = 66.7% of receipts.
The booklet’s markup test on this shop is a 33 1/3% gross profit on sales. That fraction is the same ratio. The calculator rounds it to one decimal place.
Calculator result
Gross profit margin
- Revenue (net receipts)
- $300,000.00
- Cost of goods sold
- $200,000.00
33.3%
gross profit margin
- Gross profit
- $100,000.00
- Cost of goods sold
- $200,000.00
- COGS share of revenue
- 66.7%
Fig 2 · 1/2
The $300,000 of receipts
Publication 334 shop: $200,000 cost of goods sold
COGS
$200,000
Gross profit
$100,000
Cost of goods sold is $200,000, or 66.7% of receipts.
Gross profit is $100,000, a 33.3% margin.
A 33.3% margin on $300,000 is $100,000 of gross profit. The same percent on a much smaller receipt total would be a much smaller pile of cash. Example 6 is the small one. Example 4 is the one where a higher percent still produces less cash than a lower percent on a bigger book.
Example 2. What if cost of goods sold rises?
Keep receipts at $300,000. Change only the cost of goods sold. Profit moves by the same dollars, because profit = revenue − cost. The percent moves off a fixed denominator, so it does not fall by “10% of 33.3%.”
- COGS $160,000: profit 300,000 − 160,000 = $140,000.00. Margin 46.7%.
- COGS $180,000: profit $120,000.00. Margin 40%.
- COGS $200,000: profit $100,000.00. Margin 33.3%. This is example 1.
- COGS $220,000: profit $80,000.00. Margin 26.7%.
- COGS $240,000: profit $60,000.00. Margin 20%.
Fig 3 · 1/5
Margin as the cost line rises
Receipts stay at $300,000
Gross margin
- Margin
| Point | Margin |
|---|---|
| $160k | 46.7% |
| $180k | 40% |
| $200k | 33.3% |
| $220k | 26.7% |
| $240k | 20% |
At $160,000 of COGS the margin is 46.7%.
At the published $200,000 it is 33.3%. At $240,000 it is 20%.
A 10% rise in the cost line, from $200,000 to $220,000, removes $20,000 of gross profit. The printed margin goes from 33.3% to 26.7%. That is 6.6 percentage points on the printed figures, not 3.3 points. People sometimes scale the old margin by 10% and expect about 30%. The formula does not do that. Revenue is still $300,000, and the extra cost comes straight off the profit.
Example 3. A 15% margin on a large book
- Revenue: $500,000
- Cost of goods sold: $425,000
Gross profit = 500,000 − 425,000 = $75,000.00.
Margin = 75,000 ÷ 500,000 = 15%.
Cost of goods sold is 425,000 ÷ 500,000 = 85% of revenue.
Calculator result
Gross profit margin
- Revenue (net receipts)
- $500,000.00
- Cost of goods sold
- $425,000.00
15%
gross profit margin
- Gross profit
- $75,000.00
- Cost of goods sold
- $425,000.00
- COGS share of revenue
- 85%
Fifteen percent sounds thin next to the shop’s 33.3%. The gross profit is $75,000, against the shop’s $100,000. The percent is less than half. The cash is three quarters of the shop’s gross profit, because the receipt total is larger.
Example 4. A 65% margin that still produces less cash
- Revenue: $96,000
- Cost of goods sold: $33,600
Gross profit = 96,000 − 33,600 = $62,400.00.
Margin = 62,400 ÷ 96,000 = 65%.
Cost of goods sold is 33,600 ÷ 96,000 = 35% of revenue.
Put this next to example 3. The 65% book produces $62,400 of gross profit. The 15% book produces $75,000. The higher percent loses the cash comparison by 75,000 − 62,400 = $12,600.
Read the dollars after the percent. A high margin on a small receipt total can leave less gross profit than a low margin on a large one.
Example 5. Wholesale at 20%
- Revenue: $750,000
- Cost of goods sold: $600,000
Gross profit = 750,000 − 600,000 = $150,000.00.
Margin = 150,000 ÷ 750,000 = 20%.
Cost of goods sold is 80% of revenue.
This 20% margin produces more gross profit than the IRS shop’s 33.3% ($100,000) and more than the 15% book ($75,000). The gap versus the shop is 150,000 − 100,000 = $50,000 of extra gross profit, on two and a half times the receipts.
Fig 4 · 1/5
Five margins, same formula
Each bar is gross profit divided by that row's revenue
- Gross margin
| Category | Gross margin |
|---|---|
| $500k book | 15% |
| Wholesale | 20% |
| IRS shop | 33.3% |
| $96k book | 65% |
| Service | 100% |
The grocery-style book is 15%. The wholesale book is 20%.
The IRS shop is 33.3%. The smaller book is 65%. The service row is 100%.
Fig 5 · 1/2
Cost and gross profit
The stack is that period's revenue
- COGS
- Gross profit
| Category | COGS | Gross profit |
|---|---|---|
| $500k book | $425k | $75k |
| Wholesale | $600k | $150k |
| IRS shop | $200k | $100k |
Cost of goods sold is $425,000, $600,000, and $200,000.
Gross profit is $75,000, $150,000, and $100,000.
The wholesale stack is the tallest, and its profit slice is the largest, even though the percent in example 5 is 20%.
Example 6. A single month at 60%
- Revenue: $12,000
- Cost of goods sold: $4,800
Gross profit = 12,000 − 4,800 = $7,200.00.
Margin = 7,200 ÷ 12,000 = 60%.
Cost of goods sold is 40% of the month.
This is one month. If you repeat the same month twelve times, receipts are 12,000 × 12 = $144,000 and gross profit is 7,200 × 12 = $86,400. The margin stays 60%, because both lines scale. That repeat is arithmetic. It is not a forecast that every month will match this one.
Set the single month next to a thin year, so the period is obvious. Example 10 does that.
Example 7. A service period with no cost of goods sold
- Revenue: $80,000
- Cost of goods sold: $0
Gross profit = 80,000 − 0 = $80,000.00.
Margin = 80,000 ÷ 80,000 = 100%.
The cost share is 0%.
Calculator result
Gross profit margin
- Revenue (net receipts)
- $80,000.00
- Cost of goods sold
- $0.00
100%
gross profit margin
- Gross profit
- $80,000.00
- Cost of goods sold
- $0.00
- COGS share of revenue
- 0%
Publication 334 says most service businesses do not figure cost of goods sold. If that is how the books work, type 0. Gross profit then equals net receipts, and the margin prints as 100%.
Rent, software, and pay are still real costs. They are overhead on the net profit page, not cost of goods sold here. A 100% gross margin can sit on top of a much smaller net margin. The net profit post runs a consulting year with $0 of cost of goods sold and a 57.1% net margin, after overhead and a tax estimate.
Example 8. Dividing profit by cost instead of by revenue
On the IRS shop, gross profit is $100,000 and cost of goods sold is $200,000.
100,000 ÷ 200,000 = 50%.
That 50% is profit divided by cost. The markup vs margin post uses those two words for two different ratios. Markup is profit divided by cost. Margin is profit divided by the selling price, which here is the receipt total.
The gross margin is still 100,000 ÷ 300,000 = 33.3%.
If you price the next order off the 50% figure, you are using a markup. Publication 334’s own check divides by net receipts and compares that percent with the markup you meant to take. Using 50% in a sentence that says “margin” overstates the receipt share by 50 − 33.3 = 16.7 percentage points on the printed figures.
Example 9. Returns left inside the sales figure
The shop still has $200,000 of cost of goods sold. Gross receipts were $320,000, and $20,000 of that came back as returns. Net receipts are 320,000 − 20,000 = $300,000, which is example 1.
Leave the returns in the revenue box by mistake:
- Revenue typed: $320,000
- Cost of goods sold: $200,000
Gross profit = 320,000 − 200,000 = $120,000.00.
Margin = 120,000 ÷ 320,000 = 37.5%.
The cost share is 200,000 ÷ 320,000 = 62.5%.
The honest margin is 33.3%, and honest gross profit is $100,000. The slip adds 120,000 − 100,000 = $20,000 of fake gross profit, and it prints 37.5% instead of 33.3%. Take returns and allowances off before you type revenue. Publication 334’s net receipts already have them out.
Example 10. A 2% margin, and a loss
A thin year:
- Revenue: $100,000
- Cost of goods sold: $98,000
Gross profit = 100,000 − 98,000 = $2,000.00.
Margin = 2,000 ÷ 100,000 = 2%.
The cost share is 98%.
That $2,000 of gross profit is less than the single month in example 6, which produced $7,200. The receipt totals go the other way: $100,000 for the year, $12,000 for the month. The percent did not tell you which pile was larger. The subtraction did.
A period that sells below cost:
- Revenue: $40,000
- Cost of goods sold: $48,000
Gross profit = 40,000 − 48,000 = −$8,000.00.
Margin = −8,000 ÷ 40,000 = −20%.
The cost share is 48,000 ÷ 40,000 = 120% of revenue. The calculator labels this a negative gross margin. Something in the count is off, or the goods really did cost more than they sold for. Either way, the ratio is allowed to go below zero. It does not floor at 0%.
Ten gross-margin cases side by side
| Example | Revenue | COGS | Gross profit | Margin |
|---|---|---|---|---|
| 1. IRS shop | $300,000 | $200,000 | $100,000 | 33.3% |
| 2. Lower cost | $300,000 | $160,000 | $140,000 | 46.7% |
| 2. Cost up 10% | $300,000 | $220,000 | $80,000 | 26.7% |
| 2. Higher cost | $300,000 | $240,000 | $60,000 | 20% |
| 3. Large book | $500,000 | $425,000 | $75,000 | 15% |
| 4. Smaller book | $96,000 | $33,600 | $62,400 | 65% |
| 5. Wholesale | $750,000 | $600,000 | $150,000 | 20% |
| 6. One month | $12,000 | $4,800 | $7,200 | 60% |
| 7. Service, no COGS | $80,000 | $0 | $80,000 | 100% |
| 9. Returns left in | $320,000 | $200,000 | $120,000 | 37.5% |
| 10. Thin year | $100,000 | $98,000 | $2,000 | 2% |
| 10. Sold below cost | $40,000 | $48,000 | −$8,000 | −20% |
Example 8 is the same shop as example 1, read the wrong way: $100,000 ÷ $200,000 = 50% markup on cost, against a 33.3% margin on receipts. Example 9 is that shop with $20,000 of returns still sitting in the sales figure.
Open the gross profit margin calculator with the receipts and the cost of goods sold for one period. When you want the price on a single unit, use the markup vs margin calculator. When rent, pay, and tax have to come off too, use the net profit margin calculator.