What Is Gross Margin? Definition, Formula & Examples

what is gross margin and how to calculate it

Gross margin (also referred to as gross profit margin) is one of the most important financial metrics for understanding whether a business is fundamentally profitable. It measures how much revenue remains after covering the direct costs of producing goods or delivering services. Unlike top-line revenue, gross margin reveals whether your pricing and cost structure actually support long-term sustainability.

Before we get into the details: accurate margins start with accurate pricing. Using Invoice Fly’s free estimate generator helps you price jobs correctly from the start, capture true costs, and ensure your revenue data reflects what your business actually earns, making gross margin calculations far more reliable.

Get Started with Invoice Fly’s Software

Invoice Fly is a smart, fast, and easy-to-use invoicing software designed for freelancers, contractors, and small business owners. Create and send invoices, track payments, and manage your business — all in one place.

Invoice Payments - Accept Payments Online

What Is Gross Margin?

Laptop used for financial analysis and gross margin calculations

Gross margin is a profitability ratio that shows the percentage of revenue left after subtracting the cost of goods sold (COGS). It focuses exclusively on the costs directly required to produce a product or deliver a service.

Direct costs typically include:

  • Raw materials and inventory
  • Manufacturing or production labor
  • Direct service labor
  • Packaging and production supplies

Gross margin does not include indirect or operating expenses such as rent, utilities, marketing, office salaries, insurance, or taxes. Those costs are evaluated separately when calculating operating margin and net margin on an income statement.

Because gross margin isolates core business activity, it helps answer a critical question: Does this business make enough money on its core offerings to support everything else?

Gross Margin vs Gross Profit

Gross profit and gross margin are related but serve different analytical purposes.

Gross profit is a dollar amount:

  • Revenue – COGS = Gross profit

Gross margin converts that number into a percentage:

  • Gross profit ÷ Revenue = Gross margin

For example, a company with $80,000 in gross profit may sound profitable. But if revenue is $800,000, the gross margin is only 10%. Percentages provide context that dollar amounts alone cannot, especially when comparing performance across time or products.

Why Gross Margin Matters

Gross margin matters because it directly influences a business’s ability to survive and grow. A strong margin:

  • Provides room to pay operating expenses
  • Supports reinvestment in staff, equipment, or marketing
  • Helps absorb rising costs without immediate price increases

Businesses with consistently strong margins are better positioned to manage overhead, cash flow challenges, and long-term planning, especially when combined with strong business bookkeeping practices.

Formula and Calculation of Gross Margin

Gross margin is simple to calculate, but accuracy depends on using the correct inputs.

Manufacturing workers operating machinery on production floor

Gross Margin Formula

The formula for gross margin is:

(Revenue – Cost of Goods Sold) ÷ Revenue

Revenue should reflect net sales after discounts, returns, and allowances. COGS should include only direct costs tied to production or service delivery. Misclassifying expenses such as including rent or marketing, will distort your results.

The Massachusetts Office of Consumer Affairs emphasizes accurate cost classification as a key step in setting sustainable prices.

Step-by-Step Example Calculation

Consider a small manufacturing business:

  • Revenue: $250,000
  • Raw materials: $110,000
  • Direct labor: $40,000
  1. Calculate COGS
    COGS = $150,000
  2. Calculate gross profit
    $250,000 – $150,000 = $100,000
  3. Divide by revenue
    $100,000 ÷ $250,000 = 0.40
  4. Convert to percentage
    Gross margin = 40%

Gross Margin Percentage

This percentage allows businesses to:

  • Compare performance across periods
  • Evaluate different product lines
  • Benchmark against competitors

Pro Tip: Tools like Invoice Fly’s profit margin calculator can automate these calculations and reduce errors.

What Gross Margin Can Tell You

It provides insight into several critical aspects of business performance.

Efficiency of Production

Declining gross margin often signals inefficiencies, such as rising material costs or increased labor hours. Monitoring margins alongside tracking transactions helps identify problems early.

Profitability of Core Operations

If gross margin is weak, no amount of overhead cost-cutting will fix the underlying issue. Healthy margins indicate that the core business activity is profitable before administrative costs.

Pricing Strategy Guidance

Margins help determine whether pricing is sustainable. Thin margins often indicate prices are too low relative to costs or that the product mix needs adjustment.

Gross Margin vs Net Margin

Gross margin and net margin measure profitability at different levels.

While gross margin focuses on direct costs only, net margin includes:

  • Operating expenses
  • Interest and taxes
  • Depreciation and amortization

Gross Margin vs Gross Profit

Gross profit appears as a line item on the income statement and supports budgeting and forecasting. Gross margin expresses efficiency as a ratio, making it easier to compare periods, products, and competitors.

Both metrics are important, but gross margin is usually more actionable for strategic decisions.

How to Use Gross Margin

Business Decisions

Businesses use gross margin to decide whether to discontinue products, renegotiate supplier contracts, or revise pricing strategies.

Investment Evaluation

Investors and lenders often review margins alongside financial projections to assess long-term viability.

Revenue Optimization

Tracking margins by product highlights which offerings generate the most profit per dollar of revenue.

What Is a Good Gross Margin?

There is no universal number which constitutes a “good” margin. Benchmarks vary widely by industry.

Typical ranges include:

  • Grocery and retail: 20%–35%
  • Manufacturing: 30%–50%
  • Professional services: 50%–75%
  • Software and digital products: 70%+

According to the U.S. Bureau of Labor Statistics, retail margins vary significantly by category, making industry-specific comparisons essential.

Common Gross Margin Mistakes

Business team reviewing financial performance in meeting

Even profitable businesses can misunderstand or miscalculate gross margin. These mistakes often lead to poor pricing decisions, inaccurate financial reporting, and false assumptions about profitability. Below are the most common errors and how to avoid them.

Overlooking Hidden COGS

One of the most frequent gross margin mistakes is failing to include all direct costs in cost of goods sold (COGS). Many businesses only count obvious expenses like materials or inventory purchases and overlook other direct costs that should be included.

Commonly missed COGS items include:

  • Freight and inbound shipping for inventory
  • Packaging and labeling materials
  • Direct labor tied to production or service delivery
  • Merchant processing fees tied directly to product sales

Excluding these costs inflates gross margin and creates a misleading picture of profitability. Over time, this can result in underpricing products or services and cash flow problems when real costs surface. 

Misclassifying Expenses

Another major issue is misclassifying overhead expenses as COGS or vice versa. Including rent, marketing, office salaries, or software subscriptions in COGS artificially lowers gross margin and makes core operations appear less profitable than they truly are.

To avoid this, businesses should maintain a clear and consistent chart of accounts that clearly separates:

  • Direct production or service costs
  • Operating expenses
  • Administrative and overhead costs

Accurate expense classification not only improves gross margin accuracy but also ensures financial statements remain reliable for lenders, investors, and tax reporting.

Ignoring Product Mix

Looking only at overall gross margin can hide serious issues at the product level. A business may appear profitable on paper while relying heavily on low-margin products that consume time, labor, and resources.

For example:

  • High-volume, low-margin items can dilute overall margins
  • Promotional or discounted products may generate sales but little profit
  • Service add-ons may carry significantly higher margins than core offerings

Tracking gross margin by product or service reveals which offerings truly drive profitability. This insight allows businesses to adjust pricing, marketing focus, or inventory strategy to prioritize higher-margin revenue streams and improve overall financial performance.

How Companies Can Improve Gross Margins

Businesses improve margins by:

  • Negotiating supplier pricing
  • Reducing waste and inefficiencies
  • Adjusting prices strategically
  • Focusing on higher-margin offerings

Accurate invoicing and clean financial data supported by tools like Invoice Fly’s client portal are critical to measuring improvement accurately.

Examples of Gross Profit Margin

Retail example
Revenue: $400,000
COGS: $260,000
Gross margin: 35%

eCommerce example
Revenue: $220,000
COGS: $110,000
Gross margin: 50%

Service business example
Revenue: $180,000
Direct labor: $54,000
Gross margin: 70%

Ready to Improve Your Gross Margin?

Gross margin is one of the most actionable financial metrics for small businesses. It shows whether your pricing, costs, and operations are aligned to support sustainable growth.By tracking margins consistently, and backing them with accurate invoicing, you gain clarity and control over your financial performance. Using Invoice Fly’s client portal helps centralize invoices, payments, and customer records, ensuring every sale is documented correctly and your gross margin data stays accurate as your business scales.

Get Started with Invoice Fly’s Software

Invoice Fly is a smart, fast, and easy-to-use invoicing software designed for freelancers, contractors, and small business owners. Create and send invoices, track payments, and manage your business — all in one place.

Invoice Payments - Accept Payments Online


FAQs about Gross Margin​

Gross margin shows how efficiently a business converts revenue into profit after covering direct production or service costs. It helps determine whether core operations generate enough profit to support overhead expenses and future growth.

Gross profit is the dollar amount left after subtracting cost of goods sold from revenue. Gross margin expresses that same profit as a percentage of revenue, making it easier to compare performance across time periods or businesses.

A good gross margin varies by industry, business model, and cost structure. Rather than focusing on a single benchmark, tracking margin trends over time provides better insight into efficiency and pricing health.

Margins provide context that profit alone cannot. They allow meaningful comparisons across businesses of different sizes and help identify whether profitability is improving or declining as revenue changes.

Yes. A business can generate positive gross profit but still report a net loss if operating expenses, interest, or taxes are too high. This often indicates that overhead costs are the main issue.