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.

Create and Send Invoices with Invoice Fly

Whether you’re billing clients weekly, monthly, or per project, Invoice Fly helps you create professional invoices, track payments, and stay organized from anywhere.

invoice fly mobile dashboard

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%

                            Calculate your gross margin with our free calculator

                            A profit margin calculator helps you calculate your gross margin by comparing your service price with your labor, overhead, and material costs. Enter your job details to calculate total costs, total profit, markup, and gross margin so you can price your services more profitably.

                            Profit Margin Calculator

                            Labor Costs

                            Number of workers needed for the job

                            Total hours required to complete the job

                            Average hourly rate per worker

                            Overhead Expenses

                            Total monthly business expenses (rent, utilities, insurance)

                            Total working hours per month

                            Total hours needed to complete this specific job

                            Total cost of all supplies used for the job

                            The final price you will charge your client

                            Total Summary

                            Name Total
                            Labor Costs $ 0.00
                            Overhead Expenses $ 0.00
                            Material Costs $ 0.00
                            Service Price $ 0.00
                            Total Costs $ 0.00
                            Total Profit $ 0.00
                            Markup 0.00 %

                            Profit Margin 0.00 %

                            Once you’ve calculated your gross margin, you can adjust your pricing strategy to improve profitability while staying competitive.

                            Knowing your gross margin is only part of running a profitable business. The hidden cost of invisible admin work tops $25,000 a year per professional. InvoiceFly centralizes quotes, invoicing, and payments to recover up to 400 hours a year. (Source: InvoiceFly Salary & Time Gap Report 2026; time data: Oasis/Paychex Report.)

                            Invoice Fly’s estimate software helps you create accurate quotes in minutes, and when your customer approves, you can convert estimates into invoices with Invoice Fly’s invoice software in just a few clicks.

                            Create and Send Invoices with Invoice Fly

                            Whether you’re billing clients weekly, monthly, or per project, Invoice Fly helps you create professional invoices, track payments, and stay organized from anywhere.

                            invoice fly mobile dashboard

                            Invoice Fly’s on our platforms:
                            4.8/5.0 · +180,000 reviews
                            4.8/5.0 on Trustpilot, Capterra, GetApp, and Software Advice.
                            App Store (+88.000 positive reviews) and Google Play (+90.000 positive reviews)
                            Over 125,000 businesses trust us.

                            What users say about Invoice Fly:

                            “Absolutely love this app. Keeps track of my income , and very organized. Thank you”

                            — Edgardo Matos · Trustpilot · ★★★★★ · 2026-06-13

                            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.

                            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.

                            Ellie McKenna is an SEO copywriter and content strategist who writes Invoice Fly Academy's industry guides, templates and marketing advice for trades and small businesses in the US market. Her speciality is search-focused content that answers the real questions contractors ask.

                            • Currently a copywriter at Vista (Vistaprint), one of the world's largest brands serving small businesses
                            • Scriptwriter for Propulse Video, a TransPerfect company
                            • Content and communications roles across Barcelona and Belfast
                            • BSc (Hons) in Business Studies with Advertising and MSc in Digital Marketing, Communication and Leadership, Ulster University
                            • Originally from Ireland, based in Barcelona

                            Every guide Ellie writes is researched from primary sources and reviewed under the Invoice Fly editorial policy. Connect with her on LinkedIn or at elliemckenna.com.