Gross margin is your revenue minus the cost of goods sold, expressed as a percentage of revenue. The formula is straightforward: subtract your cost of goods sold (COGS) from your net sales, divide that result by net sales, then multiply by 100. If your business brought in $500,000 in revenue and spent $300,000 producing the goods you sold, your gross margin is 40%.
The Gross Margin Formula
Here’s the calculation broken into steps:
- Gross Profit = Net Sales − Cost of Goods Sold
- Gross Margin = (Gross Profit / Net Sales) × 100
Using concrete numbers: a company with $800,000 in net sales and $520,000 in COGS has a gross profit of $280,000. Divide $280,000 by $800,000 and you get 0.35, or a 35% gross margin. That means 35 cents of every revenue dollar remains after covering the direct costs of producing and delivering the product.
One common point of confusion: gross margin and gross profit are not the same thing. Gross profit is the dollar amount left after subtracting COGS ($280,000 in the example above). Gross margin converts that dollar figure into a percentage, which makes it far more useful for comparing performance across time periods, product lines, or competitors of different sizes.
What Counts as Cost of Goods Sold
Getting your gross margin right depends entirely on identifying which costs belong in COGS. The rule is simple in theory: COGS includes only the direct costs of producing or acquiring whatever you sell. Everything else is overhead.
Direct costs typically include:
- Raw materials and components: food ingredients at a restaurant, lumber for a construction firm, fabric for a clothing brand, or the wholesale price of items you resell.
- Direct labor: wages for employees who physically make, assemble, or deliver the product. Assembly line workers, kitchen staff, and freelancers hired to complete a specific client project all qualify.
- Production-specific equipment: a custom manufacturing mold for a new product, a rental tool for a construction job, or maintenance fees tied directly to production machinery.
- Packaging and shipping materials: to-go containers, boxes, labels, and anything else that becomes part of delivering the finished product to a customer.
Costs that do not belong in COGS include rent for your office, general utilities, administrative salaries (accountants, HR, management), company-wide insurance, marketing expenses, and depreciation on equipment not tied to a specific production activity. These are indirect costs, often called overhead or operating expenses. They affect your operating margin and net margin, but they should not appear in your gross margin calculation.
If you run a service business without physical products, your COGS equivalent is the direct cost of delivering the service. A consulting firm would include the hourly labor of consultants working on client projects, but not the salary of the office manager.
Where to Find the Numbers
If you’re calculating gross margin for a publicly traded company, pull up its income statement (also called a profit and loss statement). The top line is revenue or net sales. A few lines below, you’ll see cost of goods sold, sometimes labeled “cost of revenue” or “cost of sales.” Subtract COGS from revenue to get gross profit, which many companies report as its own line item. From there, the percentage calculation is simple division.
For your own business, the numbers come from your accounting software or bookkeeping records. Your revenue figure should reflect net sales, meaning total sales minus returns, discounts, and allowances. Your COGS should include only the direct costs described above. If your bookkeeping lumps direct and indirect costs together, you’ll need to separate them before the formula gives you a meaningful result.
Typical Gross Margins by Industry
Gross margin varies dramatically by industry, so knowing whether your number is “good” requires context. Data compiled by NYU Stern professor Aswath Damodaran provides useful benchmarks:
- Software: 62% to 72%, depending on whether the product is a system application, entertainment software, or internet-based platform. High margins reflect the low incremental cost of distributing digital products.
- Retail: ranges widely. Grocery and food retailers average around 26%, general retail sits near 33%, and specialty retail reaches about 35%. Automotive retail runs the lowest at roughly 22%.
- Manufacturing: machinery companies average around 37%, specialty chemicals about 35%, and electrical equipment near 32%. Auto and truck manufacturing is notably thin at roughly 10%.
- Professional services: business and consumer services average about 33%.
These benchmarks are averages. A well-run company in a low-margin industry can still be highly profitable by keeping overhead tight and generating high volume. A company with a 70% gross margin can still lose money if its operating expenses eat up the difference.
Using Gross Margin to Make Decisions
Gross margin becomes genuinely useful when you apply it rather than just calculate it. Here are the most practical applications.
Setting Prices
If you know your target gross margin and your cost per unit, you can back into the price you need to charge. The formula flips: divide your unit cost by (1 minus your target margin as a decimal). If a product costs you $30 to produce and you want a 50% gross margin, divide $30 by 0.50 to get a $60 selling price. This approach ensures your prices cover production costs and leave enough room for overhead and profit.
Comparing Product Lines
Calculate gross margin for each product or service you offer, not just the business as a whole. You might discover that your highest-revenue product actually carries your lowest margin, while a smaller product line generates far more profit per dollar sold. This kind of analysis helps you decide where to invest marketing dollars, which products to expand, and which to reconsider.
Tracking Trends Over Time
A single gross margin number is a snapshot. Comparing it quarter to quarter or year to year reveals whether your production is getting more efficient or more expensive. A declining gross margin could mean your material costs are rising, your suppliers have increased prices, or you’ve been discounting too aggressively. A rising gross margin might mean your volume has grown enough to negotiate better supplier rates, or you’ve streamlined your production process.
Evaluating Competitors
Because gross margin is a percentage, it lets you compare your efficiency against competitors regardless of company size. If a competitor in your industry runs a 45% gross margin while yours is 30%, that gap suggests they’re either sourcing cheaper, charging more, or producing more efficiently. Each possibility points to a different strategic response.
Gross Margin vs. Other Margin Metrics
Gross margin captures only the relationship between revenue and direct production costs. It ignores the rest of the expenses on your income statement. Two other margins fill in the picture:
- Operating margin subtracts all operating expenses (rent, salaries, marketing, depreciation) from revenue before dividing by revenue. It shows profitability after running the day-to-day business.
- Net margin goes one step further, subtracting interest, taxes, and any other expenses. It represents the percentage of revenue that becomes actual profit.
A company can have a strong gross margin and a weak net margin if its overhead, debt payments, or tax burden are high. All three margins matter, but gross margin is the starting point because it tells you whether the core economics of your product or service are sound before any other business expenses come into play.

