To calculate cost of goods sold from an income statement, take your beginning inventory, add purchases made during the period, and subtract ending inventory. On a multi-step income statement, COGS is already broken out as the first deduction below net sales, and the difference between those two lines is your gross profit. If the statement uses a single-step format that lumps expenses together, COGS won’t appear as its own line, and you’ll need the balance sheet and purchasing records to work it out yourself.
Where COGS Sits on the Statement
A multi-step income statement layers profitability. Net sales (total revenue minus returns and discounts) is at the top. Cost of goods sold comes immediately below. Subtract one from the other and you have gross profit, which is the money left before operating expenses like rent, office payroll, and marketing.
Single-step statements don’t separate COGS from other expenses. You cannot extract the number from that format directly. You have to reconstruct it: pull beginning and ending inventory values from the balance sheet, pull purchase totals from the general ledger or purchasing records, and run the formula.
The Formula and a Worked Example
The calculation mirrors the line items on IRS Form 1125-A:
Beginning Inventory + Purchases − Ending Inventory = Cost of Goods Sold1Internal Revenue Service. Form 1125-A Cost of Goods Sold
Say a business starts the quarter with $10,000 in inventory, buys $25,000 of goods during the quarter, and ends with $8,000 unsold. COGS is $10,000 + $25,000 − $8,000 = $27,000. That $27,000 is what belongs on the income statement directly under revenue.
Beginning inventory is the total dollar value of goods on hand at the start of the period. It must match the ending inventory reported at the close of the previous period. If those two numbers don’t tie, reconcile before you go further; nothing downstream will be right.
Purchases cover every acquisition made during the period for resale, plus inbound shipping charges, less any returns or allowances. For manufacturers, this figure also captures raw materials, direct labor, and allocated manufacturing overhead. Form 1125-A separates purchases from labor, additional Section 263A capitalized costs, and other production costs before totaling them and subtracting ending inventory. The math is the same; the form just forces sharper categorization.
Ending inventory is the value of goods still unsold at the close of the period. Most businesses track this through inventory software, but a physical count remains the reliable check. The IRS permits estimates of shrinkage confirmed by a later physical count, provided the estimate is adjusted when the actual count comes in.2Office of the Law Revision Counsel. 26 USC 471 – General Rule for Inventories
What Belongs in COGS
Three categories of spending make up COGS. Direct materials are the raw resources or finished products bought for resale. Direct labor is the wages and benefits of the workers who physically build, assemble, or process those products. The welder on the production floor counts; the HR manager doesn’t. Manufacturing overhead covers production-related costs that support the process as a whole rather than a single unit: factory utilities, equipment depreciation, storage for raw components. These indirect production costs get allocated across units so each one carries its share.
Freight In, Freight Out
Shipping trips people up. Inbound freight, what you pay to get materials or inventory delivered to you, belongs in COGS. You can either add it to the cost of each item or track it in a separate freight-in account that rolls into COGS. Outbound freight, what you pay to ship products to customers, is a selling expense. It sits below gross profit, not above it.
What Stays Out
Selling, general, and administrative expenses do not belong in COGS. Office rent, marketing, executive salaries, legal fees, sales commissions, and office supplies are operating expenses that appear further down the statement. Rolling them into COGS inflates production costs on paper and distorts gross margin, which makes pricing decisions harder to evaluate.
How Your Inventory Method Changes the Answer
The formula is fixed, but the values you plug into “purchases” and “ending inventory” depend on the costing method you use. That method directly affects reported COGS, gross profit, and tax.
FIFO
First-in, first-out assumes the oldest inventory is sold first. When prices are rising, older costs flow through COGS, so COGS is lower and gross profit is higher. Ending inventory on the balance sheet reflects more recent costs, closer to current market value.
LIFO
Last-in, first-out assumes the newest inventory is sold first. In an inflationary period, this matches higher recent costs against revenue, producing a higher COGS and lower taxable income. Ending inventory on the balance sheet can end up carrying costs from years ago. A federal conformity rule applies: elect LIFO for tax purposes and you must also use it for financial reporting to shareholders and creditors.3Office of the Law Revision Counsel. 26 US Code 472 – Last-in, First-out Inventories
Weighted Average Cost
Weighted average calculates a single average cost per unit across everything available for sale during the period. Total cost of goods available divided by total units gives you a per-unit figure that you apply to both units sold and units remaining. The result smooths out price fluctuations and lands between FIFO and LIFO.
Whichever method you use, apply it consistently year to year. Changing methods requires IRS approval and can trigger adjustments to taxable income.
Shrinkage and Write-Downs
Physical counts almost always reveal less stock than records predict. The gap, called shrinkage, comes from theft, damage, spoilage, and administrative errors like scanning the wrong barcode. When you find it, the lost value gets recorded as an expense in the period it occurred and flows through COGS. If shrinkage is consistently large, break it out as its own line so you can watch it.
Write-downs are different. Under U.S. GAAP, if you use FIFO or weighted average, compare inventory’s carrying cost to its net realizable value (what you’d get selling it, minus the costs to complete and sell it). If net realizable value falls below what you paid, write the inventory down to that lower figure and recognize the loss immediately. Under LIFO, the comparison is against current replacement cost. U.S. GAAP does not permit reversing a write-down if prices later recover.
If You Sell Services Instead of Products
Service businesses don’t have traditional inventory, but the same logic applies to the costs directly tied to delivering the service. Accountants often label this “cost of revenue” or “cost of services” rather than COGS. For a consulting firm, that includes billable consultants’ wages and benefits, software licenses used directly on client work, and subcontractor fees. Indirect costs like the office manager’s salary or general marketing sit below gross profit. Anything directly tied to producing the revenue goes above the gross profit line; everything else goes below.
Reporting COGS on Your Tax Return
Where the figure lands on your return depends on your entity type. Corporations filing Form 1120 and partnerships filing Form 1065 must complete and attach Form 1125-A when claiming a COGS deduction.1Internal Revenue Service. Form 1125-A Cost of Goods Sold The form walks through beginning inventory, purchases, labor, additional Section 263A costs, other costs, and ending inventory on separate lines, then arrives at COGS as the difference.
Sole proprietors report COGS in Part III of Schedule C (Form 1040). The structure is similar: beginning inventory, purchases, labor, materials, and other costs, minus ending inventory. Schedule C also asks you to identify your inventory valuation method and disclose any change in how you determined quantities, costs, or valuations from the prior year.4Internal Revenue Service. 2025 Instructions for Schedule C (Form 1040)
One boundary worth noting: businesses whose average annual gross receipts over the prior three tax years don’t exceed $31 million (indexed for inflation) qualify as small business taxpayers and can choose not to keep a formal inventory at all, treating items as non-incidental materials and supplies instead.5Internal Revenue Service. Tax Guide for Small Business For those businesses, the calculation described here isn’t required, though many still track it internally to understand margins.