Gross margin is the share of revenue you keep after paying the direct cost of the goods you sold. To calculate it, subtract cost of goods sold (COGS) from revenue and divide by revenue. Use the free gross margin calculator below to get your gross profit, gross margin and markup, and to see the price or cost you need to hit a target margin.
Gross Margin Calculator
Enter revenue and COGS for a single product (selling price and unit cost) or for a whole month, quarter or year.
Gross Margin Formula
Gross profit = Revenue − Cost of goods sold (COGS)
Gross margin % = Gross profit ÷ Revenue × 100
Example: a wholesaler has $100,000 of sales in a month and the goods it sold cost $62,000 to buy and land.
| Step | Calculation | Result |
|---|---|---|
| Gross profit | $100,000 − $62,000 | $38,000 |
| Gross margin | $38,000 ÷ $100,000 × 100 | 38% |
| Markup on cost | $38,000 ÷ $62,000 × 100 | 61.29% |
| Revenue needed for a 40% margin | $62,000 ÷ (1 − 0.40) | $103,333.33 |
How to Calculate Gross Margin, Step by Step
- Find net revenue for the period: sales minus returns, allowances and discounts.
- Add up COGS: the cost of the products you sold, plus inbound freight, import duties and fees and direct labor. For imports, your landed cost per unit is the right starting point.
- Subtract COGS from revenue to get gross profit.
- Divide gross profit by revenue and multiply by 100.
Your profit and loss statement shows both numbers: revenue at the top and COGS directly beneath it.
Average Gross Margin by Industry
Gross margins vary widely by industry. These averages for US public companies come from NYU Stern (Aswath Damodaran), data as of January 2026:
| Industry | Average gross margin |
|---|---|
| Food wholesalers | 15.44% |
| Auto parts | 15.84% |
| Trucking | 21.19% |
| Retail (grocery and food) | 26.31% |
| Furniture and home furnishings | 30.28% |
| Retail (distributors) | 30.57% |
| Building materials | 30.94% |
| Retail (general) | 33.18% |
| Retail (special lines) | 35.30% |
| Machinery | 37.47% |
| Apparel | 56.88% |
| All US companies | 37.76% |
Small and private businesses can differ from public-company averages, so treat these as a rough guide.
Gross Margin vs Operating Margin vs Net Margin
| Margin | Formula | What it shows |
|---|---|---|
| Gross margin | (Revenue − COGS) ÷ Revenue | How profitable your products are before overhead |
| Operating margin | Operating income ÷ Revenue | Profit after overhead such as rent, salaries and marketing |
| Net margin | Net income ÷ Revenue | What's left after every expense, including interest and taxes |
A healthy gross margin has to cover all your operating costs before you make a net profit. See how to improve net profit margin.
Gross Margin vs Markup
Gross margin and markup use the same gross profit but different bases, so markup is always the higher number.
| Markup | Equals gross margin |
|---|---|
| 25% | 20.00% |
| 50% | 33.33% |
| 66.67% | 40.00% |
| 100% | 50.00% |
| 150% | 60.00% |
To set a price from your cost, use the markup calculator.
How to Improve Gross Margin
- Raise prices where your product or service supports it, and review your price list whenever costs change.
- Lower unit costs by buying in larger volumes, negotiating with suppliers or consolidating shipments.
- Cut landed costs such as freight, duties and fees on imported goods.
- Shift your product mix toward higher-margin items.
- Reduce waste, returns and discounting that eat into revenue.
Frequently Asked Questions
How do you calculate gross margin?
Subtract cost of goods sold (COGS) from revenue to get gross profit, then divide gross profit by revenue and multiply by 100. With $100,000 of revenue and $62,000 of COGS, gross profit is $38,000 and gross margin is 38%.
What is the gross margin formula?
Gross margin % = (revenue − cost of goods sold) ÷ revenue × 100.
What is the difference between gross profit and gross margin?
Gross profit is a dollar amount: revenue minus COGS. Gross margin is that profit as a percentage of revenue, which lets you compare products or periods of different sizes.
What is a good gross margin?
It depends on the industry. NYU Stern's January 2026 data puts the average gross margin for US companies at about 38%, but food wholesalers average around 15% and apparel companies around 57%. Compare yourself with your own industry, not the overall average.
Is gross margin the same as markup?
No. Both use gross profit, but margin divides it by revenue and markup divides it by cost. A product that costs $60 and sells for $100 has a 40% gross margin and a 66.67% markup.
What costs are included in COGS?
The direct costs of the goods you sold: product or materials cost, inbound freight, import duties and customs fees, and direct labor. Rent, salaries for non-production staff and marketing are operating expenses, not COGS.
Free calculators: Markup calculator · Break-even calculator · Inventory turnover calculator · Line of credit calculator · Net 30 calculator · Invoice factoring calculator · Freight class calculator
Free templates: Price list template · Invoice tracker template · Purchase requisition template
Need cash to buy inventory in bulk and protect your margins? Drip Capital offers collateral-free working capital of up to $3M, with funds in 24–48 hours and 30–90 day repayment terms. Check your eligibility

