Introduction
Gross margin looks like the most comparable number on an income statement: revenue, itself measured net of discounts and returns as explained in revenue on the income statement, less the cost of what was sold, as a percentage of revenue. It is also one of the least comparable, because there is no single rule for which costs belong in cost of goods sold (COGS) and which belong in operating expenses below it. Two retailers with identical economics can report gross margins ten points apart simply because one counts its warehouses and delivery network as a cost of sales and the other does not.
That makes COGS a line to read rather than accept. The costs inside it determine gross profit, the first measure of how much a company earns on what it sells, and every comparison of pricing power, product mix or production efficiency rests on it.
What Goes Into Cost of Goods Sold
For a business that makes or buys physical goods, COGS is the cost of the inventory that was sold during the period. Inventory itself is built up from the costs of getting products ready for sale, and those costs flow into COGS only when the goods are sold, under the matching logic described in recognition and matching. For a manufacturer, those product costs include:
- Direct materials: raw materials and components that become part of the product.
- Direct labor: wages of the workers who make it.
- Manufacturing overhead: factory rent, utilities, maintenance and the depreciation of production equipment, allocated to units produced.
- Inbound freight: the cost of getting materials and purchased goods to the factory or warehouse.
Under Accounting Standards Codification (ASC) 330, the inventory standard, fixed overhead is allocated to products based on the factory's normal capacity, so when output falls well below normal the unallocated overhead is expensed immediately instead of being parked in inventory. Abnormal costs such as idle facilities or excessive spoilage are likewise charged to the period. That rule matters in downturns: a manufacturer running its plants at half speed reports a sharp drop in gross margin even if its prices hold. Deciding which production costs become part of inventory is a specific case of the broader judgment covered in capitalizing vs expensing costs.
For service and software companies, the equivalent line is usually called cost of revenue: the costs of delivering the service, such as hosting and data center costs, customer support, implementation staff, payment processing or content licensing. Their gross margins are typically much higher than a manufacturer's, but the same question applies: which delivery costs did the company choose to include?
- Cost of goods sold (COGS)
The direct costs of the goods or services a company sold in a period: for products, the materials, labor and production overhead attached to the inventory sold; for services, the costs of delivering them. Revenue less COGS equals gross profit.
Gross Profit and What Gross Margin Tells You
Gross profit is revenue minus COGS, and gross margin divides it by revenue. Because COGS rises with volume while many operating expenses do not, gross margin is the cleanest measure of a product's economics: how much pricing power a company has, how efficiently it produces or sources, and how its mix of products is shifting. A rising gross margin can mean higher prices, cheaper inputs, better factory utilization or a shift toward higher-margin products; a falling one can mean the reverse, and the analysis lies in finding which.
- Gross margin
Gross profit divided by revenue, expressed as a percentage. It shows how much of each dollar of sales remains after the direct cost of the goods or services sold, before operating expenses, interest and tax.
That split between costs that move with volume and costs that do not also makes gross margin the starting point for operating leverage: a company with a high gross margin converts a large share of each additional dollar of revenue into operating profit once its fixed costs are covered. How the effect is measured, and why operating profit swings faster than revenue, is worked through in operating leverage explained.
Gross profit is also not a required line. Deloitte's guide to Securities and Exchange Commission (SEC) comment letters on financial statement presentation notes that a gross margin subtotal is not required on the face of the income statement, and that a company which presents one should not exclude depreciation and amortization from it. When cost of sales excludes depreciation, SEC staff guidance calls for the caption to say so, typically "exclusive of depreciation shown separately below." Many companies, Walmart among them, show no gross profit line at all, leaving the reader to compute it, as shown in how the income statement works.
Why Gross Margins Are Hard to Compare
The main obstacle to comparison is classification: companies decide, within the rules, whether certain costs sit in COGS or in operating expenses. Amazon is an instructive case. Its 2024 annual report explains that cost of sales primarily consists of the purchase price of consumer products, inbound and outbound shipping, sortation and delivery centers and certain digital content costs, while the costs of operating and staffing its fulfillment centers, physical stores and customer service, and payment processing, are reported in a separate fulfillment line. Recomputing gross profit on both bases changes the picture:
| Line item | As reported | Including fulfillment |
|---|---|---|
| Net sales | 637,959 | 637,959 |
| Cost of sales | (326,288) | (326,288) |
| Fulfillment, moved into cost of sales | 0 | (98,505) |
| Gross profit | 311,671 | 213,166 |
Gross margin of about 48.9% as reported and about 33.4% if fulfillment is treated as a cost of sales. Source: Amazon 2024 annual report.
Neither number is wrong. The reported figure follows Amazon's own classification; the alternative is closer to how many traditional retailers would present warehouse and distribution costs. A banker comparing Amazon's retail economics with a peer has to choose one definition and apply it to both, and still allow for the fact that Amazon's net sales include its cloud business, whose server and data center costs sit in a separate technology and infrastructure line.
The Usual Classification Differences
Fulfillment is one of several costs that companies place differently. The most common are:
- Shipping and handling: in cost of sales at some companies, in selling expenses at others.
- Depreciation and amortization: allocated into COGS by most manufacturers, shown separately by some companies.
- Stock-based compensation: follows the cash pay of the same employees, so awards to support or hosting staff sit in cost of revenue, yet many software companies highlight adjusted gross margins that exclude it.
- Warehousing, purchasing and quality control: treated as product costs by some, as overhead by others.
- Occupancy for retailers: store rent and buying costs included in cost of sales by many retailers, excluded by others.
The accounting policy note and the cost of sales discussion in management's discussion and analysis (MD&A) usually state the policy. Depreciation is the item most often missed, because it is rarely labeled inside cost of sales, and finding it is covered in where depreciation hides on the income statement; the cost lines below gross profit are covered in operating expenses: SG&A and R&D.
How Inventory Accounting Moves Gross Margin
For companies that hold inventory, the costing method also changes COGS. When prices are rising, last in, first out (LIFO) assigns the most recent, higher costs to the goods sold and reports a lower gross margin than first in, first out (FIFO), which assigns older, cheaper costs. The difference can be large in industries with volatile input prices, and companies using LIFO disclose a LIFO reserve that allows a conversion to FIFO, as covered in inventory costing methods.
Two other inventory effects show up in gross margin. Write-downs of obsolete or slow-moving inventory are usually charged to cost of sales, so a quarter with a large write-down shows a temporary margin drop. And because fixed factory overhead is absorbed into inventory, a manufacturer that builds inventory faster than it sells can show a temporarily higher gross margin, with the overhead released into COGS later when the inventory is sold.
Gross margin is one of a family of margins bankers track, each answering a different question, and the full set is compared in profitability margins. Read with its definition in hand, gross margin is the most direct window into a company's product economics; read without it, it can make two very similar businesses look completely different.


