SendNow Logo

Gross Margin: How to Calculate It, Read It and Improve It

Rifana Hameem
Rifana Hameem(Founder, SendNow)
Updated November 30, 2026•⏱️ 15 min read

Quick answer: Gross margin is the percentage of revenue a business keeps after paying the direct costs of making or delivering what it sells (cost of goods sold, or COGS). Gross margin = (Revenue - COGS) / Revenue x 100. A company with $500,000 in sales and $300,000 in COGS has a 40% gross margin: it keeps 40 cents of every dollar to cover everything else.

Below you will find step-by-step worked examples, a margin to markup conversion table, a full SaaS COGS breakdown, sourced industry benchmarks and a worksheet you can copy into a spreadsheet today.

Video: DocSend Alternative: SendNow Microsite Virtual Data Room Demo3:48 video

Table of contents

What gross margin means

Every sale has two parts: the cost of producing what you sold, and everything left over. Gross margin measures that leftover share as a percentage of the sale.

It answers a simple question: for every dollar a customer pays, how many cents are left after the product itself is paid for? Those cents fund your sales team, your engineers, your rent, your interest payments and, eventually, your profit.

Two terms get mixed up constantly:

  • Gross profit is a dollar figure. Revenue minus COGS.
  • Gross margin (also called gross profit margin) is a percentage. Gross profit divided by revenue.

Because it is a percentage, gross margin lets you compare a $50,000-a-year side business with a $50 million company, or this quarter with the same quarter three years ago, without size getting in the way.

The gross margin formula, step by step

Gross profit = Revenue - Cost of goods sold

Gross margin (%) = Gross profit / Revenue x 100

Three rules keep the calculation honest:

  1. Use net revenue, meaning sales after returns, refunds and discounts. Gross sales overstate margin.
  2. Match the periods. Revenue and COGS must cover the same month, quarter or year.
  3. Be consistent about what sits in COGS. If you move a cost in or out of COGS, restate prior periods or your trend line lies.

Worked example: a coffee roaster

An illustrative specialty coffee roaster closes its year with the following numbers.

LineAmount
Net revenue (after refunds and discounts)$480,000
Green coffee beans$132,000
Bags, valves and labels$28,800
Roasting staff wages$43,200
Roastery utilities and roaster depreciation$14,400
Inbound freight on beans$9,600
Total COGS$228,000

Step 1: Gross profit = $480,000 - $228,000 = $252,000

Step 2: Gross margin = $252,000 / $480,000 = 0.525 = 52.5%

The roaster keeps 52.5 cents from every dollar of coffee sold. Rent for the café, marketing, the owner's salary and website costs all have to come out of that 52.5 cents.

Worked example: comparing product lines

The same roaster sells three products. Margin by product shows where the money is really made.

ProductPriceCOGS per unitGross profit per unitGross margin
Single origin, 12 oz bag$22.00$9.50$12.5056.8%
House blend, 12 oz bag$16.00$7.20$8.8055.0%
Cold brew cans, 4-pack$14.00$8.40$5.6040.0%

Cold brew looks popular on the shelf, but every can sold pulls the blended margin down. Knowing that, the owner can raise its price, renegotiate can costs or push the bags harder. That decision is impossible with a single company-wide number.

What goes into cost of goods sold

The biggest source of bad gross margin numbers is a messy COGS line. A useful rule: if the cost would disappear when you stop selling the product, it probably belongs in COGS.

Usually in COGSUsually NOT in COGS (operating expenses)
Raw materials and componentsSales salaries and commissions
Direct production or delivery laborMarketing and advertising
Inbound freight and import dutiesOffice rent and admin salaries
PackagingMost R&D and product development
Manufacturing overhead (factory utilities, equipment depreciation)Accounting, legal and insurance for the company
Hosting and infrastructure that runs the product (software)Internal tools for the back office
Merchant or payment fees (treated as COGS by many companies)Interest and taxes (below operating profit)

Service businesses use cost of revenue or cost of services instead of COGS. For an agency that means the salaries and contractor fees of the people doing client work. The formula does not change.

Gross margin vs markup

Margin and markup both start from the same gross profit, but divide it by different things. Confusing them is the most common pricing mistake small businesses make.

Gross margin = (Price - Cost) / Price

Markup = (Price - Cost) / Cost

SendNow Document Analytics

A product that costs $60 and sells for $100 has $40 of gross profit:

  • Margin = $40 / $100 = 40%
  • Markup = $40 / $60 = 66.7%

If you want a 40% margin and mark up your cost by 40%, you get a $84 price and only a 28.6% margin. To convert between the two:

Markup = Margin / (1 - Margin)

Margin = Markup / (1 + Markup)

Margin to markup conversion table

Target gross marginMarkup needed on costPrice for a $10 cost
10%11.1%$11.11
20%25.0%$12.50
25%33.3%$13.33
30%42.9%$14.29
33.3%50.0%$15.00
40%66.7%$16.67
50%100.0%$20.00
60%150.0%$25.00
70%233.3%$33.33
75%300.0%$40.00
80%400.0%$50.00

The fastest pricing shortcut from the table: Price = Cost / (1 - Target margin). A $10 cost at a 60% margin target gives $10 / 0.40 = $25. If you prefer not to do the math, the profit margin calculator converts margin and markup live.

Gross margin vs operating margin vs net margin

Gross margin is the first of three margins on an income statement. Each one subtracts more costs.

MarginFormulaWhat it tells you
Gross margin(Revenue - COGS) / RevenueHow profitable the product itself is
Operating marginOperating income / RevenueHow profitable the business is after running costs
Net marginNet income / RevenueWhat is left for owners after interest and taxes

A worked walk-down for a company with $2,000,000 in revenue:

LineAmountMargin
Revenue$2,000,000
COGS($800,000)
Gross profit$1,200,00060.0%
Operating expenses (sales, R&D, admin)($900,000)
Operating income$300,00015.0%
Interest($40,000)
Taxes($55,000)
Net income$205,00010.25%

A strong gross margin with a weak operating margin means the product is fine but overhead is too heavy. A weak gross margin usually cannot be fixed by cutting overhead. For a deeper look at the walk-down, see revenue vs profit and our guide to EBITDA.

SaaS gross margin and the COGS breakdown

Software is famous for high gross margins because serving one more customer costs very little. But "very little" is not zero, and the line between COGS and operating expenses in SaaS is where many founders accidentally flatter their numbers.

What belongs in SaaS COGS

CostIn COGS?Notes
Cloud hosting, databases, storage for the live productYesThe core of SaaS COGS
AI model inference and API calls made for customersYesScales with usage; can be large
Third-party services embedded in the product (email, SMS, maps, payments APIs)Yes
Customer support teamYes, usuallyKeeping paying customers working
Site reliability and DevOps for productionYes, the production shareTime spent building new features goes to R&D
Payment processing feesOftenChoose a policy and keep it
Onboarding and implementation staffYes, in cost of servicesReport services margin separately
Customer success focused on renewals and expansionOften splitRetention work is frequently treated as sales and marketing
Engineers building new featuresNoR&D (or capitalized software)
Sales and marketing toolsNoOperating expense

Worked SaaS example (illustrative)

A B2B SaaS company has $6,000,000 in annual revenue: $5,400,000 subscription and $600,000 professional services.

Subscription COGSAmount
Cloud hosting$540,000
AI model inference$300,000
Embedded third-party APIs$120,000
Customer support$420,000
Production SRE share$240,000
Payment processing$160,000
Total subscription COGS$1,780,000
  • Subscription gross margin = ($5,400,000 - $1,780,000) / $5,400,000 = 67.0%
  • Services gross margin, with $480,000 of delivery staff cost = ($600,000 - $480,000) / $600,000 = 20.0%
  • Blended gross margin = ($6,000,000 - $2,260,000) / $6,000,000 = 62.3%

Halving inference cost (through caching, a smaller model or batching) saves $150,000 and lifts subscription margin to ($5,400,000 - $1,630,000) / $5,400,000 = 69.8%. That is nearly three points from one engineering project.

AI is changing this line fast. The 2025 SaaS benchmarks report from Growth Unhinged and High Alpha, based on more than 800 companies, found early-stage gross margins down nearly 10 points year on year, and AI-native startups running about 5 points lower than their SaaS peers. If your product calls a model on every request, track inference cost per customer as closely as hosting.

💡 SendNow tip: Investors in a SaaS round will ask for your gross margin build, not just the headline number. Share the COGS breakdown and P&L in a tracked investor data room, and page-by-page analytics will show you which tabs they spent the most time on. Start free

What is a good gross margin? Industry benchmarks

There is no universal "good" gross margin. A grocery chain with a 25% margin can be healthy; a software company with 25% has a problem. The most useful public dataset is maintained by Aswath Damodaran at NYU Stern, which averages US public companies by sector.

Industry (US)Number of firmsAverage gross margin
Drugs (pharmaceutical)22871.73%
Software (system and application)30971.72%
Software (internet)2962.58%
Hotel and gaming6360.85%
Semiconductor6658.97%
Apparel3556.88%
Business and consumer services15533.38%
Retail (general)2333.18%
Restaurant and dining6432.24%
Retail (grocery and food)1526.31%
Construction supplies4025.52%
Air transport2324.79%
Computer services6424.26%
Food processing7823.23%
Trucking2621.19%
Auto and truck3310.41%
Total market5,99437.76%

Source: Damodaran Online, Margins by Sector (US), data last updated January 2026. Verified on November 30, 2026.

Three cautions when you use benchmarks:

  • These are public companies. Small businesses buy in smaller quantities and usually run lower margins in the same category.
  • COGS definitions differ. Some companies put shipping or support in COGS and others do not. Read the footnotes before comparing two specific businesses.
  • Your trend matters more than the level. A margin sliding from 58% to 51% over six quarters says more than how you compare with an industry average.

How to improve gross margin

There are only two moves: earn more per unit or spend less per unit. Here are seven practical levers, roughly in the order founders find them easiest.

  1. Raise prices on the products customers value most. Even small increases flow straight to gross profit.
  2. Cut discounting. Track the gap between list and realized price. Unplanned discounts quietly erode margin.
  3. Fix your product mix. Promote higher-margin products and bundles, and reprice or retire the ones that drag the average down.
  4. Renegotiate supplier costs. Volume commitments, longer contracts or alternative suppliers.
  5. Reduce waste and returns. Spoilage, damage and refunds all inflate effective COGS.
  6. Automate delivery work. In services and SaaS, automation and self-serve onboarding lower the people cost per customer.
  7. Optimize infrastructure. Right-size cloud resources, cache AI responses and remove unused third-party services.

SendNow Secure Document Sharing

Price increase vs cost cut: a worked margin bridge

Back to the coffee roaster ($480,000 revenue, $228,000 COGS, 52.5% margin). Compare two 5% changes, assuming volume stays the same:

ScenarioRevenueCOGSGross profitGross margin
Today$480,000$228,000$252,00052.5%
Raise prices 5%$504,000$228,000$276,00054.8%
Cut COGS 5%$480,000$216,600$263,40054.9%

The margins land almost level, but the price increase produces $12,600 more gross profit. Margin percentage and margin dollars do not always move together, so check both before you decide.

Copy-paste gross margin worksheet

Paste this into Excel or Google Sheets. Put each product, service or plan on its own row.

ProductUnits soldPrice per unitCOGS per unitRevenueCOGSGross profitGross marginMarkup
Product A1,200$22.00$9.50$26,400$11,400$15,00056.8%131.6%
Product B2,000$16.00$7.20$32,000$14,400$17,60055.0%122.2%
Product C900$14.00$8.40$12,600$7,560$5,04040.0%66.7%
Total$71,000$33,360$37,64053.0%

Formulas (assuming row 2, columns A to I):

  • Revenue (E2): =B2*C2
  • COGS (F2): =B2*D2
  • Gross profit (G2): =E2-F2
  • Gross margin (H2): =G2/E2
  • Markup (I2): =G2/F2
  • Blended margin: =SUM(G:G)/SUM(E:E), never the average of the row percentages

That last point matters: averaging 56.8%, 55.0% and 40.0% gives 50.6%, but the true blended margin weighted by sales is 53.0%.

Tools and resources

  • Profit margin calculator: our free profit margin calculator handles gross, operating and net margin plus markup.
  • Accounting software: QuickBooks, Xero and NetSuite produce gross margin reports by product or class if COGS is mapped correctly.
  • Spreadsheets: Excel or Google Sheets for the worksheet above.
  • Benchmarks: Damodaran Online margins by sector (US public companies, updated each January).
  • SaaS benchmark reports: the annual SaaS benchmarks published by Growth Unhinged with High Alpha, and the surveys from SaaS Capital and KeyBanc, are useful for software peer comparisons.

FAQ

What is a good gross margin?

It depends on the industry. US data compiled by NYU Stern professor Aswath Damodaran (January 2026) shows an all-market average near 38%, with grocery retail around 26%, restaurants around 32% and system and application software around 72%. Compare yourself with your own sector and your own trend, not a single universal number.

Is gross margin the same as gross profit?

No. Gross profit is a dollar amount: revenue minus cost of goods sold. Gross margin is that gross profit divided by revenue, shown as a percentage. A company with $250,000 of gross profit on $500,000 of revenue has a 50% gross margin.

What is the difference between gross margin and markup?

Both use the same gross profit, but margin divides it by the selling price while markup divides it by the cost. A product that costs $60 and sells for $100 has a 40% margin and a 66.7% markup. Margin can never reach 100%, while markup can go well above it.

What is a good gross margin for a SaaS company?

Software companies usually run far higher gross margins than physical-goods businesses because extra customers cost little to serve. Damodaran's January 2026 US data puts system and application software near 72% on average. AI-heavy products can run lower because model inference is a real cost of every customer request.

Can gross margin be negative?

Yes. If cost of goods sold is larger than revenue, gross profit is below zero and so is gross margin. It happens when products are priced below their direct cost, during heavy discounting, or in early startups whose infrastructure is sized for far more customers than they have.

Does gross margin include salaries?

Only the salaries of people who directly produce or deliver what you sell. Production workers, roasters or warehouse pickers, and in SaaS the support and site reliability staff who keep the live product running, are usually in COGS. Sales, marketing, general admin and most R&D salaries sit below gross profit as operating expenses.

What is the difference between gross margin and contribution margin?

Gross margin subtracts cost of goods sold, which can include some fixed production costs such as factory rent. Contribution margin subtracts only variable costs, including variable selling costs like sales commissions and shipping to customers. Contribution margin is better for break-even and pricing decisions; gross margin is the standard reported figure.

Why do investors care about gross margin?

Gross margin shows how much of each revenue dollar is left to pay for sales, R&D, overhead and profit. A high and stable gross margin means growth can turn into profit later. Investors also use it to adjust customer lifetime value, so a low margin makes every customer worth less.

Keep reading

Share your margins with investors the safe way with SendNow

✅ Keep your P&L, COGS build and pricing model in one investor data room ✅ Gate it with an NDA and stamp every page with a per-viewer watermark ✅ See exactly who opened your financials and how long they spent on each page with document tracking ✅ Block downloads and expire links once the round closes

Start sharing your financials securely with SendNow


Rifana Hameem

About the Author: Rifana Hameem

Rifana is the founder of SendNow. She leads the team in building secure, compliant, and analytics-rich document sharing tools for finance and professional teams worldwide.

Connect on LinkedIn

Related Articles

Revenue vs Profit: The Difference Explained With Real Numbers

Revenue vs profit explained: a side-by-side table, a full walk-down from sales to net profit, why high revenue can still mean losses, and what investors want.

What Is EBITDA? Meaning, Formula and a Worked Example

What is EBITDA? Learn the EBITDA meaning, both formulas, a worked P&L example, EBITDA margin, adjusted EBITDA add-backs and EV/EBITDA, plus a free template.

What Is Revenue? Definition, Formula, Types and Examples

What is revenue? Learn the definition, the formula, gross vs net revenue, ASC 606 recognition, MRR and ARR, with worked examples founders can reuse today.

Customer Acquisition: CAC Formula, Channels and a 90-Day Plan

Customer acquisition explained: the CAC formula with examples, LTV to CAC ratio, payback period, a channel comparison table and a copy-paste 90-day growth plan.

28 Startup Ideas With the Problem, Why Now and the Business Model

28 startup ideas grouped by sector, each with the problem, why now and a business model, plus how to validate an idea and when it makes sense to raise funding.

What Is a SaaS Company? Business Model, Metrics and Funding Explained

What a SaaS company is, how the subscription model makes money, the metrics that matter (MRR, churn, NRR, CAC, LTV) with formulas, and how SaaS startups raise.

Start in two minutes

Stop sending documents blind.

Every document you share comes with full visibility. Know who read it, what they focused on, and exactly when to follow up.
24-hour free trial · No credit card required · GDPR compliant