Finlaa
Loans

The Inventory Formula Explained: How to Figure Out What’s Tied Up in Stock

30 July 2026

The Inventory Formula Explained: How to Figure Out What’s Tied Up in Stock

The Inventory Formula Explained: How to Figure Out What’s Tied Up in Stock


It is 11:00 PM on a Tuesday, and you are staring at a spreadsheet that refuses to balance.

Your bank account says one thing, your supplier invoice says another, and your warehouse (or your spare bedroom, let's be honest) is stuffed with boxes of products you bought three months ago. You know money is tied up in those shelves. You can see it. You can literally stub your toe on it. But translating those physical cardboard boxes into hard numbers for your taxes, your cash flow, or your next purchasing decision feels like trying to translate ancient Greek.

You aren't alone in this. Almost every growing business owner hits a wall where intuition stops working and math has to take over.

The good news? You don't need an accounting degree or a fancy, enterprise-grade software suite to figure this out. You just need a few basic lines of math. Let's break down the core inventory formula, walk through a real-world scenario step-by-step, and get your head around the numbers so you can finally close the laptop and get some sleep.


The Big Three: What You Actually Need to Measure

Before we drop any math on you, let’s clear the air on terminology. Accountants love to invent three-syllable words for things that are actually quite simple. When it comes to inventory, you really only need to care about three moving parts:

  1. Beginning Inventory: How much your stock was worth on Day One of whatever period you're looking at (say, the first of the month or the start of the year).
  2. Purchases: How much new stock you bought and added to your shelves during that period.
  3. Ending Inventory: How much your leftover stock is worth at the end of that period.

That’s it. Those three ingredients are the building blocks of almost every inventory calculation you will ever need to run. If you know what you started with, what you bought, and what is still sitting there collecting dust, you have everything required to figure out how your business is performing.


The Core Inventory Formula (Cost of Goods Sold)

The single most important calculation you will run as a product-based business owner is finding your Cost of Goods Sold (COGS).

Why do we care about COGS? Because you cannot calculate your actual profit until you know what it cost you to buy the items you sold. If you sell a handmade leather bag for $200, you didn't make $200 in profit. You made $200 minus whatever it cost you to make or buy that bag.

Here is the exact inventory formula for COGS:

$$\text{Cost of Goods Sold (COGS)} = \text{Beginning Inventory} + \text{Purchases} - \text{Ending Inventory}$$

Let’s translate that into plain English.

  • Take the value of the stock you started with.
  • Add the value of everything new you bought to sell.
  • Subtract the value of what is still sitting on your shelves right now.
  • Whatever is left over is the cost of the inventory that actually walked out the door into customers' hands.

Meet Maya: A Worked Example

To see how this works in real life, let’s follow Maya. Maya runs an online boutique selling specialized kitchen gadgets. It’s the end of Q3, and she is trying to figure out her numbers for her quarterly review.

Here is what Maya's ledger looks like for the quarter:

  • On July 1st (Beginning Inventory), Maya counted her stock. Based on what she paid her suppliers, the total wholesale value of those items sitting in her storage unit was $15,000.
  • Over July, August, and September (Purchases), business was brisk. She placed three big orders with her manufacturers, spending a total of $28,000 on new inventory.
  • On September 30th (Ending Inventory), Maya and her trusty barcode scanner went through the shelves again. She counted what was left. Valued at what she originally paid for it, that remaining stock is worth $12,000.

Now, let's plug Maya’s numbers into our inventory formula:

$$\text{COGS} = $15,000 \text{ (Beginning)} + $28,000 \text{ (Purchases)} - $12,000 \text{ (Ending)}$$

$$\text{COGS} = $43,000 - $12,000$$

$$\text{COGS} = $31,000$$

Maya’s Cost of Goods Sold for the quarter is $31,000.

Why is this number a lifesaver for Maya? Because now she can look at her total sales revenue for the quarter—say, $75,000—and subtract her $31,000 COGS. She finds she has a gross profit of $44,000. Without the inventory formula, she’d just see $75,000 in the bank and assume she was rich, completely forgetting that she had to sink thousands of dollars back into buying the goods in the first place.

(If you are running numbers for your business budget or looking at how business expenses tie into your broader financial picture, you might also find it helpful to check out tools like a general business finance calculator setup to keep your cash flow predictions steady.)


What Trips People Up: Common Inventory Mistakes

The formula itself is straightforward. But human nature, messy receipts, and weird edge cases love to muddy the waters. Here are the traps that catch most business owners off guard:

1. Mixing Up Retail Price with Wholesale Cost

This is the #1 mistake people make. When calculating inventory value for your balance sheet or COGS, you must use what you paid for the items, not what you plan to sell them for. If Maya bought a blender for $40 wholesale and plans to sell it for $100 retail, that blender goes into her inventory calculations at $40. If she uses the $100 retail price, her inventory math will be wildly inflated, her profit margins will look like fiction, and her accountant will gently (or not-so-gently) cry.

2. Forgetting "Shrinkage" (The Ghost Inventory)

Things happen. Items get damaged in transit, packages get lost in the mail, samples get handed out to influencers, and—yes—things occasionally walk out the back door. If your physical count (Ending Inventory) keeps coming up significantly lower than what your software or spreadsheet says it should be, you have shrinkage. If you don't account for damaged or missing goods, your ending inventory number will be fake, which means your COGS will be wrong, which means your tax return will be out of whack. Always do a physical count. Never rely purely on software theory.

3. Leaving Out Freight and Shipping Costs

When you buy inventory from a manufacturer, the invoice rarely stops at the cost of the items. There is shipping, freight, import duties, and customs broker fees. Strictly speaking, all of those costs required to get the inventory to your warehouse are considered part of the inventory's cost. If you spent $10,000 on goods and $1,000 on freight to get them shipped, your inventory value for those items is $11,000. Leaving shipping costs out of your calculations makes your profit margins look artificially high on paper.


Average Inventory: How Long Is Your Money Trapped?

Once you have mastered the basic COGS equation, you can unlock the next level of inventory sanity: figuring out how fast your stock actually turns into cash.

Nobody wants cash sitting in cardboard boxes for twelve months. You want that inventory moving. To measure this, we use the Average Inventory formula and the Inventory Turnover Ratio.

First, let's find your average inventory over a period:

$$\text{Average Inventory} = \frac{\text{Beginning Inventory} + \text{Ending Inventory}}{2}$$

Taking Maya’s numbers from earlier:

  • Beginning Inventory = $15,000
  • Ending Inventory = $12,000

$$\text{Average Inventory} = \frac{$15,000 + $12,000}{2} = \frac{$27,000}{2} = $13,500$$

On average during that quarter, Maya had $13,500 tied up sitting on shelves.

Now, how many times did she clear out and replace that average amount of stock? That’s your Inventory Turnover Ratio:

$$\text{Inventory Turnover} = \frac{\text{COGS}}{\text{Average Inventory}}$$

$$\text{Inventory Turnover} = \frac{$31,000}{\text{COGS}} \div $13,500 \text{ (Average Inventory)} = 2.29$$

This means Maya turned over her entire inventory roughly 2.3 times during the quarter.

To turn that into a timeline (Days Sales of Inventory, or how many days it takes to sell through your stock), you divide 365 days by your annual turnover, or the number of days in the period by your quarterly turnover. A higher turnover means your cash is moving, your storage costs are low, and your products are fresh. A low turnover means you are holding onto "dead stock" that is quietly eating away at your working capital.


FIFO vs. LIFO: Why the Order Matters

If every single item you bought cost the exact same price forever, inventory math would be boring. But suppliers raise prices, inflation happens, and suddenly the mugs you bought in January cost $3 each, while the exact same mugs you bought in October cost $4.50 each.

How do you assign a cost to the items you sold? Enter the two famous accounting methods:

  • FIFO (First-In, First-Out): You assume that the oldest items in your inventory are the ones you sold first. In an era of rising prices, FIFO usually results in a lower COGS and a higher reported profit, because your older, cheaper stock is being wiped out first.
  • LIFO (Last-In, First-Out): You assume that the newest items you bought are the ones you sold first. This results in a higher COGS and lower taxable income during inflationary periods. (Note: LIFO is widely used for U.S. tax purposes under specific rules, but is banned under International Financial Reporting Standards (IFRS) used in the UK, India, and much of the rest of the world).

For most small-to-medium businesses—especially online retailers—FIFO is the natural reflection of how physical stock moves. You don't deliberately bury your oldest inventory at the bottom of the bin and let it sit there while you ship out the fresh stuff. You clear out the old stock first.


Why This Matters for Your Cash Flow

It is very easy to look at a booming sales month and feel like a financial genius. We brought in $50,000! We are killing it!

Then reality hits. You realize you have to pay rent, settle your credit cards, and—most importantly—reorder inventory because your shelves are looking bare. If you spent all that $50,000 revenue on personal salary or operating expenses without keeping enough back to replace your sold stock, you are about to hit a brick wall.

Your inventory formula is your early-warning system. It tells you:

  1. Exactly what your products cost you to sell.
  2. How much dead weight you are carrying on your shelves.
  3. How much cash you actually need to set aside to fund your next round of purchases without dipping into your personal savings or taking out emergency loans.

Managing cash flow alongside business growth can feel like juggling glass balls. If you are balancing loan payments, business investments, or trying to forecast what your operational budget looks like next quarter, take a look at the free tools available on Finlaa to run the scenarios before you commit real money. You can plan your business finances, check loan structures, and model your growth without any guesswork.


You Can Breathe Now

Take a look back at that spreadsheet. It doesn't look quite so terrifying now, does it?

You don't need to know every arcane rule of corporate accounting to run a healthy business. You just need to know what you started with, what you bought, and what is left over.

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

Write that sticky note, slap it on your monitor, and give yourself permission to step away from the numbers for the night. You've got a handle on it now.


Frequently Asked Questions

What if I don't know my exact Beginning Inventory? If you are starting fresh or trying to reconstruct past records, your beginning inventory for the current period must match the ending inventory of the previous period. If last month's ending count was $10,000, then this month's beginning count is automatically $10,000. If you have never counted your inventory before, you will need to do a complete physical stock count today, assign wholesale values to everything, and use that baseline as your starting point moving forward.

Should I include shipping and taxes when valuing my inventory? Yes to shipping and freight costs; generally no to sales tax. Any direct cost required to get the inventory delivered to your door (freight, shipping, import duties) is part of the inventory's cost basis and should be added. However, sales tax paid when purchasing goods is usually handled separately as a tax credit or expense, not folded into the item's valuation.

What is considered a "good" inventory turnover ratio? It depends entirely on your industry. A grocery store might turn its inventory over 15 to 20 times a year because food spoils quickly. A luxury furniture maker or specialized industrial parts supplier might only turn their inventory over 2 or 3 times a year. The best benchmark isn't an arbitrary industry average—it’s your own historical trend. If your turnover rate is speeding up compared to last year, your cash is moving faster and your business is becoming more efficient.


Disclaimer: This article is for informational and educational purposes only and does not constitute formal financial, accounting, or tax advice. Every business's tax situation and accounting requirements are unique—when in doubt, consult a qualified certified accountant in your region.

Explore free financial tools and calculators on the go with the Finlaa app.

Related calculators

Related articles