A Practical Guide to Calculate Cost of Goods Sold

Issabelle Fahey

Issabelle Fahey

Head of Growth
9 March 2026

Let’s be honest. You think you’re profitable, but are you sure? The single biggest mistake I see founders make is equating revenue with success. They’ll celebrate a record sales month, all while the company bank account is mysteriously shrinking.

The reason is simple: they’re ignoring the real story. The real story is told by your gross profit, and you can’t get to that number without nailing your Cost of Goods Sold (COGS).

A seesaw showing 'COGS' weighing down 'Revenue' (trophy), with a surprised businessman looking on.

What Is COGS, Really?

Forget the accounting textbooks for a minute. COGS is the ultimate truth serum for your business. It’s the direct cost of making the stuff you sell. It’s what separates companies that scale from those that slowly bleed out, one mispriced product at a time.

Calculating COGS forces you to confront the real, unsexy cost of doing business. It generally includes:

  • Direct material costs: The obvious stuff, like the fabric for your t-shirt line or the coffee beans for your café.
  • Direct labor costs: The wages you pay the people who actually assemble your product. No, this doesn't include your marketing intern—just the makers.
  • Other direct costs: This is where things get messy. It includes shipping to get raw materials to your warehouse, import duties, and even the box your product ships out in.

My rule of thumb: If you absolutely cannot make and sell your product without a specific cost, it probably belongs in COGS. Don't overthink it.

The basic formula is straightforward. But the devil, as always, is in the details.

COGS Formula at a Glance

This table breaks down the classic formula. Looks simple, right?

Component What It Means Simple Example
Beginning Inventory The value of all the stuff you had on hand at the start of the period. You had $10,000 worth of unsold widgets on January 1.
+ Purchases The cost of all new inventory you bought during the period. You spent $5,000 on new parts and materials in Q1.
– Ending Inventory The value of everything left on the shelves at the end of the period. On March 31, you count $7,000 worth of unsold widgets.

Using the example numbers, your COGS is $10,000 + $5,000 – $7,000 = $8,000.

Getting this number right is the first step toward a healthy profit and loss statement. It’s the diagnostic tool that tells you if your pricing is brilliant, your production is efficient, or if you’re just lighting money on fire.

In a world obsessed with top-line revenue, knowing what it costs to earn that revenue isn't just smart—it's a superpower.

Deconstructing the COGS Formula Beyond the Basics

Alright, let's get our hands dirty. You’ve seen the formula: Beginning Inventory + Purchases – Ending Inventory = COGS. On a whiteboard, it looks simple enough. Almost deceptively so.

Here’s the thing: that little formula is a minefield. The reason so many founders get it wrong isn’t the math—it's what they're stuffing into the "Purchases" bucket. This is where fantasy financials are born. If you think "Purchases" is just the sticker price from your supplier, you're already overstating your profits.

Don't be that founder.

The Real Cost of Your "Purchases"

Let’s talk about what "Purchases" actually means in the trenches. It's every single cent you spent to get that inventory onto your shelves, ready to sell. I call these "landed costs," and they are absolutely non-negotiable parts of your COGS.

Your true cost of purchases is more than just the product cost:

  • Supplier Price: The easy one—the baseline cost of the goods.
  • Freight-In: A biggie that’s often missed. This is the shipping cost to get inventory from your supplier to your warehouse.
  • Import Duties & Tariffs: That lovely bill from customs. It’s not an operating expense; it’s a direct cost of your inventory.
  • Non-Recoverable Taxes: Any sales taxes or VAT you paid that you can’t claim back.
  • Insurance: The cost to insure your goods while they're floating across an ocean. If the container ship sinks, you'll be glad you paid it—and yes, it’s part of your product’s cost.

Forgetting even one of these can wreck your numbers. You might think you have a 40% gross margin when, in reality, it's closer to 25%. That's a death sentence for a growing business.

The most dangerous number in your business is a COGS you can’t trust. It gives you false confidence to spend money you don’t actually have.

Let’s Run the Numbers: A Real-World Example

Let's say you run an e-commerce store selling high-end leather bags. You order 100 bags from a manufacturer in Italy.

The invoice is for €10,000. At today's exchange rate, we'll call that $10,800. The rookie move is to stop there and log $10,800 as your cost.

But wait, there’s more.

To get those bags to your warehouse, you have to account for sneaky expenses like sea freight costs, which adds another $1,200. Then, US Customs slaps you with a $950 import tariff. And you wisely paid $250 for freight insurance.

Let’s add it up properly:

Cost Component Amount
Supplier Cost $10,800
Ocean Freight $1,200
Import Duties $950
Insurance $250
Total Landed Cost $13,200

Suddenly, your cost per bag isn't $108—it's $132. That’s a 22% difference. If you priced your bags based on the lower cost, you just gave away your profit before you even made a sale. This is how you calculate cost of goods sold correctly.

This isn’t just an academic exercise. As global trade gets more complex, these "hidden" costs matter more. For startups sourcing globally, this is a minefield of escalating freight costs, tariffs, and currency swings. Miscalculating COGS by just 5% could evaporate $50,000 in profit for a business with $1M in sales.

Getting this right isn’t about being an accounting nerd. It’s about knowing your business inside out. It’s about having a number you can trust when you make critical decisions. Don't guess—calculate.

FIFO vs. LIFO: Choose Your Fighter

Here’s where accounting gets interesting. Your choice between First-In, First-Out (FIFO), Last-In, First-Out (LIFO), and Weighted-Average Cost isn't just a box to check—it's a strategic decision that hits your reported profits and your tax bill.

Getting this wrong has real financial consequences. The method you choose dictates how you calculate cost of goods sold, which defines your gross profit. Before we dive in, let's look at the basic flow.

Flowchart illustrating the Cost of Goods Sold (COGS) formula with beginning inventory, purchases, and ending inventory.

As the diagram shows, the idea is simple: what you start with, plus what you add, minus what's left, is what you sold. The tricky part is figuring out the value of the items you sold versus the ones still on your shelves. Let's break down the three ways to do it.

FIFO: First In, First Out

FIFO is the most common and logical method. It assumes the first items you bought are the first ones you sell. Think of a grocery store pushing older milk to the front of the shelf. That's FIFO.

During a period of rising prices (inflation), this means your COGS will be based on older, cheaper inventory. The result? A lower COGS, which makes your gross profit look higher. Investors like this, but it also means you'll report more income and pay more in taxes. Ouch.

LIFO: Last In, First Out

LIFO is the total opposite. It assumes the last items you bought are the first ones to be sold. Imagine a hardware store with a bin of nails—customers grab from the top, where the newest inventory was just dumped.

In an inflationary environment, LIFO matches your most recent, higher costs against your revenue. This gives you a higher COGS, which lowers your reported profit and, crucially, your taxable income. The tax savings can be significant.

So why doesn't everyone use LIFO? For one, it can make your profitability look weaker to investors. More importantly, LIFO is banned under International Financial Reporting Standards (IFRS), so it’s not an option for many companies operating globally. It’s a bit of a US-only quirk.

Weighted-Average Cost: The Middle Ground

If FIFO and LIFO feel like two extremes, the Weighted-Average Cost (WAC) method is your answer. It's the great equalizer.

You simply calculate the average cost of all the goods you have for sale by dividing the total cost of your inventory by the total number of units. This one average cost is then applied to every item you sell. It’s more stable and often simpler to manage since you don't have to track individual cost layers. It’s the "good enough" option.

My two cents: For most e-commerce and startups, just use FIFO. It's simple, universally accepted, and follows the physical flow of most products. Don't get cute with LIFO for the tax break unless you're in a specific industry and have a CPA who swears by it.

Why This Choice Matters More Than Ever

Picking an inventory method isn't a "set it and forget it" task. In today's economy, it's a critical strategic decision. Recent pricing pressures are forcing everyone to re-evaluate how they account for COGS.

With US core goods inflation at 1.1% and G20 imports rising 3.1% in Q1 2025, your inventory valuation has a direct, measurable impact on your bottom line. For a business with $500K in COGS, a 7% hike in input costs adds up to $35K. Your choice of FIFO or LIFO can either magnify or minimize that hit. You can read more about how global trends are affecting pricing strategies and what it means for you.

The key takeaway? Consistency is mandatory. The IRS won't let you switch methods every year to chase a better tax outcome. Changing requires filing Form 3115. So choose a method, understand how it affects the way you calculate cost of goods sold, and stick with it.

Periodic vs. Perpetual Inventory: Are You Driving Blind?

When it comes to tracking inventory, you have a fundamental choice. You can use the old-school, "we'll figure it out later" method, known as the periodic inventory system. Or you can adopt the modern, "I know my numbers right now" approach, the perpetual inventory system.

This isn't just an accounting detail. It determines whether you're making business decisions with real-time data or with a blindfold on.

The Periodic System: The Rearview Mirror Approach

Let's start with periodic. With this method, you don't track COGS as sales happen. Instead, you wait until the end of a period—a month, a quarter, or (and I’ve seen this go badly) an entire year—to do a massive physical inventory count. Yes, you and your team literally count every single thing on the shelves.

Only after that soul-crushing count can you plug the numbers into your COGS formula. It’s like driving a car by only looking in the rearview mirror. You have a perfect view of where you've been, but no idea what's right in front of you. It's a huge problem.

This method might seem easier because it defers the work. But that simplicity is a trap. It leads to huge, disruptive counts and leaves you with zero daily visibility into your own profitability.

The Perpetual System: Finally, Some Clarity

Now, let's talk about the perpetual inventory system. This system continuously—or perpetually—updates your inventory and Cost of Goods Sold records every time you make a sale.

When you sell a product, your software instantly does two things:

  1. It records the revenue.
  2. It records the COGS for that item and deducts it from your inventory.

Frankly, this is the only way to run a modern business. You get a real-time, accurate picture of your gross profit on every single transaction. You know which products are making you money and which are just taking up space. You can also see when to reorder, helping you avoid both stockouts and costly overstock.

Yes, setting up a perpetual system takes more work up front. It requires the right software and discipline. But the payoff isn't just about saving time—it's about having the power to make smart decisions based on what's happening today, not last quarter.

Understanding your inventory flow is critical. Detailed reports like Amazon Inventory Ledger Summary reports give you the granular data needed to reconcile your stock. In a perpetual system, this data becomes your source of truth.

Any business still choosing a periodic system is intentionally playing on hard mode. You're leaving money on the table. For a more structured way to handle your financials, digging into month-end close best practices can help you build the discipline a perpetual system needs.

Running your business without real-time data isn't a strategy. It's a gamble you can't afford to take.

Automating COGS: The Smart Way Out of Spreadsheet Hell

An animated image showing a person automating COGS calculation on a laptop, connecting global locations to financial outcomes.

If your head is spinning after all that, I get it. You're a founder, not an accountant. Your time is better spent finding customers, not drowning in spreadsheets trying to calculate the cost of goods sold.

Suddenly, your main job is triple-checking inventory costs and reconciling shipping receipts. It's a classic founder trap. Hope you enjoy spending your afternoons fact-checking invoices—because that’s now your full-time job.

But it doesn’t have to be your reality.

The Smart Play for Flawless Financials

Let's be direct. You don't have time for this. You didn't launch a company to become an expert in FIFO vs. LIFO or to manually track landed costs. Every hour you wrestle with these details is an hour you’re not spending on growth.

This is where savvy founders make a pivotal decision. Instead of doing it themselves or hiring an expensive in-house CPA, they find expert help for a fraction of the cost.

The solution? Hiring pre-vetted, English-fluent accountants from Latin America. We’re talking about seasoned pros who live and breathe this work, available for as little as $10/hour. They work in your time zone, know US GAAP, and can lift this entire burden from your shoulders.

This isn't just about offloading a task. It's a strategic move to build a solid financial foundation so you can make decisions with confidence instead of just guessing.

What an Expert Actually Does for You

So, what does this look like in practice? It goes way beyond basic bookkeeping. A skilled remote accountant can completely organize your financial operations.

Here’s what they can handle:

  • Set up and manage your perpetual inventory system: This is priority number one. They’ll configure your software to track inventory and COGS in real-time.
  • Run inventory valuation models: FIFO, LIFO, WAC—they’ll manage the calculations flawlessly every month. No more year-end scrambles.
  • Deliver perfect COGS reports: Imagine getting a crystal-clear COGS calculation delivered to you before your morning coffee. This ensures you always know your true gross profit.
  • Integrate your systems: They’ll connect your e-commerce platform, inventory software, and accounting programs so they talk to each other. You can check out some of the top platforms in our guide to the best accounting software for small business to see what tools they can master for you.

When you add it all up, we're talking about cost savings of 80-90% compared to a full-time US-based hire. It's a massive competitive advantage.

Turn Economic Headwinds into an Opportunity

This kind of expert support is more critical than ever. With new tariffs in 2025 driving up costs and the CBO projecting slower growth as these levies inflate prices, companies are feeling the squeeze. A mid-sized business could easily see its COGS jump by 20-30%. You can read more about these economic projections and their impact directly.

But what if you could turn that pressure into a strategic edge? By bringing on a remote financial analyst from Latin America for under $3K/month, you gain the expertise to model tariff scenarios, find cost efficiencies, and adjust your pricing strategy in real time.

While your competitors are flying blind, you’ll be making data-backed moves to protect your margins. Getting expert help isn't an expense; it's an investment in your company's survival.

Frequently Asked Questions About COGS

Once you start digging into the cost of goods sold, the same questions pop up again and again. Let's tackle the most common ones I hear from founders.

What Are the Most Common Mistakes Businesses Make When Calculating COGS?

It’s always the small stuff. The single biggest mistake is forgetting to include all the direct costs that aren't the product itself. Everyone remembers raw materials, but they forget about shipping costs to get those materials to their warehouse (freight-in), import duties, or the cost of the box the finished product goes in. All of it belongs in COGS.

Another classic error is getting wishy-washy with your inventory valuation method. You can’t use FIFO one month and then switch to LIFO the next to make your margins look better. That’s a major red flag for the IRS and makes your internal reporting useless.

Consistency is everything. Pick a method and stick to it. The moment you start making exceptions, your financial data loses its integrity.

Finally, poor inventory management will sink your accuracy. If you’re only doing a physical count once a year, you’re flying blind for the other 364 days. That's a terrifying way to run a business.

Does a SaaS Company Have a Cost of Goods Sold?

Yes, but we usually call it Cost of Revenue (COR) to sound fancy. The principle is the same: it includes all costs directly associated with delivering your service to paying customers.

For a software business, this would include:

  • Hosting Costs: That monthly bill from AWS, Google Cloud, or Azure. Your service can't run without it.
  • Essential Third-Party Services: Any APIs or data services core to your product, like a mapping API or payment gateway fees.
  • Key Personnel: This is a big one. The salaries for your customer support team, implementation specialists, and the engineers who keep the platform from catching fire are all part of your COR.

What’s left out? Sales commissions, ad spend, and the salaries of developers building brand-new features. Those are operating expenses—they're about acquiring new customers or building for the future, not serving current ones.

How Often Should I Calculate COGS?

In real-time. That's the only right answer. If you're selling physical products, you need a perpetual inventory system that updates COGS with every sale. This gives you a live pulse on your gross profit.

If you’re still using a periodic system (and you really should stop), the absolute minimum is monthly. Calculating COGS quarterly or annually is way too slow. You'd be making critical decisions based on data that's months out of date.

If your first thought is, "We just don't have time for that," take it as a clear signal. That isn't a time management problem; it's a systems and staffing problem that needs to be solved.

Can I Switch My Inventory Accounting Method From FIFO to LIFO?

You can, but it's a formal process. The IRS requires you to file Form 3115, "Application for Change in Accounting Method," because they don’t want businesses flipping back and forth to manipulate their tax bill.

You'll need a solid business reason, and "I want to lower my taxes" won't cut it. Once the IRS approves it, you're generally stuck with the new method for at least five years. This is a big decision—talk to your CPA before even considering it.


Feeling overwhelmed by inventory valuation, IRS forms, and perpetual systems? You’re a founder, not a full-time accountant. Let an expert handle the details. At HireAccountants, we’re not saying we’re perfect. Just more accurate more often. Find a pre-vetted, English-fluent accountant from Latin America for as little as $10/hour. They’ll make sure your COGS is accurate, so you can get back to growing your business. Find your expert today.

Ready to streamline your accounting?

Let's simplify your finances today!