Cost of goods sold (COGS) is the cost assigned to the products a business sold during a period. For a product seller, subtracting COGS from net receipts gives gross profit. COGS is not simply every expense a business pays: inventory and production costs are matched to the goods sold, while other business expenses are accounted for separately.
What is cost of goods sold?
COGS measures the cost of merchandise or products sold during an accounting period. It connects inventory costs to the period in which the related goods are sold: costs for goods still on hand at period-end remain in ending inventory rather than being counted as COGS for that period.
The exact costs assigned to COGS depend on the business and applicable accounting or tax rules. The IRS Form 1125-A federal tax computation includes beginning inventory, purchases, cost of labor, additional section 263A costs, and other costs, then subtracts ending inventory. That form is a tax calculation framework, not permission to classify every business expense as COGS. IRS: About Form 1125-A, Cost of Goods Sold
How do you calculate COGS?
The calculation shown on IRS Form 1125-A is:
Beginning inventory + purchases + cost of labor + additional section 263A costs + other costs − ending inventory = COGS
#1 Best Overall
Beginning inventory is the inventory value at the start of the period. Purchases and applicable production costs are added to determine the costs available for sale or production. Subtracting ending inventory removes the cost of goods that remain unsold at the end.
Example: a retailer
Suppose a retailer starts with $10,000 of inventory, buys $25,000 of goods, and ends with $8,000 of inventory. In this simplified hypothetical example, labor and other added costs are zero:
$10,000 + $25,000 − $8,000 = $27,000 COGS
If the retailer’s net receipts are $40,000, gross profit is $13,000: $40,000 − $27,000. These figures are teaching inputs, not a business benchmark. A manufacturer may need to include applicable labor and other production costs, so the retailer example should not be used as a universal formula for every operation.
What is included in COGS?
For the federal tax computation on Form 1125-A, the listed components are beginning inventory, purchases, cost of labor, additional section 263A costs, and other costs, less ending inventory. Which costs belong in a business’s calculation depends on its circumstances and the rules that apply. Check the form and instructions for the relevant tax year rather than treating the categories as interchangeable with all operating expenses.
Rank #3
Inventory valuation also matters. Form 1125-A lists cost, lower of cost or market, and other specified methods, and recognizes alternatives for certain small business taxpayers. Taxpayer eligibility and accounting method affect the available treatment; the appropriate choice is not the same for every business. See the IRS Form 1125-A and its instructions.
Is COGS an expense?
COGS is a cost deducted from a product-selling business’s receipts to calculate gross profit. It is distinct from expenses that are not assigned to the goods sold, such as general business costs. IRS Publication 334 (2025) describes gross profit for businesses selling products as net receipts minus COGS. It also says a business does not have to calculate COGS when the sale of merchandise is not an income-producing factor. Do not assume every service business has merchandise COGS. IRS Publication 334 (2025), Tax Guide for Small Business
Rank #4
This is federal tax guidance. Financial-statement presentation can depend on the accounting framework and business context, so tax treatment should not automatically be treated as a universal financial-reporting definition.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Why inventory records affect the calculation
Because ending inventory is subtracted from accumulated costs, an inaccurate count or valuation can distort COGS and gross profit. IRS Publication 538 (January 2022) says inventory accounts should reflect actual cost, follow sound accounting practices, and be reconciled with physical inventory taken at reasonable intervals. It describes perpetual or book inventory records as a way to track inventory, with physical counts used to bring the books into agreement with actual inventory. IRS Publication 538, Accounting Periods and Methods
Free tools Windows power users keep installed
One-click scans. No signup required.
Best Value
For a current filing, use the rules and instructions for the applicable tax year; Publication 538 is dated 2022 and should not be the sole basis for a current tax conclusion.
When does a business need to calculate COGS for tax purposes?
The IRS generally requires beginning and ending inventory when producing, purchasing, or selling merchandise is an income-producing factor, with identified exceptions for qualifying small business taxpayers. The rules can vary with taxpayer status and accounting method. Form 1125-A is used by filers of specified federal returns when the applicable entity reports a COGS deduction; the IRS lists Forms 1120, 1120-C, 1120-F, 1120-S, and 1065. Consult the current form and instructions for the specific tax year and taxpayer situation. IRS Form 1125-A information IRS Publication 334 (2025)
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




