Cost of sales includes every expense directly tied to producing or acquiring what a business sold during the period: the raw materials and components in the product, the wages and payroll costs of the workers who made it, and the overhead that keeps the production facility running. Anything that would keep costing money whether or not you produced a single unit, like corporate marketing, executive salaries, or loan interest, stays out and is treated as an operating expense instead. What follows walks through each category that belongs in cost of sales, how service and software companies apply the same idea without physical inventory, and where the tax rules pull in costs you might not expect.
Direct Materials
Raw materials and purchased components are the largest piece of cost of sales for most manufacturers and retailers. A furniture maker’s lumber, hardware, and stain belong here. So do an electronics assembler’s circuit boards, screens, and wiring harnesses. The cost of these items is the purchase price plus freight paid to get them to your facility.
Materials only hit cost of sales when the finished product sells. If you buy $50,000 in materials in March but only sell products made from $30,000 of those materials, only $30,000 lands in March’s cost of sales. The remaining $20,000 sits in inventory. Businesses producing or acquiring merchandise for resale generally must maintain inventories and use this matching approach so that income is clearly reflected.1Office of the Law Revision Counsel. 26 USC 471 – General Rule for Inventories
Shrinkage is part of this category too. The statute lets businesses use estimates for theft, breakage, and spoilage as long as they perform regular physical counts and adjust the estimates based on actual results.1Office of the Law Revision Counsel. 26 USC 471 – General Rule for Inventories That is how most retailers reconcile what their system says they have against what is actually on the shelves.
Direct Labor
Direct labor covers the compensation of workers whose effort goes into making the product or delivering the service. Assembly line workers, machinists, welders, and production technicians all count. The person bolting together an engine is direct labor. The person in the corporate office processing payroll is not.
Wages are only the start. Employer-paid payroll taxes belong here as well: Social Security at 6.2% and Medicare at 1.45% on covered wages.2Internal Revenue Service. Topic No. 751, Social Security and Medicare Withholding Rates Those rates are set by statute.3Social Security Administration. Social Security and Medicare Tax Rates
Workers’ compensation premiums for production employees go in as well, and rates vary widely by industry and job classification. Health insurance contributions, retirement plan matches, and other fringe benefits paid on behalf of production workers get folded in on the same principle. If the benefit is attached to people who build the product, it is part of cost of sales. If it is attached to the sales team or executives, it is not.
Production Overhead
Production overhead is the indirect cost of keeping the manufacturing operation running. Electricity, water, and gas consumed by the production facility are the obvious items. Less obvious are the small supplies that never become part of the finished product: machine lubricants, safety gear, cleaning materials, and disposable tooling. Rent on the factory floor belongs here as well, though rent on the corporate office does not.
Depreciation on production machinery is often the single largest overhead line. Most businesses depreciate manufacturing equipment for tax purposes under the Modified Accelerated Cost Recovery System, which front-loads deductions into the equipment’s early years.4Internal Revenue Service. Publication 946, How To Depreciate Property The depreciation attached to production equipment flows into cost of sales; depreciation on office furniture or corporate computers does not.
Normal Versus Abnormal Spoilage
Not all waste is treated the same way. Normal spoilage, the breakage and scrap that inevitably occurs in a well-run operation, is built into inventory costs and flows through cost of sales when the finished goods sell. If a pottery manufacturer expects 3% of pieces to crack during firing, that 3% is a cost of making the good pieces.
Abnormal spoilage is different. A machine malfunction that ruins an entire batch, or a power outage that destroys temperature-sensitive materials, is expensed immediately as a period cost. Those losses never enter inventory and never appear in cost of sales.
Cost of Sales for Service and Software Companies
Service businesses have no physical inventory but still have cost of sales. The core component is the compensation of the professionals whose time generates client revenue: consultants, engineers, designers, and similar roles where billable hours drive income. Travel required for client engagements, such as flights and hotels for onsite work, is included as well.
Software-as-a-service companies have their own version. Cloud hosting fees are the functional equivalent of raw materials; if you stopped paying the monthly bill from providers like AWS or Azure, the product would stop working. Salaries of engineers who keep the production environment running, often called DevOps or infrastructure teams, belong here for the same reason. If a software company owns its own servers, depreciation on that hardware replaces hosting costs. Specialized licenses and third-party tools used exclusively to deliver client work or run the production application round out the category.
The test is the same one that applies to manufacturers. Would this cost disappear if you stopped producing or delivering the product? If yes, it belongs in cost of sales. If it would continue regardless, it is an operating expense.
What Stays Out of Cost of Sales
Knowing what belongs elsewhere is the other half of the answer. These are period costs, hitting the income statement when incurred regardless of production volume:
- Marketing and advertising. They generate demand but do not produce the product.
- Corporate office rent and utilities. Factory rent counts as production overhead; the headquarters lease does not.
- Executive and administrative salaries, including legal and human resources staff.
- Interest on business loans. Financing costs are reported separately.
- General business insurance policies covering the corporate office or general liability. Workers’ comp for production employees is different and does go into cost of sales.
Keeping these out gives investors and lenders a clean read on gross margin, which shows whether the product itself is profitable before the rest of the business’s overhead is layered on.
How Inventory Valuation Changes the Number
The method you use to value inventory changes the dollar amount of cost of sales, sometimes substantially, even when the underlying items included are identical. Three methods dominate:
- FIFO (first in, first out) assumes the oldest inventory sells first. When prices are rising, FIFO produces lower cost of sales and higher reported profit.
- LIFO (last in, first out) assumes the newest inventory sells first. In inflationary periods, LIFO produces higher cost of sales and lower taxable income.
- Weighted average blends the cost of all units available for sale during the period and sits between FIFO and LIFO in its effect on reported income.
LIFO comes with a conformity requirement. A business electing LIFO for tax purposes must also use LIFO in the financial statements it reports to shareholders and creditors.5Office of the Law Revision Counsel. 26 USC 472 – Last-in, First-out Inventories Violating that rule can force a business off LIFO entirely.6Internal Revenue Service. Practice Unit – LIFO Conformity
Businesses can also value inventory at the lower of cost or market, comparing the replacement cost of each item to what was paid and using whichever is lower. This matters most for goods that lose value quickly due to style changes, perishability, or market shifts. Damaged or shopworn goods must be valued at their realistic selling price minus the cost of selling them.7Internal Revenue Service. Practice Unit – Lower of Cost or Market
Uniform Capitalization Pulls in More Indirect Costs
Section 263A of the tax code requires businesses that produce property or acquire it for resale to capitalize both direct costs and a proper share of indirect costs into inventory. That goes beyond what many business owners expect. Beyond materials and labor, portions of storage costs, purchasing department expenses, and certain taxes allocable to production may have to be capitalized rather than deducted immediately.8Office of the Law Revision Counsel. 26 USC 263A – Capitalization and Inclusion in Inventory Costs of Certain Expenses The practical effect is that some costs a business owner would instinctively classify as overhead get pulled into inventory and only reach the income statement when the associated product sells.
Small businesses get a significant break. If average annual gross receipts over the prior three years do not exceed the inflation-adjusted threshold under Section 448(c), the business is exempt from Section 263A entirely.8Office of the Law Revision Counsel. 26 USC 263A – Capitalization and Inclusion in Inventory Costs of Certain Expenses That threshold is $32 million for the 2026 tax year. Qualifying businesses also gain the option to treat inventory as non-incidental materials and supplies or to follow the method reflected in their financial statements, simplifying what has to be swept into cost of sales.1Office of the Law Revision Counsel. 26 USC 471 – General Rule for Inventories