Small business owner counting inventory on shelves to calculate cost of goods sold

Cost of Goods Sold: How to Calculate It Step by Step

Spread the love

Your sales look strong, yet your bank balance keeps shrinking, and the missing piece is often the cost of the products you actually sold. That number is called cost of goods sold, or COGS. If you don’t track it, you can’t tell how much profit each sale really brings in.

The good news is that the math is simple. Once you know which records to pull and how to plug them into the formula, you can calculate COGS in under an hour.

This guide walks you through the formula, the records you need, and a full worked example. It also covers returns, freight costs, and year-end inventory counts.

Why Cost of Goods Sold Determines Your Real Gross Profit

Cost of goods sold is the direct cost of the inventory you sold during a period. It includes what you paid for the products themselves, or for the materials used to make them.

On your income statement, COGS sits between revenue and gross profit. You subtract it from sales to see what’s left before overhead such as rent, software, and marketing. Our guide on how to read a profit and loss statement shows where each line fits.

Here’s why it matters. Say you sold $50,000 of products this quarter. That sounds healthy. But if those products cost you $41,000, your gross profit is only $9,000, and overhead still has to come out of that.

COGS applies to businesses that buy or make products to resell. Most service-only businesses don’t have COGS in the inventory sense.

The COGS Formula Explained

The cost of goods sold formula has three parts:

COGS = Beginning inventory + Purchases during the period − Ending inventory

Beginning inventory, purchases, and ending inventory

Beginning inventory is the cost of the products you had on hand at the start of the period. It should match the ending inventory from your previous period’s records.

Purchases are the cost of inventory you bought or produced during the period. You’ll find these on supplier invoices and purchase receipts.

Ending inventory is the cost of products still on hand at the close of the period. This figure usually comes from a physical count multiplied by unit cost.

Think of the formula as measuring what left your shelves. It isn’t a record of what you paid in cash this month. You might pay for a shipment in March and sell it in May. The cost counts toward COGS in May, when the goods sold. If that timing difference feels confusing, our article on cash vs. accrual accounting explains how each method records expenses.

The same formula works whether you calculate monthly, quarterly, or annually. Just make sure your beginning and ending dates match the period you’re measuring.

Gather the Records You Need Before You Calculate

Accurate COGS depends on accurate inputs. Before you open a spreadsheet, collect these records:

Flat-lay of supplier invoices and a handwritten inventory count sheet used to calculate cost of goods sold
  • Opening inventory valuation. Use the ending inventory figure from your prior period. If this is your first period, use the cost of your starting stock.
  • Supplier invoices. These show the quantity and cost of everything you ordered during the period.
  • Purchase receipts. Include smaller buys made by card or cash, such as packaging or raw materials picked up locally.
  • A current inventory count. List what’s on hand at period end, with quantities and unit costs.
  • Return and credit memos. Keep records of anything you sent back to suppliers or received credit for.

Record every purchase at cost, not at the retail price you plan to charge. If you buy a mug for $6 and sell it for $18, it enters inventory at $6. Using retail prices inflates your inventory and distorts your gross profit.

Next, keep a single inventory log. One spreadsheet or one software file works best. When every count and purchase lives in the same place, each month’s ending inventory flows cleanly into the next month’s beginning inventory.

Accounting software such as QuickBooks can track inventory quantities and costs automatically. Still, software only knows what you enter. Breakage, theft, and miscounts happen, so verify the system’s numbers against a physical count regularly. If you’d like help setting this up, see our page on QuickBooks bookkeeping services.

Worked Example: Calculating COGS for a Candle Shop

Let’s walk through a quarter for a small, made-up candle shop. The shop buys wax, wicks, jars, and fragrance oils, then pours and sells candles online and at local markets.

Warehouse worker checking incoming product boxes against a clipboard to track inventory purchases

These numbers are for illustration only. Substitute your own records when you run the calculation.

Step 1: Record beginning inventory

At the start of the quarter, the shop owner checks last quarter’s closing records. Finished candles and supplies on hand were valued at cost.

  • Beginning inventory: $4,000

This number should match the prior quarter’s ending inventory exactly. If it doesn’t, find the gap before moving on.

Step 2: Add purchases

During the quarter, the owner bought more wax, jars, wicks, and fragrance oils. She totals every supplier invoice and receipt at cost.

  • Purchases during the quarter: $9,000

Adding this to beginning inventory gives the total cost of goods available for sale:

$4,000 + $9,000 = $13,000

That $13,000 is everything the shop could have sold during the quarter.

Step 3: Subtract ending inventory

On the last day of the quarter, the owner counts what’s left. She records each item’s quantity and unit cost, then adds them up.

  • Ending inventory: $3,000

Now subtract that from goods available for sale:

$13,000 − $3,000 = $10,000

The shop’s cost of goods sold for the quarter is $10,000. That’s the cost of the candles that actually went out the door.

Step 4: Calculate gross profit

The shop brought in $25,000 in candle sales this quarter. Subtract COGS to find gross profit:

$25,000 − $10,000 = $15,000 gross profit

To compare performance over time, convert this to a gross margin percentage. Divide gross profit by revenue:

$15,000 ÷ $25,000 = 0.60, or a 60% gross margin

In plain terms, the shop keeps 60 cents of every sales dollar after covering product costs. The remaining amount must still pay for rent, market booth fees, website costs, and the owner’s pay.

Track this percentage every quarter. If margin drops from 60% to 52%, something changed. Supplier prices may have risen, or discounts may be eating into sales.

Handling Returns, Discounts, and Freight-In in Your COGS

Purchase price is only part of the picture. Several other items can raise or lower your inventory cost. The table below shows how common items typically affect COGS.

Cost item Typical effect on COGS Practical note
Purchase price Increases inventory cost Record at what you paid the supplier, not retail value.
Freight-in (shipping to you) Generally increases inventory cost Add it to the cost of the goods it brought in.
Supplier discounts Reduces inventory cost Record purchases net of trade or early-payment discounts you received.
Returns to vendor Reduces purchases Subtract the credit from your purchases total.
Customer returns Reduces sales; may need an inventory adjustment If the item can be resold, it goes back into inventory at cost.

Under IRS rules, inventory cost can include more than the sticker price. Freight-in and certain other direct costs needed to get goods ready for sale are generally part of inventory cost. Shipping costs to send orders to customers are usually treated differently. IRS Publication 334, Tax Guide for Small Business, covers these inventory cost basics.

Returns work in two directions. When you send goods back to a supplier, the credit reduces your purchases. When a customer returns an item, it reduces your sales. If the item is still sellable, you also add it back to inventory.

Treatment of specific costs depends on your business and your accounting method. For your 2026 tax filings, confirm how to handle each cost category with a qualified tax professional.

Counting and Valuing Ending Inventory at Year End

For tax reporting, you generally need to count or otherwise value your ending inventory at year end. That figure becomes next year’s beginning inventory, so errors carry forward.

A simple count process keeps things accurate:

  1. Schedule the count. Pick a quiet time, ideally after close of business on the last day of the year.
  2. Count in a fixed order. Work shelf by shelf so nothing gets skipped or counted twice.
  3. Record the details. Note each SKU, the quantity on hand, and its unit cost.

Next comes valuation. First-in, first-out (FIFO) assumes your oldest stock sells first. Average cost spreads costs evenly across similar units. When supplier prices change, each approach produces a different COGS, and therefore different taxable profit.

No single method fits every business. Some businesses also report COGS on specific forms, such as IRS Form 1125-A. Confirm the right method and form for your 2026 return with a qualified professional.

Cost of Sales vs. COGS: What the Terms Mean

You’ll often see “cost of sales” and “COGS” used interchangeably. They overlap, but they aren’t always identical.

Cost of sales is a broader umbrella term. Some reports use it to cover any direct cost of delivering what you sell. COGS usually refers to the inventory-based calculation covered in this guide.

The difference matters most for service businesses. A web design agency has no inventory. However, it may report direct labor or subcontractor costs as cost of sales, since those costs rise with each project delivered.

Which label should you use? Follow the one your accountant and your income statement template use. Then stay consistent from period to period, so your margins stay comparable over time.

Reporting COGS on Your 2026 Tax Return

Your COGS figure isn’t just a management number. It also goes on your tax return, and the IRS expects it to match your records. Where it goes depends on how your business is structured.

Sole proprietors and Schedule C

If you file Schedule C, you work through the calculation in Part III, Cost of Goods Sold. You enter beginning inventory, purchases, labor, materials, other costs and ending inventory. The result carries to line 4 in the gross profit section of Part I. Single-member LLCs taxed as sole proprietorships follow the same path. The IRS Small Businesses and Self-Employed hub collects the related forms and guidance.

Corporations, partnerships, and Form 1125-A

Corporations, partnerships and certain other filers use Form 1125-A, Cost of Goods Sold. You complete the calculation there, and the total flows to the cost of goods sold line on your main return.

Some smaller businesses can use simpler inventory accounting methods. Eligibility depends on a gross receipts threshold that the IRS adjusts each year. Rather than relying on an older figure, confirm the 2026 threshold on IRS.gov. For background, read Publication 334, Tax Guide for Small Business. It covers inventory and COGS basics. Publication 538 explains accounting periods and methods.

Finally, keep your count sheets, purchase invoices and valuation notes. If your return is ever questioned, those records support the numbers you reported.

Put Your COGS Numbers to Work This Month

Start small. Calculate COGS for your most recent completed month using the formula and your last inventory count. For example, say you had $8,000 in beginning inventory and $3,000 in purchases. If $7,500 is left at month end, your COGS is $3,500.

Next, divide gross profit by sales to get your gross margin. Track it month to month. A falling margin often points to rising supplier costs, underpriced products or shrinkage. Our guide on how to read a profit and loss statement shows where this figure sits on your reports.

Before you file, confirm your inventory method and tax reporting with a qualified tax professional. For official guidance, visit IRS.gov. The SBA’s Manage Your Finances page covers tracking profitability.

Frequently Asked Questions

What is the basic cost of goods sold formula?

COGS equals beginning inventory plus purchases (and other direct costs) minus ending inventory. The result is the cost of the products you actually sold during the period. Subtract it from net sales to find your gross profit.

Do service businesses need to calculate COGS?

Most pure service businesses don’t carry inventory, so they usually don’t report COGS. A consultant or designer, for example, records costs as ordinary business expenses. If you also sell physical products, you’ll need to track COGS for those sales. A tax professional can help you sort out mixed situations.

Where does COGS appear on Schedule C?

You calculate it in Part III of Schedule C. The final figure then carries to line 4 in Part I, where it’s subtracted from your sales to reach gross profit. Check the current-year form instructions in case line numbers change.

Can freight costs be included in COGS?

Freight-in, the cost of shipping inventory to your business, generally becomes part of your inventory cost. It flows into COGS as those items sell. Shipping products out to customers is usually treated as a selling expense instead. Keep the two separate in your books.

Tracking inventory and COGS accurately takes steady, careful bookkeeping. If you’d rather spend your time running the business, SteadyBooks can help with bookkeeping, payroll and day-to-day financial support, so your numbers stay accurate and up to date.

This article is general educational information based on rules for 2026, not tax, legal, or accounting advice. Rules and thresholds change, so confirm details for your situation with the IRS or your state agency, or with a qualified professional.

Related guides

Leave a Reply

Your email address will not be published. Required fields are marked *