Gross Margin Calculator
- Revenue is $100,000.00 and cost of goods sold is $62,000.00, so gross profit is $100,000.00 − $62,000.00 = $38,000.00.
- Gross margin divides gross profit by revenue: $38,000.00 ÷ $100,000.00 × 100 = 38.00%.
- Markup divides the same profit by cost instead: $38,000.00 ÷ $62,000.00 × 100 = 61.29%. Same dollars, different denominator, which is why a positive margin is always smaller than the matching markup.
This gross margin calculator takes two inputs—revenue and cost of goods sold (COGS), the first two lines of the income statement—and returns both gross profit and gross margin as a percentage. Gross margin equals (revenue minus COGS) divided by revenue, multiplied by 100. For example, revenue of $100,000 and COGS of $62,000 give a gross profit of $38,000 and a gross margin of 38.00%. Revenue of $250,000 and COGS of $175,000 give a gross profit of $75,000 and a gross margin of 30.00%. If COGS exceeds revenue—say, revenue of $48,000 and COGS of $51,200—the result is a gross profit of $-3,200 and a gross margin of -6.67%, meaning the product loses money before any operating expense.
This method is the accepted standard because gross margin isolates production and pricing efficiency: COGS covers direct materials, direct labour and production overhead, while operating expenses, interest and tax are excluded. Note that margin and markup describe the same profit with different denominators—markup divides by cost. The $38,000 profit in the first example is a 38.00% margin but a 61.29% markup. This page shows the formula, step-by-step workings, worked examples and sources.
Worked examples
A healthy product business
Primary result: 38.00% — $38,000 of gross profit on $100,000 of revenue; the same profit is a 61.29% markup on cost. (100000 $ · 62000 $)
| Gross margin | 38.00% |
| Gross profit | $38,000.00 |
| Markup on cost | 61.29% |
| Gross profit per $100 of revenue | $38.00 |
High volume, thin margin
Primary result: 30.00% — $75,000 of gross profit, but it takes $250,000 of sales to earn it. (250000 $ · 175000 $)
| Gross margin | 30.00% |
| Gross profit | $75,000.00 |
| Markup on cost | 42.86% |
| Gross profit per $100 of revenue | $30.00 |
When COGS exceeds revenue
Primary result: -6.67% — the business loses $3,200 before a single operating expense is counted. (48000 $ · 51200 $)
| Gross margin | -6.67% |
| Gross profit | $-3,200.00 |
| Markup on cost | -6.25% |
| Gross profit per $100 of revenue | $-6.67 |
Gross margin on the income statement
On the income statement, revenue and cost of goods sold (COGS) are the first two lines. Revenue sits at the top, representing the total amount earned from sales before any costs are subtracted. COGS appears directly below it, capturing the direct costs tied to producing the goods or services sold. The difference between these two figures is gross profit, and when you divide that profit by revenue and multiply by 100, you get the gross margin percentage. This is the exact calculation a gross margin calculator performs, giving you a quick read on whether a product or business is fundamentally profitable.
Gross margin measures production and pricing efficiency only. It excludes operating expenses, interest, and tax, so it does not tell you the bottom-line profit. What it does reveal is whether the core economics of making and selling a product work. COGS covers direct materials, direct labour, and production overhead, not selling or admin costs. By stripping those downstream expenses out, gross margin isolates the relationship between what you charge customers and what it costs you to produce what you sell. That is why it serves as the first profitability check on any product or business. If the gross margin is negative or too thin, no amount of cost-cutting in other areas will fix a broken pricing or production model.
The numbers make this clear. Take revenue of $100,000 and COGS of $62,000. Gross profit is $38,000, and the gross margin is 38.00%. Scale up to revenue of $250,000 with COGS of $175,000, and gross profit becomes $75,000 with a gross margin of 30.00%. Both examples are profitable at the gross level, though the second business converts less of each sales dollar into gross profit. Now consider revenue of $48,000 against COGS of $51,200. Gross profit is $-3,200, and the gross margin is -6.67%. In that case, the product loses money before any operating expense is counted. The business is paying more to produce its goods than it collects from selling them, which means every additional sale deepens the loss.
One common source of confusion is the difference between margin and markup. Both describe the same profit, but they use different denominators. Margin divides gross profit by revenue, while markup divides gross profit by cost. Using the first example, the $38,000 profit is a 38.00% margin but a 61.29% markup. The profit dollar amount has not changed, yet the percentages differ because the base for the calculation shifts. A gross margin calculator focuses on the margin figure because it ties profit directly to the sales dollars coming in, making it easier to compare performance across periods, products, or companies of different sizes.
Worked examples
The gross margin calculator above lets you plug in revenue and cost of goods sold to get gross profit, margin, and markup in seconds. The three verified cases below show exactly how the math works when you apply the formula gross margin = (revenue − cost of goods sold) ÷ revenue × 100. Revenue and COGS are the first two lines of the income statement, so these are the only two inputs you need to begin.
Each example follows the same calculation path. Gross profit is simply revenue minus COGS, and gross margin is that profit expressed as a percentage of revenue. Markup uses the same gross profit number but divides by cost instead of revenue, which is why markup is always higher than margin when a product is profitable. In the first example, the $38,000 of gross profit is a 38.00% margin but a 61.29% markup because $38,000 ÷ $62,000 × 100 = 61.29%.
The third example shows what happens when COGS exceeds revenue. Gross profit turns negative at $-3,200, and gross margin falls to -6.67%. The product loses money before any operating expense is counted, which means production and pricing efficiency are already broken. Gross margin excludes operating expenses, interest, and tax; it measures production and pricing efficiency only. COGS covers direct materials, direct labour, and production overhead, not selling or admin costs, so the negative result points to the cost of the goods themselves or the price charged for them.
| Revenue | COGS | Gross Profit | Gross Margin | Markup |
|---|---|---|---|---|
| $100,000 | $62,000 | $38,000 | 38.00% | 61.29% |
| $250,000 | $175,000 | $75,000 | 30.00% | — |
| $48,000 | $51,200 | $-3,200 | -6.67% | — |
Gross margin vs markup
Gross margin and markup describe the same profit using different denominators, and that single difference is why people overstate profit without realizing it. Gross margin divides profit by revenue: (revenue − cost of goods sold) ÷ revenue × 100. Markup divides that same profit by cost. Because cost is always smaller than revenue, the markup percentage always comes out larger. A gross margin calculator keeps the denominator tied to revenue, which is the figure customers actually pay and the figure that sits on the top line of the income statement.
A verified example shows how far the two numbers can drift apart. Take revenue of $100,000 and cost of goods sold of $62,000. Gross profit is $38,000. Divided by revenue, that profit is a 38.00% gross margin. Divided by cost, the same $38,000 is a 61.29% markup. Nothing changed about the business, the price, or the profit. Only the denominator changed, and the result jumped by more than 23 percentage points. Quoting markup as margin in a pitch, a quote, or a board deck makes the operation look far more profitable than it is.
The same gap appears at other revenue and cost levels. Revenue of $250,000 and COGS of $175,000 give gross profit of $75,000 and a gross margin of 30.00%. The markup on that same profit is 42.86%. The gap shrinks when margins are lower, but the direction never reverses: markup is always the larger number so long as the product sells above cost. When cost exceeds revenue, both metrics turn negative. Revenue of $48,000 and COGS of $51,200 produce gross profit of $-3,200 and a gross margin of -6.67%, meaning the product loses money before any operating expense is counted.
Quoting markup as margin overstates profit because it hides how much of each sales dollar actually remains after production costs. Gross margin excludes operating expenses, interest, and tax, so it already measures only production and pricing efficiency. COGS covers direct materials, direct labor, and production overhead, not selling or admin costs. When someone substitutes the markup figure, the reported efficiency rises without a single cost being reduced or a single price being raised. The fix is simple: always confirm which denominator was used before reporting a percentage, and use a gross margin calculator when the goal is to express profit as a share of revenue.
What is a good gross margin?
There is no single number that defines a good gross margin, because the answer depends on the industry a business operates in. Software companies tend to carry structurally high gross margins, since the cost of producing an additional copy of a product is minimal. Grocery retail, by contrast, runs on structurally low margins because it competes on price and volume. The right way to judge whether a gross margin is good is to compare a business against its own trend over time and against its direct competitors, rather than against companies in unrelated sectors.
A gross margin calculator applies the formula gross margin = (revenue − cost of goods sold) ÷ revenue × 100. Revenue and COGS are the first two lines of the income statement, so the calculation is straightforward. For example, revenue of $100,000 and COGS of $62,000 produce a gross profit of $38,000 and a gross margin of 38.00%. A larger business with revenue of $250,000 and COGS of $175,000 earns a gross profit of $75,000 but a lower gross margin of 30.00%. If revenue falls to $48,000 while COGS reaches $51,200, the gross profit becomes $-3,200 and the gross margin drops to -6.67%, meaning the product loses money before any operating expense is counted.
Gross margin excludes operating expenses, interest, and tax; it measures production and pricing efficiency only. COGS covers direct materials, direct labour, and production overhead, not selling or admin costs. Because of this narrow scope, gross margin tells a business how well it manages the direct costs of what it sells, not whether the overall business is profitable.
It is also important not to confuse margin with markup. Both describe the same profit, but they use different denominators: markup divides by cost. The $38,000 profit in the first example is a 38.00% margin but a 61.29% markup. Using the wrong measure can make a business look more profitable than it actually is.
When a gross margin falls short of where it should be, a business can pull three levers to improve it. The first is price: raising prices increases revenue per unit sold, which widens the gap between revenue and COGS. The second is direct costs: reducing what a business pays for materials, labour, or production overhead lowers COGS and lifts margin. The third is product mix: shifting sales toward higher-margin products and away from lower-margin ones improves the overall margin without changing prices or cutting costs on any single item. Each lever works on its own, but most businesses use them in combination to move margin in the right direction.
- Price: raising prices increases revenue per unit and widens the gap between revenue and COGS.
- Direct costs: lowering what a business pays for materials, labour, or production overhead reduces COGS and lifts margin.
- Product mix: shifting sales toward higher-margin products improves overall margin without changing individual prices or costs.
FAQs
How do you calculate gross margin?
Use the formula: Gross margin = (revenue − COGS) ÷ revenue × 100. Start by subtracting your cost of goods sold from your total revenue to find gross profit. Then divide that gross profit by revenue and multiply by 100 to express the result as a percentage. This figure shows how much of each revenue dollar remains after direct production costs.
What is the difference between gross margin and markup?
Margin divides profit by revenue; markup divides the same profit by cost, so markup is always the larger number when profit is positive. For example, if an item costs $60 and sells for $100, the $40 profit gives a 40% margin but a 66.7% markup. Margin reflects profitability relative to price, while markup reflects how much you add to cost.
Can gross margin be negative?
Yes — when COGS exceeds revenue, as in the verified case of $48,000 revenue against $51,200 COGS, a margin of -6.67%. A negative gross margin means a business spent more on direct production costs than it earned from sales. This situation signals serious pricing or cost problems that require immediate attention to avoid ongoing losses.
Is gross margin the same as net margin?
No. Net margin also subtracts operating expenses, interest and tax; gross margin stops at direct costs. Gross margin measures profitability after production expenses alone, while net margin shows what remains after every cost category is deducted. A company can have strong gross margin but weak net margin if operating expenses, interest payments, or tax burdens consume the remaining profit.
What counts as COGS?
Direct materials, direct labour and production overhead. Selling, marketing and admin costs are operating expenses, not COGS. COGS includes only the costs directly tied to producing the goods or services you sell. Raw materials, factory wages, and manufacturing overhead belong here. Everything else — from advertising to office rent to executive salaries — falls under operating expenses and appears separately on the income statement.
How can a business improve its gross margin?
Raise prices, cut direct input or labour costs, or shift the sales mix toward higher-margin products. Each approach targets the gap between revenue and COGS. Price increases boost revenue without raising costs. Negotiating better supplier rates or improving labour efficiency reduces COGS. Prioritising products with stronger margins lifts the overall average, even if total sales volume stays flat.