Gross Margin Calculator
Enter revenue and cost of goods sold to see the gross margin, gross profit and markup.
Updated
Gross Margin Calculator
Our Gross Margin Calculator shows how much of each sale is left after paying for the goods or services sold. Type the revenue and the cost of goods sold (COGS) for the same period. It returns the gross margin as a percentage with the gross profit, the markup on cost and the COGS share of revenue. It suits shop owners setting prices, accounting students, managers comparing products and investors reading an income statement.
Quick answer
Gross margin is (revenue − COGS) ÷ revenue × 100: revenue of 1,000,000 and COGS of 650,000 give 350,000 ÷ 1,000,000 × 100 = 35%.
- Gross profit: revenue minus COGS, 350,000 in the example.
- Markup: gross profit as a share of COGS, about 53.85% here.
- COGS: direct costs only, such as materials, production labour and freight in.
- Negative result: the goods cost more than they sell for.
What Is Gross Margin?
Gross margin is the share of revenue left after subtracting the cost of goods sold. It shows how much of every sale is available to pay for operating costs such as rent, salaries and marketing, then interest, taxes and profit. A gross margin of 35% means 35 of every 100 in sales is left once the goods themselves are paid for.
Gross profit is the same idea as an amount. Gross profit tells you the size of the cushion; gross margin lets you compare that cushion across products, periods and companies of different sizes.
Gross Margin Formula
= revenue − COGS
= gross profit ÷ revenue
× 100
- Revenue: net sales for the period, after returns and discounts.
- Cost of goods sold (COGS): the direct cost of what was sold in the same period.
- Gross profit: what is left before operating expenses.
How to Calculate Gross Margin
A company has revenue of 1,000,000 and COGS of 650,000 in a year:
= 350,000
350,000 ÷ 1,000,000 × 100
= 35%
- Find gross profit. 1,000,000 − 650,000 = 350,000.
- Divide by revenue. 350,000 ÷ 1,000,000 = 0.35.
- Multiply by 100. 0.35 × 100 = 35%.
The gross margin is 35%. The company keeps 35 of every 100 in sales to cover its other costs.
Margin and Markup on One Bar
The bar is drawn to scale. Margin and markup use the same gross profit but divide it by different bases, which is why markup is always the larger number when both are positive.
Gross Margin vs Markup
Markup is gross profit divided by COGS, not by revenue:
= gross profit ÷ COGS
× 100
To turn a margin into a markup, use markup = margin ÷ (100 − margin) × 100:
| Gross margin | Markup |
|---|---|
| 20% | 25% |
| 25% | 33.33% |
| 30% | 42.86% |
| 40% | 66.67% |
| 50% | 100% |
| 60% | 150% |
| 75% | 300% |
Mixing the two is a common pricing mistake. Adding a 40% markup to a cost of 650 gives a price of 910 and a margin of only about 28.57%, not 40%.
Price for a Target Margin
To hit a chosen gross margin, divide the cost by one minus the margin:
= cost ÷ (1 − margin)
For a product that costs 650 and a target margin of 40%, the price is 650 ÷ 0.6 ≈ 1,083.33. Check it: (1,083.33 − 650) ÷ 1,083.33 × 100 ≈ 40%.
What Counts as COGS
| Cost | Treatment |
|---|---|
| Raw materials, parts | COGS |
| Production labour | COGS |
| Packaging, freight in | COGS |
| Factory overhead | COGS |
| Marketing, sales staff | Operating |
| Office rent, admin pay | Operating |
| Interest, income tax | Below the line |
For a service business, COGS is usually called cost of revenue or cost of sales: the labour, contractors and tools used directly to deliver the work. Putting operating costs into COGS lowers the gross margin; leaving direct costs out raises it.
Gross Margin Examples
An online t-shirt shop. Monthly revenue of 100,000 and COGS (fabric, printing, packaging) of 25,000:
= 75%
The shop keeps 75 of every 100 in sales, a markup of 300% on cost.
A freelance designer. Revenue of 40,000 and direct costs (software, design assets) of 8,000:
= 80%
Service work with few direct costs often has a high gross margin.
A cafe. Revenue of 60,000 and COGS (ingredients, packaging) of 36,000:
= 40%
Food businesses carry ingredient costs and waste, so margins are lower. The markup is about 66.67%.
A product sold below cost. Revenue of 50,000 and COGS of 56,000:
= −12%
A negative gross margin means each sale loses money even before rent or wages. Prices or costs have to change.
Gross, Operating and Net Margin
| Margin | Costs taken off |
|---|---|
| Gross | COGS only |
| Operating | COGS and operating expenses |
| Net | All costs, interest and tax |
Each margin is lower than the one above it. For the next steps down the income statement, use the Operating Margin Calculator, the EBITDA Margin Calculator or the Net Profit Margin Calculator.
What Raises or Lowers Gross Margin
Starting from revenue of 1,000,000 and COGS of 650,000, each change below is made on its own:
| Change | Margin |
|---|---|
| Starting point | 35% |
| Prices up 5% | 38.1% |
| COGS down 50,000 | 40% |
| COGS up 10% | 28.5% |
| Sell 20% more units | 35% |
Selling more units at the same price and unit cost raises gross profit (to 420,000 here) but leaves the margin unchanged. Margin moves only when prices, unit costs or the product mix change.
What Is a Good Gross Margin?
It depends on the industry, so compare a business with its own past results and with similar companies. As a rough guide only: software companies often report gross margins above 70%, many retailers fall between about 30% and 60%, and food, hospitality and manufacturing businesses tend to be lower. Published sector averages, such as the margin tables kept by Aswath Damodaran at NYU Stern, give current figures.
A falling gross margin is often an early sign of rising input costs, heavier discounting or a shift towards lower-margin products.
What the Result Leaves Out
- Operating costs. A high gross margin can still end in a loss if overheads are large.
- Accounting choices. Inventory methods (FIFO, LIFO, weighted average) and what a company puts in COGS change the figure.
- Volume. A low margin on large sales can earn more gross profit than a high margin on small sales.
- One period. Seasonal stock build-ups and write-downs can swing a single month or quarter.
The result is for education and planning and is not accounting, tax or investment advice.
Key Terms
- Gross margin
- Gross profit as a percent of revenue.
- Gross profit
- Revenue minus COGS.
- COGS
- Direct cost of the goods or services sold.
- Markup
- Gross profit as a percent of COGS.
- Net sales
- Sales after returns and discounts.
- Operating margin
- Profit after operating costs, as a percent of revenue.
How to Use the Gross Margin Calculator
- Enter revenue. Type the net sales for the period, such as 1,000,000.
- Enter COGS. Type the cost of goods sold for the same period, such as 650,000.
- Read and copy the result. The gross margin appears as you type, with the working, gross profit, markup, COGS share and a bar splitting revenue. Press Copy to copy it, or Clear or Esc to start again.
Example: revenue of 60,000 with COGS of 36,000 gives gross profit of 24,000 and a gross margin of 40%.
Who Can Use This Calculator?
Frequently Asked Questions (FAQs)
How do you calculate gross margin?
Subtract the cost of goods sold from revenue to get gross profit, divide gross profit by revenue and multiply by 100.
What is the gross margin formula?
Gross margin = (revenue − COGS) ÷ revenue × 100, which is gross profit ÷ revenue × 100.
What is the gross margin on revenue of 1,000,000 with COGS of 650,000?
It is 35%, because gross profit is 1,000,000 − 650,000 = 350,000 and 350,000 ÷ 1,000,000 × 100 = 35%. The markup on cost is about 53.85%.
What is the difference between gross margin and markup?
Gross margin divides gross profit by revenue; markup divides it by cost. A 50% gross margin is a 100% markup.
What is the difference between gross profit and gross margin?
Gross profit is an amount (revenue minus COGS). Gross margin is that amount as a percent of revenue, which makes it easy to compare.
Can gross margin be negative?
Yes. If COGS is larger than revenue, gross profit and gross margin are negative, meaning the goods cost more than they sold for.
Can gross margin change if sales stay the same?
Yes. If the cost of goods sold rises or falls while revenue stays the same, the margin moves with it.
Does selling more raise gross margin?
Not by itself. Selling more units at the same price and unit cost raises gross profit but leaves the margin the same.
Is the Gross Margin Calculator free?
Yes. It is free to use, with no sign-up and no limit on how many times you use it.
Sources
- Corporate Finance Institute. Gross Margin Ratio.
- Corporate Finance Institute. Cost of Goods Sold (COGS).
- AccountingTools. Gross margin definition.
- Wall Street Prep. Gross Margin.
- WallStreetMojo. Gross Margin Formula.
- NYU Stern (Aswath Damodaran). Operating and Net Margins by Industry.
- Wikipedia. Gross margin.
- Wikipedia. Cost of goods sold.
- Wikipedia. Markup (business).
Try our Gross Margin Calculator to see how much of every sale is left after the cost of goods sold.