Finlaa
Loans

Cost of Goods Sold Formula: How to Calculate COGS (Without the Headache)

30 July 2026

Cost of Goods Sold Formula: How to Calculate COGS (Without the Headache)

Cost of Goods Sold Formula: How to Calculate COGS (Without the Headache)

You are probably sitting at a kitchen table covered in receipts, maybe with a half-empty mug of cold tea at your elbow, staring at a spreadsheet that refuses to balance.

You started your business because you loved making things—whether that's hand-poured soy candles, custom leather wallets, or specialized software modules packaged with physical hardware. But right now, you are drowning in invoices, material costs, and shipping fees.

You need to know how much it actually costs you to make the things you sell.

Every time someone asks you about your profit margins, you feel that familiar knot in your stomach. You guess. You hope the number in your bank account at the end of the month means you’re winning. But deep down, you know guessing is a dangerous game.

Let’s change that right now. We are going to demystify the cost of goods sold formula, walk through a real-world example together, and get you to a place where you can look at your pricing with total calm and clarity. No jargon, no dry textbook definitions—just the practical math you need to run your business with confidence.


What COGS Actually Means (And Why Your Bank Account is Lying to You)

Before we dive into the math, let's clear up a common trap.

Many business owners look at their total revenue at the end of the month, subtract their rent, their software subscriptions, and their marketing ads, and think, “That’s my profit!”

It isn’t.

Those are operating expenses. Your Cost of Goods Sold (COGS) is something entirely different. It represents the direct, direct costs required to produce or acquire the specific items you sold during a given period. If you didn’t sell the item, you didn’t incur that specific cost.

Think of it as the boundary line between making your product and running your business.

  • The fabric, buttons, and thread you bought to make a jacket? That's COGS.
  • The electricity bill for the retail shop where you sell it? That's an operating expense.

When you confuse the two, you price your products too low. You work sixty hours a week, feel busy all the time, and wonder why there is never any cash left over. Calculating your COGS fixes that blind spot once and for all.


The Core Formula: Three Simple Numbers

At its heart, the cost of goods sold formula is surprisingly straightforward. It looks at the inventory you started with, the inventory you added during the period, and what you had left at the end.

Here is the exact formula:

$$\text{COGS} = \text{Beginning Inventory} + \text{Purchases} - \text{Ending Inventory}$$

Let’s break down what each of those three pieces means in plain English:

  1. Beginning Inventory: The total financial value of all the raw materials, supplies, and finished goods you had sitting on your shelves on day one of the accounting period (like January 1st). This number should match the ending inventory number from your previous period.
  2. Purchases (or Production Costs): Everything you spent during that period to buy new raw materials, pay for direct labor to make the products, or acquire finished goods from suppliers.
  3. Ending Inventory: The total value of the unsold goods and unused materials still sitting on your shelves on the final day of the period (like December 31st).

That’s it. Three numbers. But getting those numbers right requires knowing what’s allowed inside the fence and what stays outside.


What Goes Into COGS (And What Doesn't)

Here is where most people trip up. They either stuff everything into COGS—making their cost look artificially high—or they leave out crucial expenses, making their products look wildly profitable when they are actually losing money.

What Does Belong in COGS:

  • Raw materials: The actual stuff your product is made of (wood, metal, fabric, chemicals, packaging).
  • Direct labor: The wages paid to the people who are physically building, assembling, or manufacturing the product. (If you pay an artisan £20 an hour specifically to stitch your bags, that’s direct labor. If you pay a receptionist to answer phones, that’s an operating expense).
  • Factory overhead (sometimes): Utilities, rent, and depreciation on the actual machinery used in the production process.

What Does Not Belong in COGS:

  • Sales and marketing: Google ads, social media management, or the cost of running your website.
  • Administrative costs: Accounting fees, legal advice, office supplies, and general administrative salaries.
  • Shipping to customers: The cost of sending a finished product to a buyer generally goes under operating expenses or fulfillment costs (though inbound shipping costs to get raw materials can sometimes be factored into inventory value).

Keeping these lines clear ensures your pricing decisions are based on reality.


A Step-by-Step Example: Meet Sarah and Her Ceramic Mugs

Let’s walk through how this works in the real world. Meet Sarah. She runs a small boutique pottery studio. She wants to calculate her COGS for the past quarter so she can figure out if her signature ceramic mugs are priced correctly.

Sarah opens her spreadsheets, checks her receipts, and pulls together her numbers for Q3:

  • On July 1st (Beginning Inventory), she takes stock of the clay, glaze, and finished mugs sitting in her studio. She values them at £4,000.
  • Throughout July, August, and September (Purchases), she buys £6,500 worth of fresh clay, raw glaze ingredients, and kiln supplies. She also pays £2,000 in wages to an assistant who helps throw and glaze the pots (direct labor). Total additions come to £8,500.
  • On September 30th (Ending Inventory), she does a final count of everything left in the studio. She multiplies the remaining materials and unsold mugs by their production cost, landing at an ending inventory value of £3,500.

Now, let's plug Sarah's numbers into our formula:

$$\text{COGS} = \text{Beginning Inventory (£4,000)} + \text{Purchases (£8,500)} - \text{Ending Inventory (£3,500)}$$

$$\text{COGS} = £12,500 - £3,500 = £9,000$$

Sarah’s Cost of Goods Sold for the quarter is £9,000.

Why is this number so valuable to Sarah? Because if she sold 600 mugs during that same quarter, she now knows her exact unit cost: £9,000 divided by 600 mugs means each mug costs her £15 to produce. If she’s currently selling them on her website for £22, she sees a gross profit of £7 per mug—giving her the clarity she needs to decide whether rent, packaging, and her own time are covered by that margin.

Note: Running numbers for your own business or exploring other financial planning tools can help tie these expenses together. Whenever you are mapping out overhead or business models, using a dedicated financial tool can save hours of manual math.


Common Mistakes That Ruin Your COGS Calculation

Even with a simple formula, small errors compound quickly. Here are the traps that catch business owners off guard, and how to dodge them.

1. Mixing Up Inventory Valuation Methods

How do you value the items sitting on your shelf? If you bought clay at £10 a bag last year and £15 a bag this year, which price do you use when calculating your ending inventory?

There are two primary methods businesses use:

  • FIFO (First-In, First-Out): You assume the oldest inventory is sold first. In times of inflation, this usually shows higher profits because older, cheaper materials are expensed first.
  • LIFO (Last-In, First-Out): You assume the newest inventory is sold first. (Note: LIFO is not permitted under international accounting standards like IFRS, though it is used in certain US tax contexts).

Consistency is what matters most here. Whatever method you choose to value your inventory, stick with it from quarter to quarter so your trends make sense.

2. Forgetting Freight and Inbound Shipping

When you buy raw materials from a supplier, the cost of shipping those materials to your warehouse or studio is part of acquiring them. Leaving delivery fees out of your purchase totals means your inventory is undervalued, which quietly distorts your COGS.

3. Ignoring Shrinkage and Spoilage

Things break. Materials expire. In Sarah’s pottery studio, a batch of mugs might crack in the kiln, rendering them worthless.

If you bought £1,000 of clay, but £200 worth of it shattered into unusable shards during firing, those shards didn't generate revenue. They represent inventory write-offs or shrinkage. Failing to account for damaged goods means your ending inventory looks higher than it actually is, which throws off your entire calculation.


What Changes the Answer? (Edge Cases to Watch For)

No two businesses are identical, which means your COGS calculation might need a few tweaks depending on your exact business model.

If You Sell Services Instead of Physical Products

If you are a freelance consultant, a graphic designer, or a software developer, your inventory might look like zero. You aren't shipping physical widgets.

Does that mean you don't have COGS? Not necessarily. Many service businesses use a modified version of COGS often called Cost of Services Sold (COSS). If you hire subcontractors specifically to help deliver a client’s project, or if you pay for specialized software licenses required exclusively to deliver that single client's contract, those are direct costs tied directly to revenue. Treat them the same way you would treat physical materials.

If You Manufacture at Scale

If you run a growing operation with warehouses, multiple suppliers, and complex supply chains, your overhead allocation becomes trickier. You may need to factor in storage costs, warehouse staff wages, and equipment depreciation.

When your operations grow to this level, keeping track of cash flow across production cycles becomes critical—especially if you're managing operational costs alongside business expansion. Keeping your calculations clean ensures you don't accidentally scale an unprofitable product line.


The Real Payoff: Turning Numbers Into Peace of Mind

Let’s return to Sarah for a moment.

Before she sat down to calculate her COGS, she was pricing her mugs based on a vague feeling that £22 felt "about right" for the market. She was stressed, constantly worried about her cash flow, and unsure why her bank account never seemed to match her sales volume.

Once she ran the formula, everything shifted:

  • She discovered her true unit cost was £15.
  • She realized that after packaging and transaction fees, she was barely making any profit on the mugs she sold through wholesale partners.
  • She confidently raised her retail price to £28 and restructured her wholesale agreements.

Her sales volume dropped slightly, but her total profit went up. She worked fewer hours, produced fewer items, and kept more money in her pocket.

That is what mastering the cost of goods sold formula does for you. It replaces gut-wrenching guesswork with calm, factual clarity. You stop wondering if you're working for free, and you start running a business that works for you.

Take a deep breath. Pull out your last quarter’s receipts, grab your beginning inventory, add your purchases, and subtract what’s left on the shelf. You've got this—and once that number is locked in, the rest of your business decisions will finally fall into place.


Frequently Asked Questions

Is COGS an expense on the income statement?

Yes. On your income statement (or profit and loss statement), COGS is subtracted directly from your total revenue to calculate your gross profit. Operating expenses are then subtracted from your gross profit to find your net income.

What happens if I make a mistake on my ending inventory?

Because ending inventory is subtracted in the formula, an error there creates a ripple effect. If you overestimate your ending inventory, your COGS looks artificially low, which makes your profits look artificially high (meaning you might pay more tax than necessary). If you underestimate ending inventory, your COGS looks too high, making your business look less profitable than it is. Accuracy here pays off.

Do I need special accounting software to calculate COGS?

Not at all. While software can automate tracking inventory turnover, you can easily calculate COGS using a simple spreadsheet or even pen and paper. The most important habit is simply doing the count consistently at the end of every month, quarter, or year.

Disclaimer: This article is for general informational purposes and does not constitute formal financial or tax advice. Every business's financial situation is unique, and it is always wise to consult a qualified accountant or tax professional regarding your specific books.

For help running calculations on the go, check out the free Finlaa app.

Related calculators

Related articles