Cost of Goods Sold (COGS): What It Is and Why It Drives Your Real Profit

Cost of goods sold (COGS) is the direct cost of the products you sold during a period: materials, the labor to make them, inbound shipping and anything else required to get the goods ready to sell. Revenue minus COGS is gross profit, which pays for everything else. If COGS is wrong, your real profit margin is wrong, and so is every pricing decision built on it.

This guide is for product sellers and makers who want to trust their gross margin. You'll learn what belongs in COGS and what doesn't, how to calculate it from inventory counts, how a few missing costs can distort your margin, and why discounts hit harder than they look.

What counts as cost of goods sold?

The test is simple: would this cost exist if you hadn't made or bought the product you sold? If it's tied directly to the product, it's COGS. If it keeps the business running regardless of what you sell, it's an operating expense.

Usually in COGSUsually operating expensesDepends on your setup
Raw materials and componentsRent for a retail storefront or officeOutbound shipping to customers
Products bought for resaleMarketing and advertisingCard and marketplace fees
Freight to bring inventory inOwner and admin salariesProduction-space rent and utilities
Direct production laborAccounting and software subscriptionsPackaging that ships with the product
Product packaging (jars, boxes, labels)Office suppliesWarehouse staff wages

For the "depends" column, the important thing is consistency. Pick a treatment, write it down, and apply it every month so your margins are comparable over time. Tax rules on which costs must be included in inventory can be detailed, so confirm your approach with a CPA.

How to calculate COGS

Most small businesses use the periodic method, which relies on inventory counts at the start and end of a period:

  • COGS = beginning inventory + purchases during the period − ending inventory
  • Gross profit = revenue − COGS
  • Gross margin = gross profit ÷ revenue

The logic: everything you had at the start, plus everything you added, minus what's still on the shelf, must be what you sold (or lost). That last part matters. Breakage, theft and spoilage end up inside COGS under this method, which is one reason a physical count is worth doing.

If your inventory or point-of-sale system tracks cost per item as each sale happens, it can report COGS continuously. That's the perpetual method. It's more precise day to day, but it still needs periodic counts to catch shrinkage.

Worked example: an online candle shop

Suppose a hypothetical online candle shop reviews its quarter. It sold 3,900 candles at an average price of $20, so revenue is $78,000.

Its first-pass COGS calculation:

  1. Beginning inventory: $14,000
  2. Plus wax, fragrance oil and finished candles bought: $31,000
  3. Minus ending inventory: $12,500
  4. COGS: $14,000 + $31,000 − $12,500 = $32,500
  5. Gross profit: $78,000 − $32,500 = $45,500
  6. Gross margin: $45,500 ÷ $78,000 ≈ 58.3%

Then the owner reviews the expense accounts and finds two direct costs recorded elsewhere. Inbound freight on wax shipments, $2,400, was booked as "shipping." Jars, wicks and labels, $3,100, were booked as "supplies." Both exist only because candles were made, so they belong in COGS.

  1. Corrected COGS: $32,500 + $2,400 + $3,100 = $38,000
  2. Corrected gross profit: $78,000 − $38,000 = $40,000
  3. Corrected gross margin: $40,000 ÷ $78,000 ≈ 51.3%
  4. COGS per candle: $38,000 ÷ 3,900 ≈ $9.74
  5. Gross profit per candle: $20.00 − $9.74 = $10.26

Net profit for the business doesn't change, because the costs were already on the books. What changes is the owner's understanding of each product. A seven-point drop in gross margin is the difference between "we have room to discount" and "we don't." To test different prices and costs, try our profit margin calculator.

Why COGS drives your real profit

Gross margin is the pool that pays for everything else. When COGS is understated, owners set prices too low, run promotions they can't afford, and wonder why the bank balance doesn't match the sales numbers.

Here is how the candle shop's per-unit numbers respond to a 20%-off sale:

Full price20% off
Price$20.00$16.00
COGS per candle$9.74$9.74
Gross profit per candle$10.26$6.26
Candles needed for the same gross profit as 100 at full price100164

A 20% price cut removes about 39% of the profit on each candle ($4.00 of $10.26), so the shop must sell roughly 64% more units just to stand still: $1,026 ÷ $6.26 ≈ 164. Would a sale really lift volume that much? Sometimes. Often not. This is also where markup and margin get confused. A candle marked up 100% over cost has a 50% margin, not 100%. Our guide to markup versus margin clears that up.

What about COGS for service businesses?

Service businesses don't hold inventory, but the same idea applies under a different name: cost of services or cost of revenue. It covers the direct labor and materials to deliver the work, such as technician wages for billable hours, subcontractors, and job materials.

For a service business, the key question is which labor is direct. A cleaner's wages for time on client sites are direct. The office manager who schedules them is overhead. Splitting these properly shows you which services actually earn their keep. Our post on job costing goes deeper on tracking this per project.

How to lower COGS without cutting quality

Once COGS is accurate, you can work on it. Here's a checklist to run through each quarter:

  • Rank products by gross margin, not revenue. Your best seller may be your weakest earner.
  • Get competing quotes on your top three input costs at least once a year.
  • Ask about volume tiers. Consolidating orders with one supplier can cut per-unit costs, but weigh that against the extra cash tied up in inventory.
  • Check inbound freight. Fewer, fuller shipments often cost less per unit than frequent small ones.
  • Measure waste and shrinkage. Compare expected inventory to your count. A persistent gap is a cost worth chasing.
  • Simplify packaging. Custom sizes and printing add up. Test whether customers notice a standard option.
  • Review labor steps. A jig, template or batching change that saves two minutes per unit adds up over thousands of units.

Common COGS mistakes

  • Leaving inbound freight out. Getting inventory to your door is part of its cost. Booking it as general shipping inflates your gross margin.
  • Treating packaging as office supplies. If it ships with the product, it's usually a product cost. Move it to COGS.
  • Using purchases as COGS. Buying $31,000 of inventory isn't the same as selling it. Without inventory counts, a big stock-up month looks terrible and the next looks amazing.
  • Skipping physical counts. System records drift from reality. Count at least once a year, and quarterly if inventory is a major asset.
  • Changing classifications month to month. Moving a cost in and out of COGS makes margin trends meaningless. Document your rules.

Where AI can help

An AI assistant is useful for the cleanup. Export your general ledger and ask it to list expenses that look product-related but sit in operating accounts, such as freight, packaging or subcontractor bills. It can also take a sales report and a cost list and calculate gross margin by product, then rank them, which is tedious to do by hand across dozens of SKUs (stock-keeping units, meaning individual products).

Review its suggestions before reclassifying anything. The tool doesn't know how your production works, and some calls, like whether warehouse wages belong in COGS, depend on your setup and your accountant's guidance.

Frequently asked questions

Is COGS the same as operating expenses?

No. COGS covers the direct costs of the products sold. Operating expenses cover running the business, like rent, marketing and administrative salaries. Both reduce profit, but they appear in different sections of the income statement and tell you different things.

Does shipping to customers count as COGS?

It varies. Some businesses include outbound shipping in COGS because it's needed to deliver each sale. Others treat it as a selling expense. Either can be reasonable as long as you're consistent. Ask your accountant which treatment fits your reporting.

What is a good gross margin?

It depends heavily on the industry. Resellers of commodity goods often run thin gross margins, while makers of branded or handmade products and software businesses typically run much higher ones. Compare yourself to your own history and to similar businesses rather than a universal target.

Why does my COGS jump around month to month?

Usually because inventory isn't being counted or adjusted each month, so purchases flow straight into COGS. Changes in product mix, supplier prices and one-time write-offs also cause swings. Regular counts smooth out the distortion.

Key takeaways

  • COGS includes every cost that exists only because you made or bought the product you sold.
  • Calculate it as beginning inventory plus purchases minus ending inventory, and count your stock.
  • Misplaced freight and packaging can overstate your gross margin by several points.
  • Discounts cut gross profit per unit much more than the headline percentage suggests.
  • Rank products by gross margin, not revenue, and work on your largest input costs first.

Comments