What Gross Margin Is and Why It Matters
Gross margin is the percentage of revenue left over after you subtract the direct cost of making or buying what you sell. It tells you how much profit you keep on each dollar of sales before paying for overhead like rent, salaries, or marketing. A higher gross margin means you are keeping more money from each sale; a lower one means your costs to produce or acquire goods are eating up most of your revenue.
Gross margin is different from gross profit. Gross profit is a dollar amount—the raw money left after subtracting costs. Gross margin is that same amount expressed as a percentage of total revenue, which makes it easier to compare your performance over time or against other businesses in your industry.
Key Takeaways
- Gross margin is calculated by subtracting cost of goods sold from revenue, then dividing the result by revenue and multiplying by 100 to get a percentage.
- Cost of goods sold includes only the direct costs of producing or acquiring inventory—materials, labor, and manufacturing overhead—not operating expenses like rent or utilities.
- A typical gross margin varies widely by industry; retail often runs 20–40 percent, while software or services can exceed 70 percent.
- Tracking gross margin over time helps you spot whether your production costs are rising, your pricing is slipping, or your efficiency is improving.
The Formula and a Real Example
The formula for gross margin is straightforward:
(Revenue − Cost of Goods Sold) ÷ Revenue × 100 = Gross Margin %
Suppose you run a bakery. In one month, you sell $10,000 worth of bread and pastries. The flour, yeast, butter, eggs, and packaging you bought to make those items cost you $4,000. Your gross profit is $10,000 − $4,000 = $6,000. Your gross margin is ($6,000 ÷ $10,000) × 100 = 60 percent. That means 60 cents of every dollar you take in goes toward covering your other costs and profit; 40 cents goes to the direct cost of the goods themselves.
If next month you sell $10,000 again but your ingredient costs rise to $5,000, your gross margin drops to 50 percent. That five-percentage-point drop signals that either your supplier prices went up, you are using more material per item, or you are not raising your menu prices to match rising costs.
What Counts as Cost of Goods Sold
Cost of goods sold (COGS) includes only the expenses directly tied to making or acquiring the products you sell. For a bakery, that is flour, sugar, eggs, yeast, and packaging. For a retailer, it is the wholesale price you paid for inventory. For a manufacturer, it includes raw materials, factory labor, and the share of factory overhead that goes into each unit.
What does not count as COGS: rent for your storefront or office, your salary, insurance, utilities, advertising, delivery to customers, or office supplies. These are operating expenses, and they come out of your gross profit to determine your net profit. If you include them in COGS, your gross margin will be artificially low and misleading.
The line between COGS and operating expense can blur. If you employ someone who works only on the production line, their wages are COGS. If you employ a manager who oversees the whole operation, their salary is an operating expense. If you rent a factory where you make goods, the rent is part of COGS; if you rent an office where you run the business, it is an operating expense.
How to Gather the Numbers You Need
To calculate gross margin, you need two pieces of data: total revenue and total cost of goods sold for the same time period. Most accounting software—QuickBooks, Xero, FreshBooks, or Wave—can pull these numbers automatically from your income statement.
If you track finances manually, revenue is the total amount customers paid you (or owe you on invoices) during the period. COGS is the sum of all invoices from suppliers for materials and direct labor. Many small business owners keep a spreadsheet of purchases and categorize them as either COGS or operating expense as they go, which makes the calculation straightforward at month-end.
Be consistent about the time period. You can calculate gross margin for a single month, a quarter, a year, or any stretch that makes sense for your business. Monthly is common because it shows trends quickly; annual is common for comparing year to year.
What a Healthy Gross Margin Looks Like
Gross margin varies dramatically by industry, so comparing your margin to a competitor's is more useful than comparing to a general benchmark. Grocery stores often operate on 20–30 percent gross margin because they buy inventory at wholesale and sell it at a small markup. Software companies often see 70–90 percent because once the software is built, the cost to deliver it to one more customer is nearly zero. A restaurant might run 60–70 percent gross margin on food cost alone, but that does not account for labor, which is often counted separately.
Within your own business, the trend matters more than the absolute number. If your gross margin has held steady at 55 percent for two years and then drops to 50 percent, something has changed—supplier costs, your pricing, or your efficiency. That is a signal to investigate. If your margin is rising, you are either negotiating better prices, raising prices, or improving how you use materials.
Using Gross Margin to Make Business Decisions
Gross margin helps you decide whether a product line is worth keeping. If one product has a 70 percent gross margin and another has 30 percent, the high-margin product is more valuable to your business, even if both sell the same volume. You might decide to push sales of the high-margin item or discontinue the low-margin one.
Gross margin also tells you how much room you have to absorb rising costs or to invest in growth. A business with 80 percent gross margin can handle a 10 percent rise in material costs and still stay profitable. A business with 25 percent gross margin cannot. If you are planning to lower prices to win market share, gross margin shows you how far you can go before you start losing money on each sale.
Finally, gross margin is one of the first things lenders and investors look at. A healthy, stable gross margin signals that your core business model works. A declining margin signals trouble ahead.
Frequently Asked Questions
Is gross margin the same as markup?
No. Markup is the percentage increase from cost to selling price. If you buy something for $100 and sell it for $150, the markup is 50 percent. Gross margin on that same sale is ($150 − $100) ÷ $150 = 33 percent. Markup is always higher than gross margin because the denominator is different. Markup divides by cost; gross margin divides by revenue.
Should I calculate gross margin by product or by the whole business?
Both. Calculating gross margin for your entire business tells you whether the business is fundamentally sound. Calculating it by product or product line tells you which items are most profitable and where to focus. Many businesses track both monthly.
What if my gross margin is negative?
A negative gross margin means you are spending more to make or buy your products than you are taking in from sales. This can happen temporarily during a startup phase or if you are selling at a loss to build market share, but it is not sustainable long-term. You need to either raise prices, lower your cost of goods, or both.
How often should I recalculate gross margin?
Monthly is standard for most businesses because it shows trends quickly and helps you catch problems early. If your business is seasonal or highly volatile, you might track it weekly. Annual gross margin is useful for comparing year to year, but waiting a full year to spot a problem is risky.