Cost of goods sold is the direct cost to produce the goods your business sells
Cost of goods sold (COGS) is the total amount your business spent on materials, labor, and manufacturing to create the products you sold during a specific period. It does not include overhead costs like rent, utilities, or salaries for office staff. COGS appears on your income statement and directly affects your gross profit — the money left after you subtract it from your total sales revenue.
The formula is straightforward: Beginning Inventory + Purchases During the Period − Ending Inventory = Cost of Goods Sold. The tricky part is tracking what counts as COGS and what does not, and making sure your inventory numbers are accurate at the start and end of each accounting period.
Key Takeaways
- COGS includes only the direct costs to make or buy products: raw materials, manufacturing labor, and factory overhead — not office salaries or rent.
- You calculate COGS using beginning inventory, plus purchases, minus ending inventory, which means an accurate physical count at period end is essential.
- The inventory valuation method you choose (FIFO, LIFO, or weighted average) changes your COGS number and your tax bill, so pick one and document it.
- COGS is reported on your income statement and used to calculate gross profit, which shows whether your production costs are sustainable.
What counts as cost of goods sold and what does not
COGS includes three categories: raw materials, direct labor, and manufacturing overhead. Raw materials are the physical inputs — fabric for a clothing maker, flour for a bakery, or components for an electronics assembler. Direct labor is the wage cost of workers who physically make the product, not supervisors or office staff. Manufacturing overhead is the cost to run the production facility itself — factory utilities, equipment depreciation, and factory maintenance — but only the portion tied to production.
COGS does not include sales commissions, advertising, shipping to customers, office rent, administrative salaries, or insurance. These are operating expenses and appear separately on your income statement. A common mistake is including the salary of a warehouse manager in COGS; that person is part of overhead, not production. If you are unsure whether a cost belongs in COGS, ask whether the business could avoid that cost if it made zero products. If yes, it is likely COGS. If no, it is an operating expense.
The basic COGS formula and how to use it
The formula is: Beginning Inventory + Purchases − Ending Inventory = Cost of Goods Sold. Beginning inventory is the dollar value of products you had on hand at the start of the accounting period. Purchases is the total cost of all materials and goods you bought during that period. Ending inventory is the dollar value of products left unsold at the end of the period.
Here is a concrete example. A candle maker starts January with $5,000 worth of wax, wicks, and jars in stock. During January, she buys $8,000 more materials. At the end of January, she counts her remaining inventory and values it at $3,000. Her COGS for January is $5,000 + $8,000 − $3,000 = $10,000. This means she spent $10,000 in materials to make the candles she actually sold that month. If her January sales were $22,000, her gross profit is $22,000 − $10,000 = $12,000.
Inventory valuation methods and why they matter
The price of materials changes over time. If you bought wax at $10 per pound in January and $12 per pound in March, which price do you use when you sell a candle made from either batch? Your choice of inventory valuation method answers that question and directly changes your COGS and taxable income.
FIFO (First In, First Out) assumes you sell the oldest inventory first. In a rising-price environment, FIFO results in lower COGS because you are using the cheaper, older prices. LIFO (Last In, First Out) assumes you sell the newest inventory first, so in a rising-price environment, LIFO results in higher COGS because you are using the newer, higher prices. Weighted average splits the difference by calculating an average cost per unit across all inventory purchased during the period.
FIFO typically produces higher net income and higher taxes. LIFO produces lower net income and lower taxes, which is why many manufacturers use it. Weighted average is simpler to track but less common. Once you choose a method, you must stick with it year to year unless you get permission from the IRS to change. Document your choice in your accounting records.
Physical inventory count and record reconciliation
Your ending inventory number must be accurate because it directly reduces your COGS. Many businesses use a physical count at the end of each quarter or year. You physically count every item in your warehouse or storage, multiply the quantity by the unit cost, and total it. This number becomes your ending inventory for the period and your beginning inventory for the next period.
After you count, compare the physical total to what your accounting records say you should have. The difference is shrinkage — lost, damaged, or stolen goods. A small amount of shrinkage is normal. A large discrepancy means your records are wrong, your count was wrong, or you have a theft or damage problem. Once you reconcile, update your records to match the physical count. This is the only way to may support your COGS calculation is based on reality, not assumptions.
How COGS affects your income statement and taxes
Your income statement shows: Sales Revenue − COGS = Gross Profit. Gross profit is the money available to cover operating expenses and generate profit. If your COGS is too high relative to sales, your gross profit margin is thin, which means you are not pricing high enough or your production costs are too high. Tracking COGS period by period helps you spot cost problems early.
COGS also directly affects your taxable income. A higher COGS lowers your taxable income, which lowers your tax bill. This is why the choice of inventory valuation method matters — LIFO can reduce your taxes in an inflationary environment. However, if you use LIFO for tax purposes, you must also use it for financial reporting, so you cannot pick the method that looks best for each situation. Consult a tax professional before choosing a method.
Common mistakes when calculating COGS
The most common mistake is including costs that do not belong. Office salaries, marketing, and vehicle insurance are not COGS. A second mistake is using an inaccurate ending inventory number because the physical count was rushed or incomplete. If your ending inventory is wrong, your COGS is wrong, and your profit is wrong. Set aside time for a careful count and reconcile it to your records.
A third mistake is not tracking purchases separately from other expenses. If you lump all spending into one account, you cannot isolate the cost of materials and goods. Use a separate account for inventory purchases. A fourth mistake is forgetting to include manufacturing overhead. If you rent a factory or pay for factory utilities, those costs belong in COGS, not operating expenses. The rule is: if the cost would not exist without production, it is likely part of COGS.
Frequently Asked Questions
Do I include shipping costs to my customers in COGS?
No. Shipping to customers is a fulfillment cost and goes in operating expenses. However, shipping costs to bring raw materials into your facility are part of the material cost and belong in COGS. The difference is whether the cost is tied to production or to getting the finished product to the buyer.
What if I make products that sit in inventory for months before they sell?
The cost to make them still belongs in COGS in the period they were made, not when they sell. COGS is based on what you produced and sold during the period, not when the product was manufactured. The unsold portion stays in ending inventory and moves to the next period.
Can I change my inventory valuation method if I want a lower tax bill?
You can change methods, but only with IRS permission, and the change applies going forward, not retroactively. Switching from FIFO to LIFO in a rising-price environment will lower your taxes, but you must file Form 970 and follow specific rules. Talk to a tax professional before making any change.
How often should I count inventory?
At minimum, once per year at the end of your fiscal year. Many businesses count quarterly or monthly to catch discrepancies early. The more often you count, the sooner you spot theft, damage, or record errors. Some businesses use cycle counting — counting a portion of inventory each week — instead of one big annual count.
What if I buy products finished and resell them instead of making them?
The purchase price of those finished goods is your COGS. You still use the same formula: beginning inventory plus purchases minus ending inventory. The only difference is that you have no manufacturing labor or overhead to add — the supplier already built those costs into the price you paid.