Skip to content
QB Specialist

Doc · Concept

Cost of Goods Sold (COGS)

Cost of goods sold (COGS) is the direct cost of the products a business actually sold during a period — what those specific goods cost to buy or make, recognized only when they sell. For a business that holds inventory, COGS equals beginning inventory plus purchases minus ending inventory.

Why it matters

COGS is the number that tells you what your sales actually cost you. It sits directly beneath revenue on the profit and loss (P&L) statement, and the gap between the two is your gross profit — the money left to cover everything else. Get COGS wrong and every profitability number above the operating line is wrong with it: gross margin, the true cost of a product, whether a price is high enough to make money. It is also a line the IRS scrutinizes, because moving a cost into COGS changes taxable income. For any business that buys or makes what it sells, COGS is not an accounting detail — it is the measure of whether the core of the business is profitable at all.

Cost of goods sold

The cost-of-goods-sold identity, worked A worked example: $12,000 of beginning inventory, plus $40,000 of purchases during the period, less $9,000 of ending inventory, equals $43,000 of cost of goods sold. That COGS is then subtracted from sales to give gross profit. Illustrative figures. ON HAND, START BOUGHT IN PERIOD ON HAND, END COST OF SALES $12,000 Beginning inventory PLUS $40,000 Purchases LESS $9,000 Ending inventory = $43,000 COGS WHAT COGS IS FOR ON THE P&L GROSS PROFIT = SALES LESS COGS
A worked example: beginning inventory plus period purchases, less what is still on hand at the end, equals the cost of what sold; that COGS is then subtracted from sales to give gross profit. Illustrative figures.

When a cost becomes COGS instead of an expense

A cost becomes COGS only when the item it paid for is sold; until then it sits in inventory as an asset. Operating costs that keep the business running are expenses, recognized as they are incurred whether or not anything sold that period. That timing difference is the whole distinction, and it is where most COGS errors begin.

Think of the money as moving through three stops. When you buy goods for resale, the cost goes into inventory — an asset on the balance sheet, not a cost on the P&L. When those specific goods sell, their cost moves out of inventory and lands on the P&L as COGS, matched against the sale that earned the revenue. Goods that never sold stay in inventory as ending inventory and carry into next period. Nothing hits COGS until a sale pulls it there.

What belongs in COGS is the direct cost of the goods themselves: the purchase price of merchandise, freight-in to get it to you, and for a business that makes what it sells, the raw materials and direct labor that went into the product. What does not belong in COGS is the cost of running the business around those goods — rent, office salaries, marketing, software, insurance, and owner draws. Those are operating expenses, and they belong in their own accounts below the gross-profit line. The IRS lays out what a small business may include in figuring cost of goods sold in Publication 334, Tax Guide for Small Business; the line between a product cost and an operating expense is the same one that decides whether a cost reduces gross profit or operating profit.

How QuickBooks posts COGS for inventory items

When you sell an inventory item in QuickBooks, it automatically moves that item's cost out of the Inventory Asset account and into a Cost of Goods Sold account on the same sales transaction — you do not post COGS by hand. The single invoice or sales receipt records the revenue and the matching cost at once.

This works because every inventory item is set up with three accounts, visible when you open the item under Sales, then Products and services, with the type set to Inventory: an income account for the sale, an Inventory Asset account that holds the cost while the item is in stock, and a Cost of Goods Sold account that receives the cost when the item sells. QuickBooks Online values that cost using the average cost method — each unit sold is costed at the running weighted-average unit cost at the moment of the sale — so the COGS amount reflects what your stock actually cost on average, not the price of any one purchase order.

The behavior only applies to true Inventory items. Non-inventory items, service items, and anything you code straight to an expense account do not post COGS automatically — QuickBooks has no cost to move because it is not tracking a quantity on hand. That is by design, but it is also why COGS goes wrong: if items that should be tracked as inventory are set up as non-inventory, or purchases are booked directly to the COGS account instead of received into inventory, the automatic matching breaks and COGS stops reflecting what actually sold. When quantity on hand is allowed to go negative — selling units the system has not recorded receiving — QuickBooks has to estimate the cost of goods it does not yet have a cost for, and COGS distorts until the receipts are entered. Cleaning that up is the core of a QuickBooks inventory cleanup.

COGS and gross profit

Gross profit is sales revenue minus COGS — the money left from sales after paying for the goods themselves, before any operating expenses. On the P&L it appears directly below income and above operating expenses, and dividing it by revenue gives gross margin, the percentage of each sales dollar that survives the cost of the product.

Because gross profit is built directly on COGS, any error in COGS lands straight in gross profit and gross margin. Push an operating expense up into COGS and gross profit falls while operating profit rises — the totals net out, but the profitability of the product itself reads worse than it is. Miss a cost that belongs in COGS and gross profit reads too high, flattering a product line that may not really be carrying its cost. This is why a clean, consistently mapped COGS matters beyond tax: it is the number owners use to price products, judge which lines earn their keep, and compare one period to the next. If costs are scattered across the wrong accounts, gross margin is not comparable month to month, and the P&L cannot answer the one question it exists to answer — is the core of the business profitable. If you are not sure your COGS is landing where it should, a free QuickBooks review will show how your product costs are actually mapped.

Common COGS mistakes in QuickBooks

Most COGS problems are mapping problems, not math problems — the figures are fine, but costs are landing in the wrong accounts. The usual four: operating expenses miscoded into COGS (or the reverse), which distorts gross margin; purchases booked straight to COGS instead of received into inventory, so the asset and the cost never line up; inventory driven negative by selling before receiving, which forces QuickBooks to estimate cost; and a lone catch-all COGS account that mixes unrelated product lines so no margin can be read on its own.

Each of these traces back to how the books are structured. A COGS account that has quietly become a dumping ground is a chart of accounts problem; negative quantities and broken item mappings are an inventory problem. Both are exactly what a cleanup untangles — restoring the mapping so that each sale moves the right cost to the right place and gross profit becomes trustworthy again.

Where this shows up

Questions about cost of goods sold

What is the difference between COGS and an expense?

COGS is the direct cost of the goods you actually sold; an operating expense is a cost of running the business, like rent or marketing. A cost sits in inventory as an asset until the item sells, and only then becomes COGS. Operating expenses are recognized as they are incurred, whether or not anything sold.

How does QuickBooks calculate COGS?

For inventory items, QuickBooks posts COGS automatically on each sale: it moves the item's cost out of the Inventory Asset account and into a Cost of Goods Sold account on the same transaction. QuickBooks Online values that cost using the average cost method, so the amount posted reflects the running average unit cost at the time of the sale.

Is COGS the same as cost of sales?

In practice they mean the same thing — the direct cost of what you sold. Businesses that sell physical products usually call it cost of goods sold; service businesses that report a direct cost of delivery often call it cost of sales. QuickBooks uses a Cost of Goods Sold account type for both.

Why is my COGS wrong or negative in QuickBooks?

The most common causes are selling inventory you have not recorded receiving, which drives quantity on hand negative and makes QuickBooks estimate the cost, and posting purchases or operating costs straight to the COGS account instead of through inventory. Both distort COGS and gross profit, and both are routine findings in a cleanup.