Cost of goods sold is the total direct cost a business incurs to produce or acquire the products it actually sold during the year. Subtract it from revenue and you have gross profit, which is why the number sits at the top of the income statement and why the IRS scrutinizes it. Overstate it and you understate taxable income; understate it and you overpay. Getting the definition, the formula, and the valuation method right is the whole job.
What Counts Toward COGS
For manufacturers and producers, IRS Publication 334 groups eligible costs into several categories reported on Schedule C:
- Raw materials and parts purchased for manufacture into a finished product, including components and subassemblies.
- Direct and indirect production labor, covering assembly-line workers and production support staff.
- Materials and supplies consumed in manufacturing, such as hardware, chemicals, and other consumables.
- Containers and packaging that form an integral part of the finished product.
- Freight-in: shipping, express delivery, and cartage costs on raw materials, production supplies, and merchandise purchased for resale.
- Factory overhead, including rent, utilities, insurance, depreciation, property taxes, and maintenance tied to the production facility.
Retailers have a simpler picture. COGS is mostly the wholesale price of merchandise held for resale, plus freight-in to get it to the warehouse or storefront.1Internal Revenue Service. Publication 334 – Tax Guide for Small Business
Supporting documents have to back every number. Cancelled checks, invoices, cash register receipts, and credit card slips all qualify as proof that the amount was paid and that the expense was for inventory.2Internal Revenue Service. Publication 583 – Starting a Business and Keeping Records
What Stays Out
Costs that don’t flow directly into making or acquiring the product belong in selling, general, and administrative expenses instead. Sales commissions, marketing, advertising, executive and office salaries, corporate office rent, general utility bills, and legal fees all sit here. They’re still deductible; they just come off after gross profit, not before it.
Research and development for future products is also outside COGS. The category is about what it cost to produce items you actually sold this year, not what you spent exploring what you might sell next year. Mixing the two inflates COGS, understates gross profit, and invites audit scrutiny.
The COGS Formula
Schedule C lines 35 through 42 walk sole proprietors through the calculation in order:
- Beginning inventory: the value of all products and materials on hand at the start of the year. This has to match last year’s ending inventory exactly.
- Plus purchases during the year, minus the cost of anything withdrawn for personal use.
- Plus direct and indirect production labor.
- Plus materials, supplies, freight-in, containers, and other production overhead.
- Minus ending inventory: the value of everything still on hand at year’s end.
- Equals cost of goods sold.
The logic is simple. Add everything that was available for sale, subtract what didn’t sell, and you have the cost of the goods that went out the door.1Internal Revenue Service. Publication 334 – Tax Guide for Small Business
The framework rests on Section 471 of the Internal Revenue Code, which requires businesses to maintain inventories when the IRS determines they’re needed to clearly reflect income, and those inventories have to conform to best accounting practices for the taxpayer’s trade or business.3Office of the Law Revision Counsel. 26 USC 471 – General Rule for Inventories
Inventory Valuation Methods
Two businesses with identical physical inventory can post very different COGS numbers depending on how they assign costs to units. The method you pick decides which purchase prices flow to sold goods and which stay on the balance sheet.
First-In, First-Out
FIFO assumes the oldest inventory sells first. When prices are rising, that pushes cheaper older costs into COGS and leaves higher recent costs in ending inventory. The result is lower COGS, higher gross profit, and a bigger tax bill. Most businesses default to FIFO because it mirrors how goods actually move through a warehouse.
Last-In, First-Out
LIFO flips the assumption: the most recent purchases are treated as sold first. During inflation, that shifts the highest costs into COGS and lowers taxable income. The trade-off is that balance-sheet inventory values get stuck at older, lower costs.
LIFO carries a conformity rule that catches many businesses off guard. If you elect it for tax purposes, you have to use it in your financial statements to shareholders, lenders, and other outside parties, including consolidated statements where a subsidiary uses LIFO.4Office of the Law Revision Counsel. 26 USC 472 – Last-In, First-Out Inventories Violating conformity can result in the IRS forcing you off LIFO entirely.5Internal Revenue Service. LIFO Conformity Electing LIFO requires filing Form 970 with the return for the first year you want to use it.6Internal Revenue Service. Application To Use LIFO Inventory Method (Form 970)
Weighted Average Cost
This method divides the total cost of all goods available for sale by the total number of units, producing a blended per-unit cost that applies equally to sold goods and remaining inventory. It smooths price swings and fits businesses selling interchangeable products, such as grain elevators, chemical suppliers, and hardware distributors, where tracking individual lot costs is impractical.
Lower of Cost or Market
This is a valuation adjustment layered on top of FIFO or weighted average rather than a standalone method. You compare each item’s cost to its current market value, meaning current replacement cost at your usual purchase volumes, and record whichever is lower. It’s not available to LIFO users.7eCFR. 26 CFR 1.471-4 – Inventories at Cost or Market, Whichever is Lower
Switching Methods
Once you adopt a valuation method, you have to use it consistently. Switching between methods requires filing Form 3115 to request a change in accounting method. The IRS treats inventory valuation as a method of accounting, so you can’t just change approaches from one year to the next without approval.
Uniform Capitalization Rules
For larger businesses, Section 263A adds complication. Any business that produces property or acquires it for resale must capitalize both direct costs and a proper share of indirect costs into inventory. Capitalized costs sit in inventory until the goods are sold; only then do they flow into COGS.8Office of the Law Revision Counsel. 26 USC 263A – Capitalization and Inclusion in Inventory Costs
The indirect costs at issue go well beyond obvious factory expenses. Purchasing department salaries, quality control, warehousing, insurance on production equipment, factory administrative expenses, and a share of mixed-use costs like shared facilities can all fall in. The Schedule C instructions spell it out: businesses subject to 263A must reduce their claimed expenses by the amounts capitalized into inventory.9Internal Revenue Service. Instructions for Schedule C (Form 1040)
The practical effect is real. A manufacturer that deducts warehouse rent as a current-year expense instead of capitalizing a portion into inventory has overstated deductions and understated COGS. The total dollars are the same either way; timing is where the tax liability lives.
Small Business Simplification
Smaller businesses get relief from both the inventory rules and the uniform capitalization rules. Under Section 471(c), a business that meets the gross receipts test can skip traditional inventory accounting. The test uses average annual gross receipts over the prior three tax years. For 2026, the threshold is $32 million.3Office of the Law Revision Counsel. 26 USC 471 – General Rule for Inventories
Businesses below the threshold have two simplified options. The first treats inventory as non-incidental materials and supplies, meaning you deduct the cost of goods when you first use or consume them, without maintaining formal inventory accounts.10Internal Revenue Service. Tangible Property Final Regulations The second matches your financial statement method: if you prepare audited or reviewed statements, you use whatever inventory method those statements reflect, and businesses without formal financial statements follow their own internal books and records.
The same gross receipts test also exempts qualifying businesses from Section 263A, which removes the most labor-intensive piece of COGS accounting for smaller operations.8Office of the Law Revision Counsel. 26 USC 263A – Capitalization and Inclusion in Inventory Costs Tax shelters are excluded from the simplified methods regardless of their gross receipts, and moving to a simplified method is itself a change in accounting method that requires Form 3115.
Write-Downs for Damaged or Obsolete Inventory
Inventory doesn’t always hold its value. Products go obsolete, raw materials spoil, and market prices drop below what you paid. Using lower of cost or market, you compare each item on hand at the inventory date to its replacement cost and record whichever is lower.7eCFR. 26 CFR 1.471-4 – Inventories at Cost or Market, Whichever is Lower
For merchandise you’re actively selling at reduced prices, inventory can be valued at those reduced prices minus selling costs. The IRS checks the markdowns against your actual sales for a reasonable period before and after the inventory date, so the pricing needs to be real, not aspirational.
Obsolete inventory can generate an immediate deduction. You must offer the item for sale at the written-down price for at least 30 days after the inventory date, but you don’t have to scrap it. This write-down option isn’t available to LIFO users.
Where To Report COGS
How you report depends on entity type. Sole proprietors and single-member LLCs calculate COGS in Part III of Schedule C (Form 1040), where it reduces gross receipts to arrive at gross income before any other deductions.1Internal Revenue Service. Publication 334 – Tax Guide for Small Business Corporations, S corporations, and partnerships file Form 1125-A and attach it to their entity return (Form 1120, 1120S, or 1065).11Internal Revenue Service. About Form 1125-A, Cost of Goods Sold
Because COGS reduces gross receipts before you reach adjusted gross income, every legitimate dollar of it cuts the tax base more efficiently than a below-the-line deduction. That’s why overstating COGS is one of the more consequential reporting errors a business can make.
Penalties and Records
If incorrect COGS reporting causes a substantial understatement of income tax, the IRS imposes an accuracy-related penalty equal to 20 percent of the underpayment. For most taxpayers, a substantial understatement means the shortfall exceeds the greater of 10 percent of the tax that should have been reported or $5,000.12Office of the Law Revision Counsel. 26 USC 6662 – Imposition of Accuracy-Related Penalty on Underpayments
Documentation is the best protection. Keep invoices, purchase orders, freight bills, payroll records for production workers, and records of any inventory write-downs or adjustments. The IRS doesn’t require a specific recordkeeping system, but the records have to clearly show income and expenses and be retained as long as they may be needed, generally at least three years after the return is filed.2Internal Revenue Service. Publication 583 – Starting a Business and Keeping Records