Cost of goods sold, usually written COGS, is the cost a business incurred to produce or acquire the specific goods it sold during a period. It excludes the cost of goods it still holds, which remains inventory, an asset, until it is sold. The figure matters twice over: on a profit and loss statement it is the first subtraction from revenue, producing gross profit, and on a tax return it reduces gross receipts before any other expense is considered. The IRS gives it a dedicated section of Schedule C (Form 1040), Part III, and its instruction is that in most cases a business "in which the production, purchase, or sale of merchandise was an income-producing factor" must take inventories into account at the beginning and end of the tax year in order to compute it.
COGS
COGS, or cost of goods sold, is what a business paid for the specific goods it sold during a period. Subtracting it from revenue gives gross profit, which is the first and most revealing line of a profit and loss statement.
Quick Summary
- It is a cost of the goods sold, not of the goods bought. Inventory still on the shelf at year end is not in the figure; it is an asset until it sells.
- The computation on Schedule C runs beginning inventory, plus purchases, cost of labor, materials and supplies and other costs, less ending inventory.
- Revenue minus COGS is gross profit. Everything else the business spends, rent, insurance, advertising, office costs, comes out after that line.
- Which costs count is the judgment. Direct product and production costs go in; overheads that would be incurred whether or not anything sold generally do not.
- A small business taxpayer under the gross-receipts test can choose not to keep an inventory for tax purposes at all, which changes when the cost is deducted.
Definition
Advanced Explanation
The arithmetic is a bracket around the year. Schedule C Part III starts at line 35 with inventory at the beginning of the year, adds purchases less the cost of anything the owner withdrew for personal use at line 36, adds cost of labor at line 37 with the express instruction "do not include any amounts paid to yourself," adds materials and supplies at line 38 and other costs at line 39, and totals those at line 40. Line 41 is inventory at the end of the year, and line 42 subtracts it to give cost of goods sold, which carries up to line 4 of the form. Reading it as a flow rather than a formula makes it obvious: what you started with, plus what you added, less what is left, is what went out the door.
Classifying a cost correctly is where judgment enters, and the line is between costs that attach to the product and costs that do not. Raw materials, the purchase price of merchandise bought for resale, freight to get goods in, and the wages of the people who make or assemble the product are product costs. The rent on the sales office, the bookkeeper's salary, advertising and insurance are period costs, deducted as ordinary business expenses rather than through cost of goods sold. The distinction is not cosmetic, because a product cost is held in inventory until the item sells while a period cost is deducted now. A business that misclassifies its production wages as overhead reports a flattering gross margin and an understated inventory, and neither figure will support a lending conversation.
Because inventory sits at both ends of the calculation, the way a business decides which costs left with the goods changes the answer. IRS Publication 538 describes three ways of identifying cost. Where each item can be matched to its own invoice, the specific-identification method uses that item's actual cost. Where identical goods are mixed together and cannot be traced to particular invoices, the business assumes an order instead. First-in, first-out (FIFO) treats the goods bought or produced earliest as the first ones sold, so closing inventory carries the most recent costs. Last-in, first-out (LIFO) treats the most recent goods as the first ones sold, so closing inventory carries the oldest. In the publication's words, when prices are rising "LIFO will produce a larger cost of goods sold and a lower closing inventory," FIFO does the reverse, and in a period of falling prices the opposite holds. Both methods divide the same purchase costs between the goods sold and the goods still on hand; what differs is which costs land in this year's profit and which wait on the shelf. (The same name is used for an unrelated rule about which shares of stock an investor is treated as selling; that rule does not govern inventory.)
LIFO comes with conditions FIFO does not. Section 471 of the Internal Revenue Code requires inventories wherever the IRS considers them necessary "clearly to determine the income" of a business, and section 472 then permits LIFO only for goods "specified in an application," which is Form 970 (or a statement carrying the same information) filed with the timely filed return for the first year the method is used. LIFO goods are inventoried at cost, so the lower of cost or market is not available for them. Once adopted, the method stays in place for later years unless the IRS approves a change, or ends it because the conformity requirement was broken. And the statute adds a conformity requirement: a business using LIFO for tax may not use a different inventory method to work out its income for the year in reports to its owners or for credit purposes. Regulations section 1.472-2(e) allows some exceptions, such as supplementary disclosure and balance-sheet values, but the practical point stands: a business cannot show its lender a FIFO profit as its income for the year while reporting a LIFO figure to the IRS. Publication 538 itself calls the LIFO rules "very complex." Schedule C's line 33 asks which method the business used to value closing inventory, offering cost, the lower of cost or market, or another method with an explanation attached, and line 34 asks whether anything changed between opening and closing inventory. Changing an inventory method is a change of accounting method, which is made on Form 3115 rather than simply started.
The small business exception is the part most sole proprietors need and relatively few know. It comes from section 471(c), added in 2017, which switches off the general inventory requirement for a business that meets the section 448(c) gross-receipts test; for a sole proprietor the test is applied to each trade or business separately, as if each were a corporation or partnership. A small business taxpayer, defined for this purpose as one with average annual gross receipts of $32,000,000 or less for the three prior tax years and that is not a tax shelter, "can choose not to keep an inventory, but you must still use a method of accounting for inventory that clearly reflects income." The instructions then say what satisfies that: treating inventory as non-incidental materials and supplies, under which the amounts paid are deducted in the year the items are first used or consumed, or conforming to the treatment in the business's own financial statements or books. The threshold is indexed each year. The practical effect is a timing one rather than a change in what is ultimately deductible, and it removes the year-end counting exercise for businesses whose inventory is small enough that the exercise costs more than it reveals.
How to Remember
Sold is the operative word. What is still on the shelf on December 31 is inventory, not a cost, however long ago it was paid for.
Used in a Sentence
“The margin looked thin until she checked the books and found the delivery driver's wages had been coded into cost of goods sold rather than into operating expenses.”
How It Works
Count the inventory on hand at the start of the year, at cost.
Add what was bought or produced during the year: purchases net of anything withdrawn for personal use, the cost of production labor, materials and supplies, and other direct costs.
Count the inventory on hand at the end of the year, using a consistent valuation method.
Subtract the ending inventory from the total, and the result is cost of goods sold for the year.
Subtract it from revenue to get gross profit, which is the figure the rest of the business's expenses are then measured against.
For example: a bicycle shop starts the year with $42,000 of inventory, buys $186,000 of bikes and parts, spends $8,000 on materials and supplies used in assembly and $4,000 on inbound freight, and pays no separate production labor. Its line 40 total is $42,000 + $186,000 + $8,000 + $4,000 = $240,000. It counts $51,000 of inventory at year end, so cost of goods sold is $240,000 − $51,000 = $189,000. Against $340,000 of sales, gross profit is $340,000 − $189,000 = $151,000, a gross margin of about 44 percent. Note what happens if the shop had bought the same $186,000 of stock but sold less of it, ending with $80,000 of inventory instead: cost of goods sold falls to $160,000 and reported gross profit rises, even though the shop has more cash tied up on the floor and less in the bank. The figure follows the goods, not the money.
Take an example of how the inventory method moves the figure. A hardware supplier opens the year with 100 identical units that cost $20 each ($2,000), buys 200 more in the spring at $22 ($4,400) and 200 in the fall at $25 ($5,000), and sells 400 at $40 each, for $16,000. It had 500 units costing $11,400 in all, and 100 are left at year end. Under FIFO the 100 left are the fall units, so closing inventory is 100 × $25 = $2,500 and cost of goods sold is $11,400 − $2,500 = $8,900, leaving gross profit of $16,000 − $8,900 = $7,100. Under LIFO the 100 left are the opening units, so closing inventory is 100 × $20 = $2,000 and cost of goods sold is $11,400 − $2,000 = $9,400, leaving gross profit of $6,600. With costs rising through the year, LIFO reports $500 more cost of goods sold and $500 less gross profit; the $500 has not disappeared, it is the difference between the two closing inventory values.
Pros and Cons
Pros
- Gross profit is the most diagnostic single number a product business has, and it cannot be computed without this figure.
- Tracking it by product line shows which items are worth selling, which a bottom-line profit figure never reveals.
- It matches cost to sale, so the cost of an item is recognized in the period that item earned revenue rather than the period it was bought.
- Lenders and buyers read gross margin before anything else, so a business that computes this correctly is easier to finance and easier to sell.
Cons
- It requires inventory records at both ends of the period, which is real administrative work for a small shop.
- The classification of borderline costs is a judgment, and an inconsistent one makes gross margin incomparable from year to year.
- Reported gross profit moves with the inventory valuation method as well as with trading, so two honest businesses can report different margins on identical activity.
- It does not apply cleanly to a service business, which has no goods, so the line is often left empty and the analogous costs sit among ordinary expenses.
Commonly Confused With
-
First-In, First-Out
That page is about selling stock: the default rule that treats a sale of shares as coming from the earliest lot bought, for figuring the capital gain. Inventory FIFO, explained on this page, decides which purchase costs go into cost of goods sold, and the stock rule does not govern it.
People Also Asked
Answers to the most frequently asked questions.
How is cost of goods sold calculated?
What costs belong in COGS and what does not?
What is the difference between COGS and operating expenses?
Does a small business have to track inventory to claim COGS?
Does a service business have cost of goods sold?
Sources
AdviceOnly maintains high editorial standards to improve the quality and accuracy of our educational content. Content is written with the assistance of artificial intelligence tools following a rigorous quality assurance process, and periodically reviewed by credentialed and experienced human financial advisors. References used include government data, academic papers, interviews with industry experts, and reputable primary sources. You can learn more about our efforts to produce accurate content in our editorial policy.
- Internal Revenue Service. "Instructions for Schedule C (Form 1040), Profit or Loss From Business."
- Internal Revenue Service. "Schedule C (Form 1040), Profit or Loss From Business."
- Internal Revenue Service. "Publication 538, Accounting Periods and Methods."
- U.S. Code. "26 U.S.C. § 471 — General rule for inventories."
- U.S. Code. "26 U.S.C. § 472 — Last-in, first-out inventories."
- Code of Federal Regulations. "26 CFR § 1.472-2 — Requirements incident to adoption and use of LIFO inventory method."
- Internal Revenue Service. "Form 970, Application To Use LIFO Inventory Method."
- Internal Revenue Service. "Internal Revenue Bulletin 2025-45."
- U.S. Securities and Exchange Commission. "Beginners' Guide to Financial Statements."
Have a question a definition can't answer?
We built this glossary to help you make better decisions about your money and your life. When a definition and an example aren't enough, one of our advice-only financial planners can tell you what it means for your situation. The only thing you pay for is the advice: a flat fee you agree to up front, with no commissions and no percentage of your investments.