Gross Margin: What It Is, How to Calculate It, and How to Improve It
A single dollar of revenue tells you almost nothing about your business's health. What matters is how much of that dollar you actually keep after producing your product or delivering your service. That number—your gross margin—is one of the most important metrics any business owner can track, yet it's also one of the most commonly misunderstood.
Whether you're running a coffee shop, an ecommerce store, or a consulting firm, understanding your gross margin helps you make smarter decisions about pricing, costs, and growth. Let's break it down.
What Is Gross Margin?
Gross margin is the percentage of revenue that remains after subtracting the direct costs of producing your goods or services, known as cost of goods sold (COGS). It tells you how efficiently your business converts sales into profit before accounting for overhead like rent, marketing, or administrative salaries.
Think of it this way: if your gross margin is 60%, you keep $0.60 of every dollar in revenue after covering production costs. The remaining $0.40 goes toward the materials, labor, and other direct expenses required to create what you sell.
Gross margin is sometimes referred to as gross profit margin, and while the terms are often used interchangeably, there's a subtle but important distinction between gross margin and gross profit—more on that below.
The Gross Margin Formula
The formula is straightforward:
Gross Margin = (Revenue − Cost of Goods Sold) / Revenue × 100
Here's a quick example. Suppose your business generates $500,000 in annual revenue and your COGS totals $200,000:
- Gross Profit = $500,000 − $200,000 = $300,000
- Gross Margin = $300,000 / $500,000 × 100 = 60%
This means you retain 60 cents of every sales dollar after covering direct production costs.
What Counts as Cost of Goods Sold?
Getting your COGS right is essential to calculating an accurate gross margin. COGS includes the direct costs tied to producing your product or service:
- Raw materials — the physical inputs that go into your product
- Direct labor — wages for employees who directly produce goods or deliver services
- Manufacturing overhead — factory utilities, equipment depreciation, and production supplies
- Packaging and shipping materials — costs directly associated with getting the product ready for sale
- Subcontractor costs — fees paid to third parties for production work
COGS does not include indirect expenses like:
- Office rent or utilities (unless it's a production facility)
- Marketing and advertising
- Administrative salaries
- Insurance premiums
- Interest on loans
Misclassifying expenses is one of the most common errors business owners make when calculating gross margin. If you include overhead in COGS, your gross margin will appear artificially low. If you leave out legitimate production costs, it will look misleadingly high.
Gross Margin vs. Gross Profit vs. Other Margins
These terms get mixed up constantly, so here's a clear breakdown:
Gross Profit vs. Gross Margin
- Gross Profit is a dollar amount: Revenue minus COGS. If you earned $500,000 and COGS was $200,000, your gross profit is $300,000.
- Gross Margin is a percentage: Gross profit divided by revenue. In this case, 60%.
Both are useful, but gross margin is better for comparisons—across time periods, against competitors, or between product lines—because it normalizes for scale.
Gross Margin vs. Operating Margin
Operating margin goes a step further by subtracting operating expenses (SG&A, rent, marketing) from gross profit before dividing by revenue. It shows how profitable your core business operations are, including overhead.
Operating Margin = (Revenue − COGS − Operating Expenses) / Revenue × 100
Gross Margin vs. Net Margin
Net margin is the bottom line. It accounts for everything—COGS, operating expenses, interest, taxes, and one-time costs.
Net Margin = Net Income / Revenue × 100
Each margin tells a different part of the story:
| Metric | What It Measures |
|---|---|
| Gross Margin | Production efficiency |
| Operating Margin | Core business profitability |
| Net Margin | Overall profitability after all costs |
A business with high gross margins but low net margins might have a production cost advantage but suffer from bloated overhead or heavy debt. Tracking all three gives you a complete picture.
What Is a Good Gross Margin?
There's no universal "good" number—it depends heavily on your industry. Here are some general benchmarks:
| Industry | Typical Gross Margin |
|---|---|
| Software / SaaS | 70–85% |
| Professional services | 50–70% |
| Ecommerce / retail | 40–60% |
| Manufacturing (custom) | 32–45% |
| Manufacturing (standard) | 22–32% |
| Food and beverage | 25–40% |
| Construction | 18–25% |
| Grocery | 25–30% |
To put this in context with real-world examples: Apple reported a gross margin of approximately 47% in fiscal year 2025, while its higher-margin Services segment alone achieved around 75%. Amazon's gross margin reached roughly 50% in 2025, up from 42% in 2021—demonstrating how companies can meaningfully improve this metric over time.
The key takeaway: compare your gross margin to businesses in your specific industry. A 30% gross margin might be outstanding for a construction company but concerning for a SaaS business.
Why Gross Margin Matters for Your Business
1. It Reveals Pricing Power
If your gross margin is shrinking, it could mean your costs are rising faster than your prices. This is an early warning signal that you need to either raise prices or find ways to reduce production costs before the problem cascades into cash flow issues.
2. It Guides Strategic Decisions
When evaluating new products, services, or markets, gross margin helps you estimate whether the opportunity is worth pursuing. A new product line with a 20% gross margin in a business that typically operates at 55% needs a compelling strategic reason to justify the drag on overall profitability.
3. It Attracts Investors and Lenders
Investors and banks look at gross margin to assess scalability. A healthy gross margin suggests that as revenue grows, profit will grow proportionally—or even faster if you achieve economies of scale. Companies with gross margins above 40% are generally considered to have a durable competitive advantage.
4. It Highlights Product Mix Issues
Tracking gross margin by product line or service type can reveal which offerings are driving profitability and which are dragging it down. You might discover that your best-selling product has the worst margin, meaning high revenue isn't translating into proportional profit.
How to Calculate Gross Margin: Step-by-Step Example
Let's walk through a detailed example for a fictional small business, "Mountain Craft Furniture."
Annual financials:
- Total revenue: $800,000
- Wood and raw materials: $180,000
- Direct labor (craftspeople): $150,000
- Finishing supplies (stain, hardware): $30,000
- Workshop utilities (production-related): $20,000
Step 1: Calculate COGS
COGS = $180,000 + $150,000 + $30,000 + $20,000 = $380,000
Step 2: Calculate Gross Profit
Gross Profit = $800,000 − $380,000 = $420,000
Step 3: Calculate Gross Margin
Gross Margin = $420,000 / $800,000 × 100 = 52.5%
Mountain Craft Furniture retains 52.5 cents of every sales dollar after covering its direct production costs. This leaves $420,000 to cover rent, marketing, administrative salaries, insurance, and still generate a net profit.
7 Strategies to Improve Your Gross Margin
If your gross margin isn't where you want it to be, here are proven strategies to move the needle.
1. Revisit Your Pricing Strategy
Many small business owners underprice out of fear of losing customers. But if you haven't raised prices in two years while your costs have increased, your margins are silently eroding. Consider value-based pricing—pricing based on the worth your product delivers to customers rather than a simple markup over costs.
2. Negotiate Better Supplier Terms
Don't accept the first quote. Request volume discounts, explore alternative suppliers, and negotiate payment terms. Even a 5% reduction in material costs can meaningfully improve gross margin. Consolidating purchases with fewer suppliers can also increase your leverage.
3. Reduce Waste and Shrinkage
Waste in any form—spoilage, defects, theft, overproduction—directly erodes your gross margin. Implement inventory management systems to track materials precisely, conduct regular audits, and train staff on waste reduction techniques.
4. Optimize Your Product Mix
Not all products contribute equally to your bottom line. Analyze the gross margin of each product line and consider promoting higher-margin items more aggressively, bundling low-margin products with high-margin ones, or phasing out persistently unprofitable offerings.
5. Improve Operational Efficiency
Streamline production workflows, invest in automation where the ROI makes sense, and eliminate bottlenecks. Even small efficiency gains compound over time. Track production metrics like cost per unit, defect rates, and throughput to identify improvement opportunities.
6. Increase Average Order Value
Processing many small orders can erode margins through proportionally higher handling and fulfillment costs. Encourage larger orders through minimum order values, quantity discounts, or strategic upselling. The incremental cost of adding items to an existing order is typically lower than processing a separate order.
7. Monitor Margins Monthly
Gross margin isn't a set-it-and-forget-it metric. Inflation, supplier price changes, and shifts in product mix can quietly eat away at your margins. Review your gross margin monthly to catch trends early and respond before small problems become big ones.
Common Gross Margin Mistakes to Avoid
Ignoring COGS classification errors. Accidentally including operating expenses in COGS (or excluding legitimate production costs) will distort your gross margin and lead to poor decisions.
Comparing across industries without context. A 25% gross margin is excellent in grocery but alarming in software. Always benchmark within your industry.
Focusing solely on gross margin. A high gross margin doesn't guarantee profitability if your operating expenses are excessive. Track all three margins (gross, operating, and net) together.
Calculating only annually. Quarterly or monthly tracking catches seasonal patterns and emerging cost problems that annual calculations hide.
Keep Your Finances Organized from Day One
Understanding your gross margin starts with having accurate, well-organized financial records. Without clean data on revenue and costs, even the simplest margin calculation becomes unreliable. Beancount.io provides plain-text accounting that gives you complete transparency and control over your financial data—no black boxes, no vendor lock-in. Get started for free and see why developers and finance professionals trust plain-text accounting for clear, auditable financial tracking.
