What is cost of goods sold: what is cost of goods sold? A guide to profitability

At its core, Cost of Goods Sold (COGS) is simply the sum of all the direct costs you incur to create the products you sell. Think of it as the cost of getting your product ready for a customer. This includes everything from the raw materials you buy to the labor costs of the people…

At its core, Cost of Goods Sold (COGS) is simply the sum of all the direct costs you incur to create the products you sell. Think of it as the cost of getting your product ready for a customer. This includes everything from the raw materials you buy to the labor costs of the people who assemble it.

Text 'COST OF GOODS SOLD' above bread, flour, and baking ingredients on a kitchen counter.

COGS Explained Without the Accounting Jargon

Let's say you own a small bakery. To make a single loaf of artisanal sourdough, you need flour, water, salt, and starter. You also have to pay the baker who expertly mixes, shapes, and bakes that loaf. These are all direct costs—they are tied directly to producing that specific loaf of bread.

Now, what about the rent for your storefront, the electricity that keeps the lights on, or the flyers you printed to advertise a weekend special? These are called operating expenses. They are absolutely essential to running your business, but they aren't directly tied to the creation of one single loaf. You pay rent whether you sell one loaf or a thousand.

Getting this distinction right is the first—and most important—step to accurately calculating your COGS. It's a foundational concept that directly impacts your gross profit and overall financial picture. For a deeper dive into these fundamentals, our guide to bookkeeping basics for small business is a great place to start.

Direct Costs vs. Indirect Costs

To put it another way, if an expense goes up because you decided to make one more item to sell, it’s almost always part of your COGS. If the cost stays the same no matter how much you produce, it’s an operating expense.

Key Takeaway: If you can trace a cost to a specific product, it’s a direct cost (COGS). If it’s a general cost of doing business, it’s an indirect operating expense.

This isn't just an academic exercise; it's a huge driver of profitability. In the U.S. retail industry, for instance, COGS can easily account for 60% to 80% of total revenue. That’s a massive chunk, and it shows just how critical this number is to a company's financial health.

To make this crystal clear, here’s a quick comparison of what falls into COGS versus what doesn’t, using our bakery example.

COGS vs Operating Expenses at a Glance

Expense Category Included in COGS? Example (For a Bakery)
Raw Materials Yes Flour, yeast, salt, and other ingredients for the bread.
Direct Labor Yes The hourly wages paid to the bakers on the production line.
Factory Overhead Yes A portion of the factory's utility bill from running the ovens.
Packaging Yes The paper bags and twist ties for each finished loaf.
Marketing No Cost of running a Facebook ad campaign.
Rent No Monthly rent for the entire bakery space.
Admin Salaries No Salary for your bookkeeper or the cashier at the counter.

Seeing it laid out like this really helps separate the costs of making from the costs of operating. Once you have a firm grasp on this distinction, you're well on your way to mastering your business's finances.

The Go-To Formula for Calculating COGS

Alright, now that you can tell a direct cost from an operating expense, let's put that knowledge into action. Calculating your Cost of Goods Sold isn't some high-level calculus; it all boils down to one simple, powerful formula that works for just about any business selling a product.

The Standard COGS Formula:
Beginning Inventory + Purchases – Ending Inventory = Cost of Goods Sold

Think of this formula as the story of your inventory over a specific time—be it a month, a quarter, or the whole year. You start with what you had, add what you bought, and then subtract what's left. The result is the cost of everything you sold.

Breaking Down the COGS Formula

Let's unpack each piece of that puzzle. Getting any one of these wrong can throw your numbers way off, so it pays to understand what each one really means.

  • Beginning Inventory: This is simply the value of all the stock you had on your shelves, ready to sell, on day one of your accounting period. It should match your ending inventory from the period before—no exceptions.

  • Purchases: This is the cost of all the new inventory you brought in during that same period. Don't forget to include costs like freight and shipping fees; those are direct costs of getting the goods ready for sale.

  • Ending Inventory: At the very end of the period, this is the value of whatever's left over. For most businesses, this means rolling up your sleeves and doing a physical count to get an accurate number.

Once you have those three figures, the calculation itself is straightforward. The number you're left with is the direct cost tied to the items that are no longer in your possession because your customers bought them.

COGS Calculation for a Retail Business

Let's put this into a real-world context. Imagine you run a small clothing boutique here in Washington State.

You kick off the quarter with $25,000 worth of clothes, shoes, and accessories. That's your Beginning Inventory. Over the next three months, you stock up on new seasonal styles, spending $15,000. That's your Purchases. At the end of the quarter, you count everything up and find you have $20,000 in inventory left. That's your Ending Inventory.

Let's plug it into the formula:

  • $25,000 (Beginning Inventory) + $15,000 (Purchases) – $20,000 (Ending Inventory) = $20,000 (COGS)

Your Cost of Goods Sold for that quarter is $20,000. That's the cost of the actual items that walked out the door with happy customers.

COGS Calculation for a Manufacturing Business

Things get a little more layered for manufacturers, but the core logic is exactly the same. The main difference is that the "Purchases" component gets a new name: "Cost of Goods Manufactured." This bundles up the costs of raw materials, direct labor, and all the factory overhead needed to create the finished product.

Let's say you build custom wooden furniture.

  • Beginning Inventory: $50,000 (finished furniture ready to sell)
  • Cost of Goods Manufactured: $70,000 (this includes wood, hardware, wages for your carpenters, and factory utility costs)
  • Ending Inventory: $40,000 (finished furniture left at the end of the period)

Plugging these numbers in:

  • $50,000 + $70,000 – $40,000 = $80,000 (COGS)

See? Even with the added complexity of production, the fundamental principle doesn't change.

What About Service-Based Businesses?

This is a question I get all the time. Service businesses don't have physical inventory, but they absolutely have direct costs associated with generating revenue. In this case, COGS is often called Cost of Sales or Cost of Revenue. The formula is simpler, but the goal is the same: pinpoint the direct costs of delivering your service.

For a marketing agency, for example, the Cost of Revenue would include things like:

  • Salaries or contractor fees for the team members who are hands-on with client campaigns.
  • The cost of software subscriptions used exclusively for a specific client's project.
  • Any direct ad spend you manage on behalf of a client.

By tracking these direct costs, you get a crystal-clear picture of how profitable each client or project truly is. Getting these calculations right is a fundamental part of a healthy financial strategy, and you can find more practical advice in our guide to small business accounting tips.

How Inventory Valuation Shapes Your COGS

Calculating your cost of goods sold seems simple enough, right? But then reality hits: prices change. The supplies you bought in January could cost significantly more by the time June rolls around. This brings up a really important question—when you sell something, which cost do you use?

The answer comes down to your inventory valuation method. This isn't just accounting jargon; it's a strategic choice that directly impacts your COGS, your reported profit, and even how much you'll owe in taxes.

Let's imagine you sell custom-printed t-shirts. You buy a batch of plain shirts in January for $5 each, another in March for $6, and a final batch in May for $7. When a customer buys a shirt, which cost do you assign to that sale? Do you use the $5 cost? The $7 cost? Or maybe an average? This is the core puzzle of inventory valuation.

There are three main ways to handle this, and each one tells a slightly different story about your company's profitability.

First-In, First-Out (FIFO)

The First-In, First-Out (FIFO) method works exactly like it sounds. It assumes the first items you bought are the first ones you sell.

Think about a grocery store stocking milk. The clerk always pushes the older cartons to the front of the shelf so they sell before expiring. That's FIFO in action. In your bookkeeping, you match the cost of your oldest inventory against your most recent sales.

  • When prices are rising (inflation): FIFO gives you a lower COGS because you're using those older, cheaper costs.
  • The bottom line: A lower COGS means a higher gross profit, and as a result, a higher taxable income.

Last-In, First-Out (LIFO)

On the flip side, the Last-In, First-Out (LIFO) method assumes the newest items you added to your inventory are the first ones to go out the door.

Picture a big barrel of nails at a hardware store. Customers just scoop them off the top, which is where the most recent delivery of nails was poured. LIFO works the same way, matching your most recent—and usually most expensive—inventory costs against your revenue.

  • When prices are rising (inflation): LIFO results in a higher COGS because you're expensing your newest, more costly items first.
  • The bottom line: This leads to a lower reported profit, which can be a good strategy for reducing your current tax bill. It's worth noting that while LIFO is allowed in the U.S., it’s banned under International Financial Reporting Standards (IFRS).

Weighted Average Cost (WAC)

If you're looking for a middle-of-the-road approach, the Weighted Average Cost (WAC) method smooths everything out. It sidesteps the need to track which specific item was sold.

Instead, you calculate a blended average cost for all the similar items you have in stock. You just divide the total cost of all the goods you have available by the total number of units. Every time you make a sale, you use this average cost to figure out your COGS. This method is often much simpler, especially if you sell large quantities of identical items.

Sequence of accounting symbols: home, plus, minus, and arrows, on a white background.

FIFO vs LIFO vs Weighted Average Impact on COGS

To see how this plays out, let's look at a quick example. Imagine a business sells one unit for $20 after buying three units at progressively higher prices ($10, $11, and $12).

Valuation Method Calculation Logic Calculated COGS Resulting Gross Profit
FIFO Assumes the first unit purchased ($10) was sold. $10 $10 ($20 – $10)
LIFO Assumes the last unit purchased ($12) was sold. $12 $8 ($20 – $12)
Weighted Average Averages the cost: ($10+$11+$12)/3 = $11. $11 $9 ($20 – $11)

As you can see, the method you choose has a direct, real-dollar impact on your financial statements.

Choosing between FIFO, LIFO, and WAC is a big strategic decision, not just a box to check. It also ties into your overall strategy for managing inventory carrying costs—the expenses related to simply storing your unsold products.

This decision shapes how investors and lenders see your profitability and directly affects your tax liability. Getting it wrong can cause major financial headaches, which is why accurate bookkeeping is so critical. If you're curious about the pitfalls, you can read more about the hidden costs of DIY bookkeeping for business owners.

Avoiding Common COGS Bookkeeping Mistakes

Getting your COGS calculation right hinges entirely on solid bookkeeping. If your records are a mess, your COGS number is just a guess, which throws off your profit margins and can even land you in hot water with the IRS. Think of it like trying to bake a cake without measuring cups—you might get something edible, but you definitely won't get the result you were hoping for.

The whole system is built on the foundational principles of double-entry bookkeeping. This is the bedrock of sound accounting, ensuring every transaction has an equal and opposite entry, which creates a self-balancing system that helps you catch errors before they spiral.

Misclassifying Expenses

One of the most common pitfalls I see is business owners confusing COGS with Operating Expenses (OpEx). It's an easy mistake to make, but it's crucial to get right. Costs like your shop's rent, marketing team salaries, or the office internet bill often get mistakenly lumped into COGS.

Here’s a simple rule of thumb: if you can't tie a cost directly to producing or purchasing a specific item you sold, it’s not COGS.

This isn't just a matter of semantics. When you misclassify expenses, you inflate your COGS and make your core business look less profitable than it truly is. Your income statement becomes muddled, and you lose clarity on where your money is actually going.

Recording COGS with a Journal Entry

Every single time you make a sale, two things happen from an accounting perspective: you earn revenue, and you incur the cost of that sale. A proper journal entry captures both sides of this coin, adhering to the matching principle of accrual accounting—expenses should be recognized in the same period as the revenue they helped create.

Let's walk through an example. Imagine you sell a handmade leather wallet for $80. You know the direct cost to make that wallet—the leather, thread, and your time—was $30.

Here’s how the two-part journal entry should look:

  1. Recording the Sale:

    • Debit Cash or Accounts Receivable: $80 (Your assets went up).
    • Credit Sales Revenue: $80 (Your income went up).
  2. Recording the Cost of the Sale:

    • Debit Cost of Goods Sold: $30 (Your expenses went up).
    • Credit Inventory: $30 (Your assets went down because the wallet is gone).

This process ensures your revenue is perfectly matched with its direct cost, giving you a crystal-clear, real-time view of your gross profit for that specific sale.

Forgetting About Returns and Damaged Goods

Business isn't always a straight line. Customers return items. A shipment arrives with damaged goods. These events have a direct impact on your inventory levels and, by extension, your COGS.

  • Customer Returns: When that $80 wallet comes back, you have to reverse the COGS entry. You’ll credit the COGS account and debit your Inventory account to show the wallet is back on your shelf and ready to be sold again.

  • Damaged or Obsolete Goods (Shrinkage): If you discover inventory is lost, stolen, or can no longer be sold, you need to write it off. This usually means crediting your Inventory account (to take it off the books) and debiting an expense account like "Inventory Shrinkage."

Ignoring these adjustments is like pretending the inventory never left or was never damaged. It leads to overstated inventory on your balance sheet and understated expenses on your income statement—a recipe for poor business decisions.

Setting Up COGS in QuickBooks Online

The good news is that modern accounting software like QuickBooks Online can automate most of this for you. The secret is in the initial setup.

When you're adding products, take the time to do it right:

  1. Go to the Sales menu and click on the Products and Services tab.
  2. When you add a new item you hold in inventory, make sure you correctly fill out the "Inventory asset account," "Sales price/rate," and "Cost" fields.
  3. The cost you enter in the "Purchasing information" is the magic number. That's what QuickBooks will use to calculate COGS every time you sell that item.

Once it's set up, QuickBooks will automatically create the correct two-part journal entry every time you create an invoice or sales receipt. It’s a huge time-saver that ensures accuracy.

For a deeper dive into keeping your financial records pristine, check out these essential bookkeeping best practices. They'll help you build a strong foundation for your business finances.

Why COGS Is More Than Just a Number on Your Tax Return

Getting a handle on your Cost of Goods Sold isn't just another bookkeeping task to check off the list. Think of it as a vital health metric for your business, telling you a story about your efficiency, profitability, and overall financial strength. It's a number that directly impacts your bottom line and your tax bill.

A laptop displaying a bar graph, calculator, documents, and a plant on a desk, with text 'COGS and TAXES'.

On your income statement, COGS is subtracted right from your total revenue. What's left is your gross profit—the money you have after paying for the direct costs of the items you sold. This figure is arguably one of the clearest indicators of your business's core financial health.

Turning Gross Profit into Actionable Insights

Your gross profit and its cousin, the gross profit margin (calculated as Gross Profit ÷ Revenue), open up a window into how well your business is really running. A strong margin is a great sign—it usually means your pricing is on point and you have a good grip on your production or purchasing costs.

But what if that margin starts to shrink? That's an early warning signal.

Tracking this metric helps you dig into some pretty critical questions:

  • Are my material or product costs slowly eating away at my profits?
  • Can my current prices support the kind of growth I’m aiming for?
  • Is it time to negotiate with suppliers or streamline how we make things?

These aren't just abstract numbers; they're direct clues telling you where to focus your attention. And this isn't just a small business issue. A five-year analysis of S&P 500 companies by Calcbench showed their collective cost of goods sold jumped by over 15%, which just goes to show how crucial managing these direct costs has become for everyone.

How COGS Directly Affects Your Tax Bill

Beyond day-to-day strategy, COGS has a huge role to play when it comes to taxes. The logic is straightforward but powerful: COGS is a business expense. The higher your COGS, the lower your gross profit.

Key Takeaway: A lower gross profit means lower taxable income. By accurately and thoroughly tracking your COGS, you can legally minimize the amount you owe in taxes.

This is why it’s so important to capture every single direct cost. If you forget to include expenses like freight-in charges or the wages of your assembly team, you're artificially inflating your profit. That means you'll end up paying taxes on money you never really made.

An accurate COGS calculation paints a true picture of your earnings, ensuring you aren't paying the IRS for "phantom profits." It's fundamental for smart financial management and staying compliant. Of course, tax prep goes beyond just COGS, so make sure you check out our complete small business tax preparation checklist to get fully prepared.

When you start treating COGS as a key performance indicator instead of just a line item, you'll uncover valuable insights that can sharpen your pricing, boost efficiency, and improve your financial health—all while making tax time a little less taxing.

When to Get Professional Help with Your Bookkeeping

Let’s be honest: managing your cost of goods sold is a lot more than just adding and subtracting. It’s a strategic puzzle involving inventory valuation methods, picky journal entries for every sale and return, and a real understanding of some pretty complex tax rules. As a business owner, your time is your most precious resource, and the hours you can lose wrestling with these details pile up fast.

The complexities we've walked through—from picking between FIFO and LIFO to meticulously tracking returns and damaged goods—are all little red flags. They’re signs that your DIY bookkeeping might be doing more harm than good. If you're spending more time buried in spreadsheets than you are steering the ship, it's probably time to call in an expert.

Free Up Your Time to Focus on What Matters

Think about it. How many hours a month do you sink into reconciling accounts or triple-checking inventory counts? Outsourcing your bookkeeping means you can hand all of that over to someone who lives and breathes this stuff.

Suddenly, you have that time back. Time you can spend serving your customers, developing new products, and actually growing your business. It's the classic shift from working in your business to working on it.

Gain Financial Clarity and Peace of Mind

A great bookkeeper does more than just crunch numbers. They build a reliable financial foundation for your business, making sure everything is accurate, compliant, and up-to-date. This translates into some major wins:

  • Real Financial Accuracy: No more costly mistakes in your COGS calculations. You’ll know your gross profit is a true measure of your business's health.
  • Smarter Decisions: With clean financial statements, you can make better calls on pricing, purchasing, and streamlining your operations.
  • A Better Tax Strategy: An expert will make sure you're capturing every single direct cost you're entitled to, which can lower your taxable income and free up cash.
  • Always Be Ready: Your books will be organized and squeaky clean, ready for any review from the bank, investors, or tax agencies like the IRS and the Washington State Department of Revenue.

At the end of the day, professional bookkeeping gives you the clear financial picture and the confidence you need to lead your business forward. You can finally relax, knowing your numbers are in good hands.

At Bugaboo Bookkeeping, we specialize in taking these complicated financial tasks off your to-do list for good. We help Washington-based businesses get a firm grip on their finances—from daily transaction coding to strategic tax planning—so you can get your time back and build a more profitable future.

Still Have Questions About COGS?

Even with the formulas and examples, some questions about the cost of goods sold pop up time and time again. Let’s clear up a few of the most common ones so you can feel confident applying these concepts to your own business.

Think of this as a quick-reference guide for those lingering "what if" scenarios.

Can a Service Business Have a Cost of Goods Sold?

Yes, absolutely. While the term COGS is most common for businesses selling physical products, service businesses have a direct equivalent. It's usually called "Cost of Sales" or "Cost of Revenue."

The principle is exactly the same: it includes all the direct costs you incur to deliver your service to a customer.

For instance, if you're a Washington-based marketing agency, your Cost of Sales would include things like:

  • Salaries for the designers and consultants who are hands-on with client work.
  • Software subscriptions that are used specifically for a client's campaign.
  • The ad budget you manage and spend directly on behalf of a client.

Your office manager's salary, on the other hand, wouldn't be included here. That’s an operating expense because it’s an indirect cost of keeping the business running.

Where Does COGS Show Up on a Tax Return?

For small businesses across the U.S., you'll calculate your total COGS on a specific form: IRS Form 1125-A, Cost of Goods Sold.

Once you have that final number, you transfer it over to your main business tax return. Depending on your business structure, that could be a Schedule C (for sole proprietors), Form 1120 (for corporations), or Form 1065 (for partnerships). This is why keeping clean, accurate records all year long is so important—it makes filling out Form 1125-A a straightforward task, not a year-end nightmare.

What's the Real Difference Between COGS and Operating Expenses?

The easiest way to remember the difference is to think direct versus indirect costs.

Cost of Goods Sold (COGS) covers the direct costs of making your product or delivering your service. These are the expenses that go up and down right alongside your sales. If you sell more, these costs increase.

Operating Expenses (OpEx), however, are the indirect costs of being in business. They're the expenses you have to pay just to keep the lights on, no matter how much you sell. This includes your office rent, marketing software, utility bills, and administrative salaries.

Keeping these two categories separate is absolutely crucial. It’s how you calculate your gross profit (Revenue – COGS), which gives you a clear picture of how profitable your actual products or services are before factoring in all the general business overhead.


Feeling like you're drowning in the details of COGS, inventory, and tax rules? You don't have to figure it all out on your own. The team at Bugaboo Bookkeeping is here to take these complex financial tasks off your hands so you can get back to what you do best—growing your business. Schedule your free consultation today!

Bugaboo Bookkeeping Icon

At Bugaboo Bookkeeping, we believe numbers should tell a story, not cause headaches. We specialize in turning messy spreadsheets, stacks of receipts, and even complex crypto transactions into clear, accurate books you can actually use. Our team bridges traditional bookkeeping with blockchain expertise, helping small business owners stay compliant while making sense of both dollars and digital assets.