Quick summary: Gross margin is gross profit divided by revenue: (revenue − cost of goods sold) ÷ revenue × 100. A business with $120,000 in sales and $72,000 in COGS has $48,000 of gross profit and a 40% gross margin. This gross margin calculator also finds the price you need for a target margin and compares your result with industry figures.
Free tool, no sign-up, and your numbers stay in your browser. Industry figures are from NYU Stern’s January 2026 data. Last reviewed November 23, 2026.
Jump to a section (14)
- How do you use the gross margin calculator?
- What is the gross margin formula?
- What do gross margin examples look like by business type?
- What counts as cost of goods sold?
- How do gross margin, operating margin, and net margin compare?
- How do gross margin and markup compare?
- What is a good gross margin?
- How do you improve gross margin?
- Where do these numbers and rules come from?
- How do you calculate a 30% gross margin?
- What is a 30% margin on $100?
- What would I tell a friend about the gross margin calculator?
- Frequently asked questions
- Related guides and tools
Do this today
Enter last year's sales and cost of goods sold to find your gross margin, and compare it to your goal.
Start small. Your first goal is $500 a month. That is where I started. — Trent
Get the free Startup Kit
Five free files: a startup checklist (PDF), a one-page business plan (Word and PDF), a full plan template (Word), a financials workbook (Excel), and a startup cost worksheet (Excel). Enter your email and the downloads open on the next page. No credit card.
How do you use the gross margin calculator?
- Pick what to calculate: gross margin from totals (revenue and COGS for a month or year), gross margin for one product (price and unit cost), the price needed for a target margin, or the most you can pay for a product at a target margin.
- Enter your numbers. Use net sales (after returns and discounts) and only direct costs in COGS.
- Optional: choose an industry to see how your margin compares.
- Open “Show the math” to see each step.
What is the gross margin formula?
- Gross profit = Revenue − Cost of goods sold
- Gross margin % = Gross profit ÷ Revenue × 100
- Price for a target margin = Cost ÷ (1 − target margin)
- Maximum cost for a target margin = Price × (1 − target margin)
Example: a candle sells for $24 and costs $9 to make and package. Gross profit is $15, and gross margin is $15 ÷ $24 = 62.5%. To hit a 70% margin at the same cost, the price would need to be $9 ÷ 0.30 = $30.
What do gross margin examples look like by business type?
| Business | Revenue or price | COGS or unit cost | Gross margin |
|---|---|---|---|
| Etsy candle seller (per candle) | $24 | $9 (wax, jar, wick, label, box) | 62.5% |
| Coffee shop (per latte) | $5.50 | $1.40 (coffee, milk, cup, lid) | 74.5% |
| Boutique (per dress) | $68 | $30 (wholesale cost + freight) | 55.9% |
| Landscaping company (per year) | $300,000 | $180,000 (crew wages, materials, fuel) | 40.0% |
| Food truck (per month) | $40,000 | $13,000 (food, packaging) | 67.5% |
These are illustrations of the math, not industry averages. A high gross margin on one item doesn’t mean the business is profitable: rent, wages, marketing and other overhead come out of gross profit next.
What counts as cost of goods sold?
Include costs that rise and fall directly with what you sell: product purchases or raw materials, packaging, freight-in, and direct labor for making the product or delivering the service. Leave out overhead such as rent, office staff, marketing, software and interest. Those belong in operating expenses. For the inventory method of building COGS from beginning and ending inventory, use the gross profit calculator, and track stock with the free inventory template.

How do gross margin, operating margin, and net margin compare?
| Margin | Formula | What it tells you |
|---|---|---|
| Gross margin | (Revenue − COGS) ÷ revenue | How profitable your products or services are before overhead |
| Operating margin | (Gross profit − operating expenses) ÷ revenue | How profitable the business is from operations |
| Net margin | Net income ÷ revenue | What’s left after every expense, interest and taxes |
Gross margin is always the highest of the three. Calculate the others with the profit margin calculator.
How do gross margin and markup compare?
Both use the same gross profit, but margin divides it by price and markup divides it by cost. A 40% gross margin equals a 66.7% markup; a 50% markup is only a 33.3% margin. Confusing them is one of the most common pricing mistakes. Convert between them with the markup vs margin converter or price from cost with the markup calculator.
| Gross margin | Equivalent markup | Price for a $10 cost |
|---|---|---|
| 20% | 25.0% | $12.50 |
| 30% | 42.9% | $14.29 |
| 40% | 66.7% | $16.67 |
| 50% | 100.0% | $20.00 |
| 60% | 150.0% | $25.00 |
| 70% | 233.3% | $33.33 |
| 80% | 400.0% | $50.00 |
What is a good gross margin?
It depends on your industry and your overhead. The calculator’s comparison list uses NYU Stern professor Aswath Damodaran’s Margins by Sector (U.S.) data from January 2026, which ranges from about 15% for engineering and construction and food wholesalers, to about 32% for restaurants, 57% for apparel and 72% for system and application software. Those are large public companies; small businesses usually need a higher gross margin to cover overhead on fewer sales.
A better test is your own math: your gross profit must cover all operating expenses plus the profit you want. If overhead is $60,000 a year and you want $40,000 of profit on $250,000 of sales, you need $100,000 of gross profit, a 40% gross margin. Check your break-even point with the break-even calculator.
How do you improve gross margin?
- Raise prices on products where you deliver more value than competitors, or add premium versions.
- Cut unit costs by negotiating with suppliers, buying in larger quantities, or changing materials or packaging.
- Reduce waste and returns, which quietly raise COGS.
- Shift your mix toward higher-margin products and services, and stop pushing low-margin ones.
- Bundle low-margin items with high-margin add-ons.
- Price for marketplace fees. Selling on Etsy or Amazon? Their fees come out of what’s left after COGS, so build them into your price; see Etsy fees.
Where do these numbers and rules come from?
When I check a number or a rule about the gross margin calculator, I look it up on IRS Publication 334, Tax Guide for Small Business, SBA guide to marketing and sales, and SBA guide to calculating startup costs. Those are the sources that matter for the gross margin calculator when a blog and an official page disagree. Use the official page.
How do you calculate a 30% gross margin?
Divide your cost by 0.70. A $10 cost needs a $14.29 price for a 30% gross margin: gross profit is $4.29, and $4.29 ÷ $14.29 = 30%. In a spreadsheet, use =cost/(1-0.30).
Adding 30% to the cost ($13) gives only a 23% margin. The markup table above shows the markup that matches each margin.
What is a 30% margin on $100?
If $100 is the selling price, a 30% margin means $30 of gross profit and $70 of cost. If $100 is your cost and you want a 30% margin, the price is $142.86, which leaves $42.86 of gross profit.
Always say which number the percentage is based on. Margin is based on the price; markup is based on the cost.
What would I tell a friend about the gross margin calculator?
I’ve started over 20 different businesses, and here is the short version on the gross margin calculator. Know your gross margin on every product or job type, not just on the business as a whole. The average can hide the one offer that is quietly losing money.
— Trent Powell
Read next: the profit margin calculator, the markup calculator, and markup vs. margin, or go back to all calculators and tools.
Frequently asked questions
Should I calculate gross margin on each product or only on the whole business?
Do both. The overall margin tells you if the business works. The per-product margin tells you which items are carrying the rest. I have seen shops that looked healthy in total until one popular item, once fees and waste were included, was barely breaking even.
How do you calculate gross margin?
Subtract cost of goods sold from revenue to get gross profit, then divide gross profit by revenue and multiply by 100. $120,000 in revenue minus $72,000 COGS is $48,000 gross profit, a 40% gross margin.
What is the difference between gross margin and gross profit?
Gross profit is a dollar amount (revenue minus COGS). Gross margin is that amount as a percentage of revenue. $48,000 of gross profit on $120,000 of sales is a 40% gross margin.
How do I price a product for a 50% gross margin?
Divide your cost by (1 − 0.50). A product that costs $12 needs a $24 price for a 50% gross margin, which is the same as a 100% markup.
What is a good gross margin for a small business?
There’s no single number. It must be high enough that gross profit covers operating expenses and your profit goal. Product businesses often target 40% to 60% or more; compare with your industry using the calculator and your own overhead.
Can gross margin be negative?
Yes. If cost of goods sold is higher than revenue, gross margin is negative and every sale loses money before overhead. Raise prices or cut unit costs right away.
Is gross margin the same as markup?
No. Gross margin divides gross profit by price; markup divides it by cost. A 40% gross margin equals a 66.7% markup on cost.
How do I use a gross margin calculator?
Enter price and cost, and the gross margin calculator returns gross margin percentage. You can also enter a target margin to see the price you need. There’s a short example on the page.
What is a 40% gross margin?
A 40% gross margin means 40 cents of every sales dollar is left after the cost of the product. On a $10 cost, a 40% margin needs a $16.67 price, which is a 66.7% markup.
