For a US business that makes or buys goods to sell, the cost of goods sold (COGS) formula is: beginning inventory + purchases and other direct costs − ending inventory = COGS. That figure drives gross profit on your books and, at tax time, flows through Part III of Schedule C (Form 1040) for sole proprietors or Form 1125-A for corporations and partnerships. The formula matters most for US retailers, ecommerce sellers, wholesalers, and manufacturers. The biggest limitation: it applies only when merchandise is an income-producing factor — a pure service business has no federal tax COGS — and qualifying small business taxpayers can elect simpler inventory treatment. This guide covers the calculation and the classification decisions; it leaves software selection and margin benchmarking to other guides.
Quick answer
Cost of goods sold is the cost of the inventory your business actually sold during a period, computed as: beginning inventory, plus purchases, direct labor, materials, and other direct costs, minus ending inventory. Net sales minus COGS gives gross profit. For federal taxes, sole proprietors compute COGS on Schedule C (Form 1040), Part III, lines 35 through 42; corporations and partnerships compute it on Form 1125-A, per IRS Publication 334 and About Form 1125-A (both accessed July 27, 2026). If no merchandise inventory exists, there is no tax COGS. For the broader sector context behind these numbers, see our industry finance guides for small businesses.
What is the cost of goods sold formula?
COGS measures what the goods you sold cost your business — not what you bought, and not what you spent overall. Purchases during the year land in inventory first; only the portion that actually leaves the shelf (or the production line) becomes COGS. The remainder stays on the balance sheet as inventory at year end.
In plain language and symbols:
COGS = beginning inventory + purchases + direct labor + materials and supplies + other direct costs − ending inventory
The federal tax forms use exactly this structure. Sole proprietors fill in Schedule C (Form 1040), Part III; C corporations, S corporations, and partnerships use Form 1125-A. The IRS is explicit about who files Form 1125-A — filers of Forms 1120, 1120-C, 1120-F, 1120-S, and 1065 — instructing them to:
“complete and attach Form 1125-A if the applicable entity reports a deduction for cost of goods sold.” — Internal Revenue Service, Form 1125-A instructions (Rev. November 2024)
Table 1: The COGS formula mapped to federal tax-form lines (as of July 2026).
| Formula component | Form 1125-A (corps/partnerships) | Schedule C (Form 1040), Part III |
|---|---|---|
| Beginning inventory | Line 1 | Line 35 |
| Purchases (less personal-use items) | Line 2 | Line 36 |
| Cost of labor | Line 3 | Line 37 |
| Materials and supplies | Line 5 (other costs) | Line 38 |
| Additional section 263A costs / other costs | Lines 4 and 5 | Line 39 |
| Total available | Line 6 | Line 40 |
| Ending inventory | Line 7 | Line 41 |
| Cost of goods sold | Line 8 | Line 42 |
Interpretation: the formula is not a convention you can reshape — the IRS prescribes the exact build-up, and the ending inventory you subtract on the return must be a valued count, not an estimate. IRS Publication 334 states:
“You must value your inventory at the beginning and end of each tax year to determine your cost of goods sold.” — Internal Revenue Service, Publication 334
On the income side, gross profit follows directly: on Schedule C, gross receipts minus returns and allowances give net sales (line 3), and line 5, gross profit, is net sales minus the COGS entered on line 4, per the Instructions for Schedule C (Form 1040) (accessed July 27, 2026).
Who must compute COGS — and who can skip inventory?
Under the federal rules in IRS Publication 538, Accounting Periods and Methods (accessed July 27, 2026):
“An inventory is necessary to clearly show income when the production, purchase, or sale of merchandise is an income-producing factor.” — Internal Revenue Service, Publication 538
Publication 538 adds that if you must account for an inventory, you must use an accrual method of accounting for your purchases and sales. Two carve-outs matter for small businesses:
- Small business taxpayer election. A business that is not a tax shelter and meets the gross-receipts test of Internal Revenue Code section 448(c) can choose not to keep a formal inventory. It must still use a method that clearly reflects income — for example, treating inventory as non-incidental materials and supplies, or conforming to its financial-statement treatment of inventory under section 471(c). Per Publication 334, the test was average annual gross receipts of $31 million or less over the 3 prior tax years for 2025; for tax years beginning in 2026 the inflation-adjusted figure is $32 million, per IRS Revenue Procedure 2025-32 (accessed July 27, 2026). Qualifying small business taxpayers are also exempt from the section 263A uniform capitalization rules, per the Form 1125-A instructions.
- Pure service businesses. The Schedule C instructions require inventories at the beginning and end of the year only if “the production, purchase, or sale of merchandise was an income-producing factor” in the business. A consultant, agency, or bookkeeping firm with no merchandise skips Part III entirely: gross profit on the return equals gross receipts, and delivery costs are deducted as ordinary expenses (wages, contract labor, supplies).
These are federal income-tax rules. Most states start their own income-tax computation from federal figures, but conformity varies, so confirm your state’s treatment with a qualified tax advisor before relying on it.
Which costs go into COGS — and which stay in operating expenses?
Classification is where most small-business COGS errors happen. The test: does the cost exist because the specific goods you sold exist? If yes, it belongs in inventory cost and flows into COGS when the goods sell. If the cost would exist anyway — to run the business generally — it is an operating expense deducted below gross profit.
Table 2: Direct costs (COGS) vs. operating expenses for a US product business.
| Cost | COGS (inventory cost) | Operating expense | Why |
|---|---|---|---|
| Merchandise purchased for resale | Yes | No | The goods themselves (Schedule C line 36) |
| Freight-in on inventory purchases | Yes | No | Direct cost of getting goods to you |
| Production / assembly labor | Yes | No | ”Cost of labor” (line 37) |
| Raw materials, production supplies | Yes | No | Materials and supplies (line 38) |
| Production overhead (factory rent, utilities, supervision) | Yes | No | Other costs (line 39); see note below |
| Office and administrative salaries | No | Yes | Runs the business, not the goods |
| Marketing, advertising, sales commissions | No | Yes | Selling costs, not production costs |
| Freight-out (shipping orders to customers) | No | Yes | Distribution cost incurred after sale |
| Office rent, insurance, professional fees | No | Yes | General and administrative |
| Interest, income taxes | No | Deducted below operating income | Financing and tax, not product cost |
Interpretation: only costs that attach to the goods belong above the gross-profit line. IRS Publication 334 confirms that for producers, the “other costs” bucket is broader than materials alone, listing overhead expenses such as rent, heat, light, power, insurance, depreciation, taxes, maintenance, labor, and supervision.
Two cautions. First, that production-overhead treatment applies to costs of the production activity — not the front office. Second, businesses above the small-business-taxpayer threshold must also capitalize certain purchasing, handling, storage, and mixed-service costs into inventory under section 263A (Form 1125-A line 4); small business taxpayers are exempt, per the form’s instructions. For a service firm, the same logic produces a management-reporting category — “cost of services” (direct delivery labor, subcontracted delivery, job materials) — while the tax return simply deducts those items as wages, contract labor, and supplies under the Schedule C instructions.
Worked examples: retail, manufacturer, and service COGS
Each example below is a hypothetical illustration with made-up inputs, computed on the accrual basis for a calendar tax year. The figures show method, not benchmarks.
Table 3: Hypothetical retail COGS — US home-goods store, year ended December 31, 2026 (made-up inputs).
| Step | Method | Amount |
|---|---|---|
| Beginning inventory (Jan 1 count, at cost) | physical count, valued at cost | $42,000 |
| Purchases of merchandise | supplier invoices, net of personal use | $268,000 |
| Freight-in | shipping on inventory purchases | $9,600 |
| Total goods available | $42,000 + $268,000 + $9,600 | $319,600 |
| Ending inventory (Dec 31 count, at cost) | physical count, valued at cost | ($51,000) |
| Cost of goods sold | $319,600 − $51,000 | $268,600 |
Output: COGS of $268,600. Note that the store spent $277,600 acquiring goods (purchases plus freight) but deducts only $268,600 — the $9,000 difference is the growth in inventory on hand, which stays on the balance sheet as an asset.
Table 4: Hypothetical manufacturer COGS — US metal-fabrication shop, year ended December 31, 2026 (made-up inputs; assumes the small business taxpayer exemption from section 263A).
| Step | Method | Amount |
|---|---|---|
| Beginning inventory (raw materials, work in process, finished goods) | valued at cost | $68,000 |
| Raw material purchases | supplier invoices | $155,000 |
| Direct production labor | wages of shop-floor staff | $120,000 |
| Production overhead | factory rent, utilities, supervision | $48,000 |
| Total available | $68,000 + $155,000 + $120,000 + $48,000 | $391,000 |
| Ending inventory | valued at cost | ($74,000) |
| Cost of goods sold | $391,000 − $74,000 | $317,000 |
Output: COGS of $317,000. The manufacturer’s COGS includes labor and overhead because production converted materials into the goods sold — a small reseller does not add its stockroom wages to inventory, but a producer adds production wages to it.
Table 5: Hypothetical service firm — US IT consultancy, year ended December 31, 2026 (made-up inputs; management reporting view, not a tax computation).
| Step | Method | Amount |
|---|---|---|
| Tax COGS | no merchandise inventory — Part III not completed | $0 |
| Direct delivery labor | consultant wages on client work | $210,000 |
| Subcontracted delivery | 1099 specialists on engagements | $60,000 |
| Job materials | hardware and licenses resold at cost in projects | $15,000 |
| Management “cost of services” | $210,000 + $60,000 + $15,000 | $285,000 |
Output: on the federal return there is no COGS line and gross profit equals gross receipts; on management reports, cost of services of $285,000 against $600,000 of revenue gives a 52.5% delivery margin (($600,000 − $285,000) ÷ $600,000). The two views answer different questions — tax computes taxable income; the management view prices services.
How does COGS change gross profit?
Gross profit = net sales − COGS. Continuing the hypothetical retailer: net sales of $410,000 minus COGS of $268,600 gives gross profit of $141,400, a gross margin of 34.5% ($141,400 ÷ $410,000). Because COGS sits above the gross-profit line, classification changes the margin even when it changes nothing about cash or total profit.
Table 6: Same hypothetical store, same totals — only the classification of $9,600 of freight-in differs (made-up inputs).
| Presentation | COGS | Gross profit | Gross margin | Operating expenses | Operating income |
|---|---|---|---|---|---|
| Freight-in in COGS (correct) | $268,600 | $141,400 | 34.5% | $105,600 | $35,800 |
| Freight-in expensed below | $259,000 | $151,000 | 36.8% | $115,200 | $35,800 |
Interpretation: moving $9,600 out of COGS inflates the apparent gross margin by about 2.3 percentage points (36.8% vs. 34.5%) while operating income stays $35,800 either way. A misclassified COGS therefore makes your margin look better against benchmarks — until someone recalculates it. For what a healthy margin looks like by business type, see what’s a good profit margin for your small business.
Book, tax, and management reporting: what changes across bases?
The same inventory can legitimately produce different COGS numbers depending on the basis of accounting, so name the basis whenever you quote the figure:
- US GAAP (book basis). Under US Generally Accepted Accounting Principles (GAAP), inventory is an asset until sold. Inventory measured by first-in, first-out (FIFO) or average cost is carried at the lower of cost and net realizable value, where net realizable value is the “estimated selling prices in the ordinary course of business, less reasonably predictable costs of completion, disposal, and transportation” — per FASB Accounting Standards Update 2015-11, Inventory (Topic 330) (accessed July 27, 2026).
- Tax basis. Form 1125-A line 9 accepts cost, lower of cost or market, or another IRS-approved method, plus the small-business-taxpayer alternatives (non-incidental materials and supplies, or financial-statement/book treatment). A GAAP net-realizable-value write-down and a tax lower-of-cost-or-market write-down follow different rules, so book COGS and tax COGS can differ in the same year.
- Management reporting. Cash-basis profit-and-loss reports do not produce a reliable COGS, because purchases are expensed when paid regardless of what sold. Keep accrual-basis management reports for margin analysis even if you elect simplified inventory treatment for taxes. Clean perpetual-inventory records make this far easier — see our guide to inventory management systems for small businesses for the software side, which this page deliberately does not cover.
FAQs
Is cost of goods sold an expense?
Yes — on the income statement, COGS is the cost line subtracted from net sales to compute gross profit. But unlike operating expenses, it is not a bill you pay in the period: purchases become an asset (inventory) first, and only the portion of that asset actually sold becomes COGS. Unsold goods stay on the balance sheet, which is why a growing business can spend heavily on stock and still report a smaller COGS.
Do service businesses have cost of goods sold?
Not for federal income tax. If the production, purchase, or sale of merchandise is not an income-producing factor, there is no inventory to value and no COGS on the return. Many service firms still track a management-level “cost of services” — direct labor, subcontractors, job materials — to price work, but that is a reporting choice, not a tax figure.
Does COGS include salaries and rent?
Production wages and production-facility overhead, yes; office salaries, office rent, and administrative costs, no. The exception is larger businesses subject to section 263A uniform capitalization, which must pull certain purchasing, handling, storage, and mixed-service costs into inventory (Form 1125-A line 4); small business taxpayers under the section 448(c) gross-receipts test are exempt.
What if I use the small business taxpayer inventory election?
You may skip formal inventory accounting on the federal return and treat inventoriable items as non-incidental materials and supplies or follow your financial-statement treatment. The election changes tax reporting, not economics: for pricing and margin decisions you should still maintain accrual-basis reports with real COGS.
Where does COGS appear on a tax return?
Sole proprietors: Schedule C (Form 1040), line 4, carried from Part III line 42. C corporations, S corporations, and partnerships: line 2 of Form 1120, 1120-S, or 1065, computed on the attached Form 1125-A.
The bottom line
Compute COGS the way the tax forms build it: value beginning inventory, add purchases and every direct cost of the goods (freight-in, production labor, materials, production overhead), subtract a valued ending inventory count, and classify anything that merely runs the business as an operating expense. Service businesses should skip the tax line but can mirror the logic in a management cost-of-services figure. Then recheck your gross margin — if freight, labor, or overhead landed below the gross-profit line, your margin is overstated. If your opening counts, cost tagging, or inventory records cannot support that calculation, our remote bookkeeping services can help validate your COGS setup and rebuild the underlying records; the industry finance guides hub covers related finance topics by sector.
This article is general educational information, not tax, legal, or accounting advice. Inventory and COGS rules depend on your entity type, accounting method, gross receipts, and facts, and federal and state treatments change over time; consult a qualified tax or accounting professional about your specific situation before filing.