Skip to main content

Cost of Goods Sold Explained: What Belongs in COGS, How Inventory Decides Your Gross Profit, and Why Misclassified Labor Lies About Your Margin

Published 12 min readMike ThriftMike Thrift
Cost of Goods Sold Explained: What Belongs in COGS, How Inventory Decides Your Gross Profit, and Why Misclassified Labor Lies About Your Margin
On this page

Move one dollar between cost of goods sold and operating expenses and your gross profit moves by exactly one dollar — but your net profit does not budge. That sounds harmless until you realize your pricing, your lender's opinion of you, and your make-or-buy decisions all run on gross profit, not net. Misclassify a few thousand dollars of labor and you will confidently raise prices you did not need to raise, or celebrate a margin you never earned.

Cost of goods sold (COGS) is the bridge between what you sold and what you actually made on the sale. For a small product business — a maker, a reseller, a small manufacturer — getting it right is the difference between knowing your numbers and guessing with extra steps. This guide walks through what belongs in COGS under the IRS rules, how inventory drives the whole calculation, and the labor mistake that quietly distorts more small-business margins than any other.

What COGS Actually Is (and What It Is Not)​

COGS is the direct cost of the goods you sold during the year. Not the goods you bought, not the goods sitting on your shelves — the goods that left the building because a customer paid for them. The IRS puts it plainly: if your business makes, buys, or sells merchandise, you generally must keep inventory records and compute COGS to find your gross profit.

The formula the IRS expects on Schedule C, Part III looks like this:

Beginning inventory plus net purchases plus the cost of labor plus materials and supplies plus other costs minus ending inventory equals cost of goods sold.

Gross profit is then simply your sales minus COGS. Every line in that formula deserves a moment, because each one is a place small businesses quietly go wrong.

One boundary matters before anything else: COGS is for merchandise businesses. If you sell services and never hold goods for sale — consulting, design, bookkeeping — you generally have no COGS and no inventory to track. Your wages and contractor payments are ordinary operating expenses. Some service businesses report a "cost of services" line for direct project labor, which is fine for management reporting, but on the tax return it does not go through the inventory mechanics below.

What Belongs in COGS: The Five Buckets​

Think of COGS as five buckets. If a cost does not fit one of them, it almost certainly belongs further down the income statement as an operating expense.

1. Beginning inventory​

What you had on hand at the start of the year, valued the same way you valued last year's ending inventory. For a brand-new business this is zero. For everyone else, it must match last year's closing number exactly — if it does not, one of the two returns is wrong, and the IRS notices this mismatch more often than people assume.

2. Purchases, net of returns and discounts​

What you paid for merchandise and raw materials bought for resale or production, minus vendor returns, allowances, and cash discounts you actually took. Record purchases net: a 2-percent early-pay discount you captured reduces the cost of the goods; it is not separate income. Freight you paid to get goods into your hands — freight-in — belongs here too, as part of what the goods cost you.

3. Direct labor​

Wages paid to workers who make the product or get it ready for sale: assembly staff, bakers, machine operators, the crew packing wholesale orders. Include the employer's share of payroll costs tied to that labor where your books support it. The key word is direct: the labor must touch the goods.

Two exclusions surprise people. First, if you are a sole proprietor, your own time has no deductible labor value — you cannot pay yourself a wage, book it to COGS, and deduct it. Your compensation is the profit itself. Second, labor for selling, delivering to customers, or running the office is not direct labor, no matter how essential it feels. Your sales rep's salary and your bookkeeper's fee are operating expenses.

4. Materials and supplies​

Parts, raw materials, packaging that ships with the product, and consumables used up in making it: lumber and glue for the furniture maker, fabric and thread for the sewn-goods seller, boxes and fill for the reseller who kits products. Office supplies, cleaning products for the storefront, and anything consumed by the business rather than the product stay out.

5. Other costs​

The legitimate stragglers: freight-in that was billed separately, import duties on your goods, storage costs for inventory before sale, and — for businesses large enough to be subject to the uniform capitalization rules — certain indirect production costs the tax code requires you to capitalize into inventory rather than deduct immediately. Most small businesses fall under the small-business taxpayer exception (average annual gross receipts in the low tens of millions, adjusted yearly for inflation), which excuses them from those capitalization rules. If you are anywhere near that threshold, confirm it with your CPA rather than assuming.

What never belongs in COGS​

If you remember nothing else, remember the exclusion list, because this is where margins get distorted:

  • Rent, utilities, and insurance for your office or storefront
  • Marketing, advertising, and sales commissions
  • Administrative and management salaries
  • Professional fees (legal, accounting, tax prep)
  • Freight to ship finished goods to customers (freight-out) — that is a selling expense
  • Business licenses, bank fees, and interest

Each of these is deductible. They just deduct below the gross-profit line, where they belong.

How Inventory Drives Your Gross Profit​

Here is the part that makes COGS feel backwards the first time you see it: buying inventory does not reduce your profit. Selling it does — through COGS — and the ending inventory count decides how much.

Walk through a small example. You start January with $8,000 of goods on hand. During the year you buy $50,000 more. At year-end you count $12,000 still on the shelves. Your COGS is $8,000 plus $50,000 minus $12,000, or $46,000. If your sales were $90,000, your gross profit is $44,000.

Now imagine the year-end count was sloppy and you recorded $17,000 instead of $12,000 — a $5,000 overcount. COGS drops to $41,000, gross profit jumps to $49,000, and you owe tax on $5,000 of profit you never earned. Undercount by the same amount and you hand yourself a phantom $5,000 loss that reverses the moment anyone recounts. Ending inventory and gross profit move dollar for dollar in opposite directions, which is why the IRS treats the year-end count as the load-bearing wall of the whole return.

Three practical consequences follow.

Count what you have, at cost. Ending inventory is valued at cost (or, if you use the lower-of-cost-or-market method consistently, at market when it is lower) — not at the price you hope to sell it for. Marking inventory up to retail value understates COGS and overstates profit today, then punishes you when the goods actually sell.

Pick an inventory method and stick with it. When identical units cost different amounts over the year, first-in-first-out (FIFO), last-in-first-out (LIFO), and average cost give different COGS numbers from the same shelves. FIFO assumes the oldest units sold first; in rising-price years that means lower COGS and higher taxable profit. LIFO does the reverse but comes with book-tax conformity strings attached. Average cost smooths the difference. The IRS requires consistency: changing methods generally needs permission, so treat the choice as a commitment, not a year-end optimization trick.

Shrinkage is a real cost with a paper trail. Theft, damage, spoilage, and mysterious shortfalls reduce your ending inventory, which increases COGS automatically through the formula. That is correct — lost goods are a cost of the business — but only if the count is honest. Writing inventory down without a count, or "adjusting" the number to hit a target margin, is how a routine exam turns adversarial.

If you want the mechanics of the year-end count itself, the inventory and recordkeeping guidance in the docs walks through keeping the kind of contemporaneous records that survive scrutiny.

Why Misclassified Labor Is the Silent Margin Killer​

Of all COGS errors, labor misclassification does the most damage per dollar, because it warps the one ratio owners watch most: gross margin.

Consider a small bakery with $300,000 in sales. Its true numbers are $120,000 in ingredients and packaging, $60,000 in baker wages (direct labor), and $70,000 in rent, register staff, delivery, and everything else. True COGS is $180,000, true gross profit is $120,000, and true gross margin is 40 percent.

Now suppose the owner books the two counter clerks ($45,000 combined) into COGS along with the bakers, reasoning that "everyone here works on the product." COGS becomes $225,000, gross profit falls to $75,000, and gross margin collapses to 25 percent. The owner concludes the recipes are unprofitable and raises prices into a competitive market — when the actual problem is a bookkeeping choice, not the croissants.

The reverse error is just as common. A small contractor buries crew wages in "contract labor expense" below the line instead of in job costs. Gross margin looks fantastic, bids look safe, and nobody notices the jobs are being underpriced until cash runs short. Same misclassification, opposite direction, equally expensive lesson.

Three rules keep labor honest:

  1. Follow the hands, not the org chart. If the hours turn raw inputs into finished goods ready for sale, the wages are direct labor. If the hours sell, deliver, manage, clean, or administer, they are operating expenses — even when the same person does both. Split mixed roles by time records, not by gut feel.
  2. Owners and partners are not COGS labor. Sole proprietors cannot deduct their own time at all; partners generally cannot either. S-corporation owner wages follow the same direct-versus-indirect test as any employee's, based on what the owner actually did.
  3. Contractors follow the same test as employees. What matters is the work performed, not the Form 1099 versus Form W-2 distinction. The machine shop you pay to mill your parts is a COGS cost; the freelancer who runs your ads is not.

Because the error is symmetric — too much labor in COGS understates margin, too little overstates it — the fix is a quarterly review, not a one-time cleanup. Pull your COGS detail, read every labor line, and ask of each: did these hours touch goods we sold? Anything you hesitate over probably needs reclassing or a time split.

Common COGS Mistakes That Trigger Headaches​

Beyond labor, the errors the IRS flags most often in small merchandise businesses form a familiar lineup:

  • Expensing purchases immediately. Buying $50,000 of inventory is an asset swap (cash for goods), not a deduction. The deduction arrives through COGS as the goods sell. Deducting the full purchase in the year you bought it overstates this year's loss and understates next year's.
  • Skipping the ending count. Estimating, rolling last year's number forward, or counting only the stockroom and forgetting the consignment shelf all corrupt COGS dollar for dollar. Count everything you own, wherever it sits.
  • Confusing freight directions. Freight-in (getting goods to you) is part of what the goods cost — COGS. Freight-out (getting goods to customers) is a selling expense. Swapping them moves gross margin without changing net income, which is exactly the kind of distortion lenders distrust.
  • Forgetting returns and allowances. Customer returns reduce sales; vendor returns and rebates reduce purchases. Booking the gross amounts on both sides inflates revenue and COGS together and muddies every ratio built on them.
  • Deducting personal draws as purchases. Taking goods off the shelf for personal use is a withdrawal of equity, not a business expense and not COGS. Remove it from inventory without touching either expense line.
  • Cash-basis wishful thinking. Even predominantly cash-basis businesses with inventory generally must use the accrual method for purchases and sales of merchandise — you track receivables, payables, and inventory for the goods even if everything else stays cash-basis. Confirm your required method before filing season, not during it.

A Simple Month-End COGS Routine​

You do not need an enterprise system to keep COGS clean. You need a short routine, run monthly, before the details fade:

  1. Reconcile the inventory account to your point-of-sale or stock records, and investigate variances over a threshold you set (say, 2 percent) rather than plugging them.
  2. Review every new vendor bill coded to purchases. Is it truly merchandise or production inputs? Office and shipping supplies sneak in constantly.
  3. Scan COGS labor lines for drift — the new hire coded to production who actually works the counter, the overtime that belongs to a rush delivery rather than a production run.
  4. Age your payables and receivables on goods so cut-off errors surface: December goods received in January must not sit in December purchases.
  5. Glance at gross margin by product line, not just in total. A stable overall margin can hide one line collapsing while another quietly subsidizes it. A visual dashboard makes this review take minutes — the Fava reports are one way to see per-account trends without building spreadsheets by hand.

Thirty focused minutes a month beats a panicked reconstruction every April, and it gives you margins you can actually price from.

Keep Your Margins Honest From Day One​

As you tighten up purchasing, counting, and labor coding, maintaining clear financial records is what turns a once-a-year tax exercise into numbers you can run the business on. Beancount.io provides plain-text accounting that gives you complete transparency and control over your financial data — no black boxes, no vendor lock-in. Get started for free and see why developers and finance professionals are switching to plain-text accounting.

Source: https://beancount.io/blog/2026/10/12/cost-of-goods-sold-what-belongs-cogs-inventory-labor-gross-profit-guide

Published: October 12, 2026