What is cost of goods sold? Cost of goods sold (COGS) is the direct cost of the products a business sold during a set period. You find it with a simple formula: beginning inventory + purchases − ending inventory. It covers what you paid for the goods and the cost of getting them ready to sell, but it leaves out general expenses such as rent, marketing and office wages.
That one number does a surprising amount of work, because it tells you your gross profit, shapes your tax bill, and shows whether your prices still cover what you pay suppliers. Below, we break down what counts and what does not, walk through the cost of goods sold formula, and show how to calculate cost of goods sold with 3 examples you can copy.
What Is Cost of Goods Sold?
Think of COGS as the price tag on everything that went out the door as a sale. If a bike shop buys a bike for $400 and sells it for $650, that $400 is the cost of goods sold for that sale, and the $250 left over is gross profit before rent, staff and the electricity bill.
Accountants care about COGS because it sits right under revenue on the income statement, and lenders and investors look at it to judge how healthy your margins really are. The tax office cares too, because a higher COGS means lower taxable profit, so it expects the number to be honest and properly supported.
COGS only counts goods that were actually sold. Stock still sitting on your shelves is not an expense yet, so it stays on the balance sheet as an asset until the day it sells, gets used up, or is written off.
What Counts in COGS (and What Does Not)
The rule of thumb is simple: if a cost goes directly into getting a product ready to sell, it belongs in COGS, but if you would pay it even with zero sales this month, it probably does not.
| Usually included in COGS | Usually left out of COGS |
|---|---|
| Price paid to suppliers for goods you resell | Rent for your office or shop front |
| Raw materials and parts used to make products | Marketing and advertising |
| Wages for staff who make the products | Salaries for sales, admin and managers |
| Freight and duty to bring goods in | Shipping orders out to customers |
| Factory overhead, such as power for machines | Software, phone and office supplies |
| Packaging that is part of the product | Bank fees and interest |

There are grey areas, of course. A small brewery might wonder whether the electricity for its bottling line counts, and in most cases it does, because it is part of making the product. When you are unsure, ask your accountant once, write down the answer, and treat that cost the same way every year, since being consistent matters as much as being exact.
The Cost of Goods Sold Formula
Here is the cost of goods sold formula most small businesses use:
COGS = Beginning inventory + Purchases − Ending inventory
It looks almost too short to be useful, so let’s go through each part one at a time.
- Beginning inventory is the value of the stock you had at the start of the period, which is the same number as the ending figure from the previous period.
- Purchases are the goods you bought or produced during the period, including freight in, but excluding any returns you sent back to suppliers.
- Ending inventory is the value of the stock left at the end of the period, based on a count.
The logic is easy to picture. Add what you started with to what you brought in, and you have everything you could possibly have sold during the period. Take away what is still on the shelf, and what remains is the cost of what actually went out the door, which is your COGS.

Some people call it the COGS formula and others say cost of sales, but they mean the same thing for a business that sells physical goods. Online sellers, wholesalers and small manufacturers all use this version.
How to Calculate Cost of Goods Sold in 5 Steps
If you have never done it before, here is how to calculate cost of goods sold without getting lost. Set aside about an hour the first time, and after that it usually takes only a few minutes.
- Pick the period. Choose a month, a quarter or a year, although monthly is best for spotting problems early.
- Find your beginning inventory value. Use the closing figure from the previous period, or, if this is your first time, count your stock on day one and price it at what you originally paid.
- Add up your purchases. Total every supplier bill for goods you resell or materials you use, add freight in, and subtract any returns or discounts you received.
- Count what is left. Count the stock on the last day of the period and value it at cost rather than at your selling price, which gives you your ending inventory.
- Run the formula. Add beginning inventory to purchases, subtract ending inventory, and the answer is your COGS for the period.
Step four is where most errors creep in, because a miscounted shelf or a box nobody logged throws the whole answer off. If your counts are shaky, your COGS will be shaky too, no matter how carefully you add up the supplier bills.
3 COGS Examples
Numbers usually make this click faster than rules do. Here are three COGS examples, starting with a simple shop and a small manufacturer, followed by one that shows how your costing choice changes the final answer.
Example 1: A Small Gift Shop
Maya runs a small gift shop, and on 1 January her stock was worth $20,000 at cost. During the quarter, she bought $45,000 of new goods and paid $1,000 in freight to get them delivered. On 31 March she counted the shelves and the stock room, and the remaining stock was worth $18,000.
| Item | Amount |
|---|---|
| Beginning inventory (1 January) | $20,000 |
| Purchases | $45,000 |
| Freight in | $1,000 |
| Goods available for sale | $66,000 |
| Ending inventory (31 March) | − $18,000 |
| Cost of goods sold | $48,000 |
If Maya’s sales for the quarter were $80,000, her gross profit is $32,000, which is a gross margin of 40%. Now she has a real number to test her prices against, instead of relying on a gut feeling.
Example 2: A Small Furniture Maker
Sam builds tables in a small workshop. Manufacturers add a couple of extra costs, because they turn raw materials into finished products, so Sam’s COGS for the month looks like this:
| Item | Amount |
|---|---|
| Beginning stock of wood, parts and finished tables | $12,000 |
| Wood, hardware and finish bought | $9,000 |
| Wages for the two people who build the tables | $7,500 |
| Workshop overhead (power, tool wear) | $1,500 |
| Total available | $30,000 |
| Ending stock (materials, half-built and finished tables) | − $13,000 |
| Cost of goods sold | $17,000 |
Notice that the time Sam spends on sales calls is not included, and neither is the cost of the website. Those are operating expenses, and only the costs of actually making the tables count.
Example 3: Same Sales, Three Different Answers
This one surprises a lot of people. Say a shop buys 100 phone cases at $10 each in March, then another 100 at $12 each in April after the supplier raises prices, and in May it sells 150 cases. What did those 150 cases cost? The honest answer is that it depends on the costing method.
| Method | How it works | COGS for 150 cases |
|---|---|---|
| FIFO | The oldest stock is treated as sold first | 100 × $10 + 50 × $12 = $1,600 |
| LIFO | The newest stock is treated as sold first | 100 × $12 + 50 × $10 = $1,700 |
| Average cost | Every case costs the average price | 150 × $11 = $1,650 |

Same cases, same sales, and yet the cost of goods sold moves by $100. When prices are rising, FIFO gives the lowest COGS and the highest profit on paper, LIFO does the opposite, and average cost lands somewhere in the middle.
How Your Costing Method Changes COGS
Most small businesses use FIFO because it matches how stock usually moves, with older items going out first. LIFO is permitted under US accounting rules but not under the international standards used in many other countries. Average cost suits goods that get mixed together, such as grain or fuel, where you cannot tell one unit from another.
Whichever you choose, stick with it, because switching methods from year to year makes your numbers difficult to compare. In the US, changing your method for tax purposes also requires approval from the IRS. If you want the full picture, our guide to FIFO vs LIFO compares the two side by side, and the inventory valuation methods compared article covers the other options.
Where COGS Shows Up on Your Income Statement
COGS sits on the second line of the income statement, right after revenue. Subtract one from the other and you get gross profit, and everything else, such as rent, wages and marketing, comes off after that.
| Line | Gift shop example |
|---|---|
| Revenue | $80,000 |
| Cost of goods sold | − $48,000 |
| Gross profit | $32,000 |
| Operating expenses (rent, wages, marketing) | − $21,000 |
| Operating profit | $11,000 |
Gross margin is gross profit divided by revenue. In the gift shop example, it is $32,000 ÷ $80,000, or 40%. Watch this number every month. If it slips from 40% to 35%, something has changed: a supplier may have raised prices, staff may be discounting too often, or stock may be quietly walking out the back door.
How to Calculate COGS for Taxes
For taxes, the calculation is exactly the same, but the paperwork depends on how your business is legally set up. In the US, sole owners report it in Part III of Schedule C. Partnerships and corporations use IRS Form 1125-A, which is attached to their main return.
Both forms walk through the same steps you saw above: the stock you started with, purchases, labor, other costs, and the stock left at year end. So if you know how to calculate COGS each month, the year-end form is mostly a matter of adding up the totals. Keep your supplier bills and count sheets, because if the numbers are ever questioned, those records are your proof.
A quick word of caution: tax regulations include details that change over time, and some smaller businesses qualify for simplified methods. Use this guide to understand the idea, then confirm the details with your accountant. For a deeper background on the idea itself, Wikipedia’s cost of goods sold entry is a solid starting point.
COGS for Service Businesses
What if you sell time instead of things? A consultant, a cleaning company or a web designer usually has no stock, so there is no cost of goods sold in the usual sense. Instead, many service firms report cost of services or cost of revenue. That covers the direct cost of doing the work, such as contractor fees, materials used on a job, or software you resell to clients.
Some businesses do both. A plumber sells parts and labor, and while the parts follow the normal COGS formula, the labor is often recorded as a direct cost of service. Separating them shows you which side of the business earns better margins.
Common COGS Mistakes to Avoid
Most COGS errors are not math errors at all. They usually come from missing costs, mixed-up categories or counts that nobody really trusts. Here are the ones we see most often:
- Valuing stock at selling price. Ending stock must be valued at what you paid, because using the retail price makes COGS look smaller and profit look bigger than it really is.
- Forgetting freight in. Delivery charges from suppliers are part of the cost of your goods, so leaving them out makes your margins look healthier than they actually are.
- Counting outbound shipping as COGS. Shipping orders to customers is usually a selling cost, and mixing the two categories blurs your real margin.
- Skipping the count. Guessing the ending figure is the fastest way to get COGS wrong, and even a quick count of your most valuable items is better than an estimate.
- Ignoring lost and damaged goods. Stolen, broken or expired items still cost you money, even though they never produced a sale. Our guide to inventory shrinkage explains how to spot the gap and record it.
- Changing methods. Moving between FIFO and average cost every year makes your results almost impossible to compare over time.
Why Accurate Stock Counts Make COGS Easier
The formula is the easy part. The hard part is knowing, with real confidence, what you had at the start and what is left at the end, and that is where many small businesses lose hours each month digging through spreadsheets and recounting shelves.
When every delivery, sale and adjustment is logged as it happens, your closing figure is already waiting for you. Good inventory tracking software keeps a running count and a unit cost for every item, so you can see the value of your stock on any day without a full shutdown count. You still count to check, but you are confirming numbers, not rebuilding them.
InventorysHub records each stock movement with who made it and why. With real-time inventory tracking across every location, the stock value you need for the formula is a few clicks away. Once you have COGS, our inventory turnover calculator and days inventory on hand calculator show how quickly that stock is selling. You can start a free account and try it with your own products.
Final Thoughts
Cost of goods sold is one of the most useful numbers in a small business, and the math behind it is genuinely simple: take what you started with, add what you bought, and subtract what is left. Do it every month, and you will notice margin problems weeks before they show up in your bank balance.
Get it right by valuing stock at cost, including freight in, choosing one costing method and staying with it, and making your counts something you can genuinely trust. Once the habit is in place, how to calculate COGS stops being a year-end chore and becomes a quick monthly check on the health of your business.
FAQs
Q. What is cost of goods sold in simple terms?
Ans: It is what you paid for the products you sold during a period. For a retail shop, that is mostly the price paid to suppliers plus the freight needed to bring the goods in, while a manufacturer also includes raw materials, production wages and factory overhead.
Q. What is the cost of goods sold formula?
Ans: Beginning inventory plus purchases, minus ending inventory. The result is the cost of the stock that left your business through sales during the period.
Q. Is COGS an expense?
Ans: Yes, it is a business expense, but it appears on its own line directly under revenue so that you can see gross profit, while rent, marketing and office wages are listed further down as operating expenses.
Q. Does COGS include shipping costs?
Ans: Freight you pay to bring goods in from a supplier is usually part of COGS, whereas shipping you pay to send orders out to customers is normally treated as a selling expense instead.
Q. Can a service business have COGS?
Ans: Most pure service businesses have no stock, so they report cost of services or cost of revenue instead, which covers the direct cost of delivering the work, such as contractor fees or materials used on a particular job.
Q. How often should I calculate COGS?
Ans: At least once a year for taxes, but monthly is far more useful, because a monthly figure quickly shows you when supplier prices rise, margins slip or stock goes missing, while there is still time to respond.
For more stock tips and business updates, visit the official InventorysHub LinkedIn page.