Gross margin formula
Gross margin is gross profit as a percentage of net sales, where gross profit is net sales minus the cost of goods sold.[1]
Use net sales: revenue after returns, allowances and discounts. For a business that buys goods to resell, cost of goods sold is beginning inventory plus purchases and freight-in, minus ending inventory; a manufacturer adds direct labor and production overhead.[2][3] General expenses such as office rent, salaries outside production and advertising are not part of COGS.
Gross profit vs gross margin
Gross profit is a dollar amount; gross margin is that amount as a share of revenue. In the example above, line A earns the most gross profit ($42,000) but has the lowest gross margin (35.0%), while line C earns $10,500 at 70.0%.
| Line | Revenue | COGS | Gross profit | Gross margin |
|---|---|---|---|---|
| Line A | $120,000 | $78,000 | $42,000 | 35.0% |
| Line B | $45,000 | $18,000 | $27,000 | 60.0% |
| Line C | $15,000 | $4,500 | $10,500 | 70.0% |
| Blended | $180,000 | $100,500 | $79,500 | 44.2% |
A shift in sales mix changes the blended margin even if no price or cost changes. If line A grows faster than the others, the business margin falls; this is a common reason a store's margin drifts without any single product getting worse.
Gross margin by kind of retail business
Gross margins vary widely by kind of business: in the Census Bureau's Annual Retail Trade Survey for 2022, the range ran from 24.3% to 53.6%.[4]
| Kind of business | NAICS | Gross margin |
|---|---|---|
| Total retail | 44–45 | 31.1% |
| Furniture and home furnishings stores | 442 | 51.0% |
| Electronics and appliance stores | 443 | 29.4% |
| Building materials and supplies dealers | 4441 | 36.0% |
| Grocery stores | 4451 | 28.0% |
| Beer, wine and liquor stores | 4453 | 31.1% |
| Health and personal care stores | 446 | 32.9% |
| Pharmacies and drug stores | 44611 | 28.0% |
| Automotive parts, accessories and tire stores | 4413 | 48.1% |
| Clothing stores | 4481 | 50.6% |
| Shoe stores | 4482 | 50.9% |
| Sporting goods, hobby and musical instrument stores | 4511 | 44.6% |
| Department stores | 4522 | 42.0% |
| Warehouse clubs and supercenters | 452311 | 24.3% |
| Miscellaneous store retailers | 453 | 53.6% |
| Electronic shopping and mail-order houses | 4541 | 39.6% |
The survey's gross margin is sales minus cost of goods sold, measured across all firms of each kind, so it is a benchmark for the category rather than a target for any one shop.
How to raise gross margin
- Price. A small increase goes straight to gross profit; the price increase calculator shows how many sales you could lose and still come out ahead.
- Unit cost. Volume discounts, cheaper inbound freight and less waste all lower COGS.
- Mix. Promote the lines with the highest margins; the blended margin follows.
- Discounts and returns. They reduce net sales without reducing COGS. Check the effect with the discount calculator.
Gross margin is only the first line of profitability. To see what is left after operating costs, interest and tax, continue to the net profit margin calculator; for per-unit pricing use the margin calculator.
Frequently asked questions
How do you calculate gross margin?
Subtract cost of goods sold from revenue, divide by revenue and multiply by 100. $50,000 of sales with $31,000 of COGS gives a 38% gross margin.
What is the difference between gross profit and gross margin?
Gross profit is the dollar figure (revenue minus COGS). Gross margin is that figure divided by revenue, expressed as a percentage.
Is gross margin the same as markup?
No. Gross margin divides gross profit by revenue; markup divides it by cost. A 38% gross margin equals a 61.3% markup.
What is a good gross margin?
It depends on the industry, because each industry has different operating costs to pay from gross profit. Compare with the retail table above or with businesses like yours.
Does gross margin include shipping?
Freight to bring goods in is part of cost of goods sold. Shipping to customers is usually a selling expense, though some sellers include it in COGS; be consistent from period to period.
Sources
- Principles of Accounting, Volume 1: Financial Accounting, Chapter 6 key terms (gross margin, gross profit margin ratio)
- Publication 334, Tax Guide for Small Business (chapters 6 and 7: cost of goods sold and gross profit)
- About Form 1125-A, Cost of Goods Sold
- Annual Retail Trade Survey: 2022 (benchmarked), gross margin as a percentage of sales by kind of business