Cost of goods sold, usually shortened to COGS, is what the goods sold during a period cost the business to buy or to make. It follows what left the shelf rather than what was bought, so a period of heavy purchasing and light selling produces a large inventory balance and a small cost of goods sold.
It is a subtraction from sales rather than an ordinary expense, and that placement is where its meaning comes from. In a manufacturing, merchandising, or mining business, gross income means the total sales, less the cost of goods sold, plus any income from investments and from incidental or outside operations or sources (26 CFR 1.61-3(a)).
What Belongs Inside the Figure
The regulation that decides this answers separately for goods a business bought and goods it made, and the two answers are not the same.
For merchandise purchased. In the case of merchandise purchased since the beginning of the taxable year, cost means the invoice price less trade or other discounts, except strictly cash discounts approximating a fair interest rate, which may be deducted or not at the option of the taxpayer, provided a consistent course is followed, and to that net invoice price should be added transportation or other necessary charges incurred in acquiring possession of the goods (26 CFR 1.471-3(b)).
Freight in is therefore part of the cost of the goods, not a separate expense, and the cash discount is an election that has to be applied the same way every period rather than a choice made line by line.
That is not the end of the figure, and the regulation says so itself. For taxpayers acquiring merchandise for resale that are subject to the provisions of section 263A, it points onward for additional amounts that must be included in inventory costs (26 CFR 1.471-3(b)). Invoice price plus freight is the starting point rather than the answer.
For merchandise the business produced. In the case of merchandise produced by the taxpayer since the beginning of the taxable year, cost means the cost of raw materials and supplies entering into or consumed in connection with the product, expenditures for direct labor, and indirect production costs incident to and necessary for the production of the particular article, including in such indirect production costs an appropriate portion of management expenses, but not including any cost of selling or return on capital, whether by way of interest or profit (26 CFR 1.471-3(c)).
Read the last clause of that as carefully as the list. The regulation pulls an appropriate portion of management expenses in and pushes selling costs and any return on capital out, in the same sentence. Treating all overhead as excluded is as wrong as treating all of it as included. Here too the regulation ends by referring the treatment of production costs onward to the capitalization rules for more specific guidance (26 CFR 1.471-3(c)).
And for the opening balance. In the case of merchandise on hand at the beginning of the taxable year, cost means the inventory price of such goods (26 CFR 1.471-3(a)). Last year’s closing figure is this year’s opening one, which is why an error in a closing inventory misstates two periods rather than one.
What Never Belongs Inside It
The exclusion is stated in the gross income regulation rather than in the inventory rules, which is part of why it gets missed. The regulation runs two exclusions in one sentence. Gross income is determined without subtraction of depletion allowances based on a percentage of income to the extent that it exceeds cost depletion which may be required to be included in the amount of inventoriable costs, and without subtraction of selling expenses, losses or other items not ordinarily used in computing costs of goods sold, or amounts which are of a type for which a deduction would be disallowed under section 162(c), (f), or (g) in the case of a business expense (26 CFR 1.61-3(a)).
That second limb is the one worth pausing on. A payment that would be non-deductible as a business expense under those subsections cannot be rerouted into cost of goods sold to reach the same result. The route through inventory is closed as well as the route through deductions.
The costs of running the business as a whole, winning the sale, borrowing and paying tax all sit below the line instead, and which pool each falls into is set out in SG&A expenses and overhead.
Timing Is Fixed by the Method, Not by the Invoice
The cost of goods sold should be determined in accordance with the method of accounting consistently used by the taxpayer, so that, for example, an amount cannot be taken into account in the computation of cost of goods sold any earlier than the taxable year in which economic performance occurs with respect to the amount (26 CFR 1.61-3(a)).
That rules out the most common attempt at year-end management, which is to load a cost into the figure before the underlying performance has happened. The method decides when, and the method has to be applied consistently.
Approximation Is Allowed, in Named Cases Only
In any industry in which the usual rules for computation of cost of production are inapplicable, costs may be approximated upon such basis as may be reasonable and in conformity with established trade practice in the particular industry, and the regulation names the cases: farmers and raisers of livestock, miners and manufacturers who by a single process or uniform series of processes derive a product of two or more kinds, sizes, or grades whose unit cost is substantially alike, and retail merchants who use what is known as the retail method in ascertaining approximate cost (26 CFR 1.471-3(d)).
The permission is conditional on the usual rules being inapplicable, and the three cases are given as examples of that condition rather than as the whole of it. It is not a general licence to estimate.
How the Figure Is Actually Produced
Nothing above tells you the amount. Two further pieces do, and both are worked in full elsewhere rather than repeated here.
The arithmetic is one subtraction from a pool. Opening inventory plus everything added during the period is the cost of goods available for sale, and what is left after removing closing inventory is cost of goods sold, an identity worked through with the roll-forward in cost of goods available for sale.
The closing figure that drives it answers to both authorities at once, because US GAAP decides what the statements carry and federal tax law decides what the return reports, and the inventory rules of section 471 load the balance alongside the uniform capitalization rules (26 U.S.C. 471). That machinery, the small-taxpayer exit from it, and the Form 1125-A walk are in inventory accounting, which reads the form itself (IRS, Form 1125-A, Rev. November 2024).
And the flow assumption decides how the same pool splits, so two businesses with identical purchases can report different figures. That split is worked in LIFO vs FIFO and weighted average cost method.
Where It Lands
The subtraction produces the first subtotal on the statement and the first subtotal on the return. The statement subtotal is in gross profit, which also walks the corporate return’s own line order (IRS, Form 1120, 2025) and the sole proprietor’s (IRS, Schedule C (Form 1040), 2025). The wider caption a services business uses instead is in cost of revenue.
Common Questions
For purchased merchandise, the net invoice price plus transportation and other necessary charges incurred in acquiring possession (26 CFR 1.471-3(b)). For produced merchandise, raw materials and supplies, direct labor, and indirect production costs incident to and necessary for production, including an appropriate portion of management expenses but excluding any cost of selling or return on capital (26 CFR 1.471-3(c)).
Take the opening inventory, add everything capitalized into inventory during the period, and subtract the closing inventory. The identity and a worked roll-forward are in cost of goods available for sale, and which costs the tax rules force into the middle block are in inventory accounting.
Direct labor on produced merchandise is, and so is an appropriate portion of management expenses treated as indirect production cost, while any cost of selling is not (26 CFR 1.471-3(c)). A payroll line is therefore split by what the work was, not by who was paid.
Neither label is quite right, and the distinction matters when a business is arguing about a disallowed payment. It is a subtraction in arriving at gross income rather than a deduction from it (26 CFR 1.61-3(a)), and the same regulation closes the door on moving a payment that would be disallowed as a business expense under section 162(c), (f), or (g) into the figure instead.
Accountably places trained offshore accountants and tax preparers inside US CPA and EA firms, and a firm can put a real block of its own inventory and close work through a trial task before a client file depends on it.