Gross Margin Calculator

Enter revenue and COGS to get your gross margin percentage.

Gross Profit:
Gross Margin:

Advertisement

Use the Gross Margin Calculator above to find out exactly what share of every sales dollar you keep once what you paid to produce it is settled. Enter any two of your costs, revenue, or margin, and the tool will calculate the third instantly — no spreadsheet required. Whether you're setting a price for a new product or reviewing last quarter's numbers, your gross margin tells you how healthy your prices really are before a single overhead expense even enters the picture.

Understanding Your Gross Margin Calculator Results

Every result the calculator produces comes down to three numbers: revenue, costs, and the profit sitting between them. Revenue is the total amount a sale brings in. Cost — more precisely, cost of goods sold (COGS) — is what it took to produce or acquire whatever you sold, including materials and direct labor. Subtract one from the other and you get gross profit; divide that gross profit by revenue and you get your margin percentage, expressed first as a decimal, then converted to a clean percent.

Because margin is a ratio, not a fixed dollar amount, it's the number that lets you compare a $12 item and a $1,200 item on equal footing. A company with strong revenue but a thin profit percentage is often in worse shape than a smaller one with a fatter margin — this is one of the clearest signals of financial health available to a small business owner, long before a full profit and loss statement gets built. Your accounting software may already run this math automatically, but understanding the formula helps you catch errors before they reach a report.

What Counts as Cost of Goods Sold

Cost of goods sold includes anything spent directly making or acquiring what you sell: materials, manufacturing costs, and the wages of people directly involved in production. It typically excludes indirect spend like marketing or your own salary — those come out later, after gross margin, when you work out net margin instead.

Reading Your Margin and Profit Results

The margin percentage the calculator shows you describes a simple margin ratio: how much of each sales dollar is profit rather than what it took to make. A 40% margin means 40 cents of every dollar in revenue is gross profit; the other 60 cents went to production. There's no single healthy number here — it depends entirely on what you sell, which is covered further down.

Advertisement

The Gross Margin Formula Explained

To calculate gross margin, the formula is short enough to do in your head once you've used it a few times:

$$ \text{Gross Margin} = \frac{\text{Revenue} - \text{Cost}}{\text{Revenue}} \times 100 $$

Say your revenue is $150 and your cost is $90. Gross profit is $60, and dividing that by $150 gives 0.4 — a 40% margin. The same profit margin formula can be rearranged to solve for whichever value you're missing:

$$ \text{Cost} = \text{Revenue} \times (1 - \text{Margin}) $$

Every profit margin calculation ultimately reduces to the same three inputs, and that's exactly what the calculator does behind the scenes: plug in any two known values, and it solves the third using whichever version of the formula fits.

How to Use This Profit Margin Calculator Step by Step

You don't need to memorize the algebra above — the calculator handles it — but knowing the steps helps you sanity-check the output:

  1. Calculate or look up your cost of goods sold for the item (for example, $90).
  2. Find your revenue — the amount you actually charged (for example, $150).
  3. Subtract your production costs from revenue to get gross profit ($150 − $90 = $60).
  4. Divide gross profit by revenue and convert the decimal to a percent (0.4 → 40%).
  5. For a more reliable read, run this using total sales revenue from a full month or quarter rather than a single sale.

Whether you're selling a product or a service, the steps above work the same way. Some people just call this a profit calculator since it ultimately tells you how much profit you keep, and others reach for a dedicated markup calculator when they'd rather start from what they paid instead of what they charged. Either way, the math underneath is the same — you're free to think of this as a gross profit calculator, a gp calculator for short, or simply your everyday gross margin calculator.

Margin vs Markup: Why They're Not the Same

Margin and markup describe the same dollar amount of profit from two different starting points, which is why they're so often confused. Markup is the ratio of profit to the purchase price — your cost — while margin is the ratio of profit to the selling price. A $30 profit on a $90 cost is a 33% markup, but that same $30 profit on a $120 sale price is only a 25% margin.

MetricFormulaBaseExample ($80 in, $100 out)
MarginProfit ÷ RevenueSale price20%
MarkupProfit ÷ CostPurchase price25%

How to Calculate Markup from Margin

To convert a margin into a markup, turn the margin into a decimal, subtract it from 1, then divide 1 by that result and subtract 1 again. A 20% margin works out to a 25% markup — markup is always the larger figure whenever there's a real profit involved, since it's measured against the smaller base.

Gross Profit Margin vs Net Profit Margin vs EBITDA Margin

Companies track several different flavors of margin, and it's easy to mix them up when comparing numbers between two businesses.

Gross Profit Margin

Gross profit margin only accounts for revenue and what you paid to produce what you sold — it ignores marketing, overhead, and every other operating expense (OPEX). It's the fastest read on whether a specific product or service is priced correctly.

EBITDA Margin

You can calculate EBITDA margin — earnings before interest, taxes, depreciation, and amortization — by adding operating expenses like rent and employee salaries back in while still stripping out financing costs, giving a picture of how the core operation runs before those decisions muddy the water.

Net Profit Margin

Net margin is what's left after absolutely everything is deducted — production costs, operating expenses, interest, and taxes — divided by revenue, or sometimes by net sales instead of gross revenue. Net income divided by revenue is the figure investors watch most closely, because it can't hide a problem somewhere else in the company. Generally, gross margin is the highest of the three figures, EBITDA margin sits in the middle, and it is the smallest, since each step subtracts more.

What's a Good Gross Margin by Industry

There's no single healthy margin that applies everywhere — it depends heavily on your expense structure and how much competition drives prices down.

IndustryTypical Gross Margin
Software / SaaS70–90%
E-commerce20–40%
Restaurants60–70% (before labor)
Grocery stores15–25%
Manufacturing25–35%

Typical Margins for Retailers and E-Commerce Businesses

A physical retailer usually runs a thinner margin than a service business because production costs are a much bigger share of each sale. Comparing these financial metrics against companies your own size, in your own sector, is the only fair benchmark — the 30% margin above wouldn't raise any eyebrows there, while that same figure would be a warning sign for a consulting firm with very little production expense at all.

Cost
What it takes to produce or acquire the item you're selling.
Revenue
The total amount a sale brings in before anything is subtracted.
Gross Margin
The percent of revenue left as profit after production costs.
Markup
The percentage added to your costs to arrive at the selling price.

Advertisement

How to Improve Your Profit Margin and Protect Profitability

If your calculator result comes back lower than the benchmark you were hoping for, there are really only two levers, and most businesses need to pull both:

  • Raise prices, bundle low-margin items with high-margin ones, or prioritize your best-performing product lines.
  • Lower what it costs you to produce or acquire what you sell, without cutting the quality customers are paying for.

Pricing Strategy Adjustments

A deliberate pricing strategy is usually the fastest lever. Retailers often calculate margin weekly, while manufacturers calculate it monthly, so pick a cadence and compare your sales price against competitors at least that often rather than letting it drift while overhead quietly climbs. Investors and lenders treat gross margin as one of the core sales metrics for judging whether a company is worth backing, so keeping it visible matters beyond your own bookkeeping.

Cost Management Without Cutting Corners

Cost management on the other side of the equation means auditing recurring outlays — rent, employee salaries, subscriptions, and vendor contracts — for anything that's crept up without a matching increase in value. Negotiating with suppliers, trimming waste in production, and watching cash flow closely so you're not financing unnecessary inventory all protect margin without touching what the customer sees at all.

Retailers sometimes call this same number sales margin when they're comparing performance across product lines. Profit margin remains the single most important financial metric for judging whether a price actually works, and in business finance generally it's the starting point for nearly every conversation about whether a company is built to last. Pair this calculator with other profitability tools, like a break-even calculator, to get the full picture of where your business stands — margin tells you how efficiently each sale performs, while the tools around it tell you how many of those sales you actually need. Using cost data from a longer stretch, like a full quarter, also gives you a steadier number than judging yourself off one unusually good or bad week.