One app for receipts, reports and bills.
See all featuresGet the mobile app
Cost of goods sold (COGS) is the direct cost of the products you sold during a period. The formula is beginning inventory + purchases and production costs − ending inventory. Subtract COGS from revenue and you get gross profit. Rent for your office, marketing and software are operating expenses, not COGS.
If you sell physical products, COGS is the number that tells you whether each sale actually makes money. It also lowers your taxable income, because the IRS lets product businesses deduct it from gross receipts. Below, we walk through the formula, three worked examples, what belongs in COGS and how to report it.
Running a product business?Snap every supplier invoice and freight receipt in the Manage Receipt app as it arrives. Your purchase totals are ready when it is time to calculate COGS.
Cost of goods sold is what it cost you to buy or make the items your customers bought. For a retailer, that's mostly the wholesale price of the stock plus the freight to get it into the store. For a manufacturer, it also includes raw materials, the labor on the production floor and factory overhead.
You'll also see COGS called cost of sales or cost of revenue on financial statements.
COGS only covers goods that were sold. Stock still sitting on your shelves at the end of the period stays on the balance sheet as inventory until it sells.
Beginning Inventory + Purchases and Production Costs − Ending Inventory = Cost of Goods Sold
Here's what each piece means:
Beginning inventory plus purchases is called cost of goods available for sale. That's everything you could have sold. Subtract what's left at the end, and the rest is what you actually sold.
A small gift shop wants its COGS for the year. Here are its numbers:
| Line Item | Amount |
|---|---|
| Beginning inventory (January 1) | $12,000 |
| Inventory purchases from suppliers | $30,000 |
| Freight-in on those purchases | $1,500 |
| Cost of goods available for sale | $43,500 |
| Ending inventory (December 31) | $9,500 |
| Cost of goods sold | $34,000 |
If the shop's sales were $60,000, its gross profit is $60,000 − $34,000 = $26,000, and its gross margin is about 43%.
A manufacturer adds labor and production overhead to the formula. A candle maker working out of a rented workshop might look like this for one quarter:
| Line Item | Amount |
|---|---|
| Beginning inventory (wax, wicks, jars and finished candles) | $4,000 |
| Raw materials purchased | $9,000 |
| Direct labor for production staff | $6,000 |
| Manufacturing overhead (workshop rent share, utilities, equipment depreciation) | $2,500 |
| Ending inventory | $3,500 |
| Cost of goods sold | $18,000 |
Notice what's missing: the owner's website subscription, Instagram ads and accounting fees. Those are operating expenses, not production costs.
An online seller starts the year with $2,000 of inventory, buys $8,000 more and pays $600 in inbound shipping. During the year, she takes $300 of products home for personal use, and $1,800 of stock is left at year end.
COGS = $2,000 + ($8,000 + $600 − $300) − $1,800 = $8,500. The personal-use items come out of purchases because the IRS treats them as withdrawn from sale, as explained in IRS Publication 334.
The test is simple: was the cost needed to buy or make the product you sold? If yes, it usually belongs in COGS. If it keeps the business running no matter how many units you sell, it's an operating expense.
| Usually Included in COGS | Usually Not Included in COGS |
|---|---|
| Products bought for resale | Office rent and utilities |
| Raw materials and parts | Marketing and advertising |
| Freight-in and shipping to receive stock | Shipping orders out to customers |
| Direct labor for production staff | Salaries for sales and admin staff |
| Production overhead such as factory utilities | Software subscriptions and accounting fees |
| Packaging and containers that are part of the product | General business insurance |
The IRS also notes that labor is usually only part of COGS for manufacturing and mining businesses. Retailers and wholesalers generally don't have labor costs that belong in COGS. For a closer look at the costs that sit outside COGS, read our guide to general and administrative expenses.
When your purchase prices change during the year, the inventory method you choose decides which costs go into COGS. Say you bought 100 units at $10 in January and 100 units at $12 in March, then sold 150 units:
| Method | How It Works | COGS for 150 Units | Ending Inventory |
|---|---|---|---|
| FIFO (first in, first out) | Oldest costs are sold first | $1,600 | $600 |
| LIFO (last in, first out) | Newest costs are sold first | $1,700 | $500 |
| Weighted average | Every unit costs the average, $11 | $1,650 | $550 |
| Specific identification | Tracks the actual cost of each item | Depends on items sold | Depends on items left |
When prices rise, LIFO gives a higher COGS and lower taxable profit, while FIFO gives a lower COGS. Whichever method you pick, use it consistently. Switching methods for tax purposes generally requires IRS approval through a change in accounting method.
COGS sits on the income statement directly under revenue. The line below it is gross profit:
Revenue − Cost of Goods Sold = Gross Profit
Gross margin is gross profit divided by revenue. Using the gift shop example, $26,000 ÷ $60,000 = 43%. Operating expenses come next, and what's left after those is operating profit.
Inventory that hasn't sold yet appears on the balance sheet as a current asset. When it sells, its cost moves from the balance sheet to COGS on the income statement.
Sole proprietors and single-member LLCs figure COGS in Part III of Schedule C. The lines follow the same formula:
| Schedule C Line | What Goes There |
|---|---|
| Line 35 | Inventory at beginning of year |
| Line 36 | Purchases less cost of items withdrawn for personal use |
| Line 37 | Cost of labor |
| Line 38 | Materials and supplies |
| Line 39 | Other costs, such as freight-in, containers and production overhead |
| Line 40 | Add lines 35 through 39 |
| Line 41 | Inventory at end of year |
| Line 42 | Cost of goods sold (line 40 minus line 41) |
Partnerships and corporations report the same calculation on Form 1125-A, which attaches to Forms 1065, 1120 and 1120-S. Our Schedule C guide covers the rest of the form.
Two rules from IRS Publication 334 are worth knowing:
Yes, COGS is an expense. It's an expense account with a normal debit balance, so it increases with a debit and decreases with a credit.
In a perpetual inventory system, every sale creates two entries. One records the sale, and the other moves the product's cost out of inventory:
| Entry | Debit | Credit |
|---|---|---|
| Record the sale of $100 | Cash or Accounts Receivable $100 | Sales Revenue $100 |
| Record the cost of the item sold, $60 | Cost of Goods Sold $60 | Inventory $60 |
With a periodic system, you skip the second entry during the year and post one adjustment at period end, after the inventory count.
Cost of goods sold is the term product businesses use. Cost of sales often means the same thing, but some companies use it more broadly to include the direct cost of delivering services. Cost of goods manufactured is different: it's the cost of products a manufacturer finished during the period, whether or not they sold yet.
Operating expenses are everything else needed to run the business, like rent, payroll for non-production staff, marketing and software. They come after gross profit on the income statement.
A high COGS on its own isn't bad. A grocery store naturally has a higher COGS ratio than a software company. The warning sign is COGS rising faster than revenue, which squeezes gross margin. Common causes include:
Your COGS is only as accurate as the receipts behind it. A missing freight bill or supplier invoice means a cost that never makes it into your books, and a weaker record if the IRS ever asks you to prove a number.
With the Manage Receipt receipt scanner, you snap supplier invoices and shipping receipts as they arrive, and the app pulls out the vendor, date and amount. Every receipt is stored and searchable, so your purchase totals for the period are easy to pull together when it's time to run the COGS formula.
At tax time, AI tax reports help you organize those costs before you fill in Schedule C Part III, and the Doc Wallet keeps year-end inventory counts and supplier contracts in the same place.
Add your beginning inventory and the purchases and production costs for the period, then subtract ending inventory. The result is COGS.
COGS = beginning inventory + purchases − ending inventory. If you start with $12,000 of stock, buy $31,500 including freight and end with $9,500, your COGS is $34,000.
COGS is also called cost of sales or cost of revenue. Some companies use cost of sales more broadly to include the direct cost of services.
In a perpetual system, debit Cost of Goods Sold and credit Inventory for the cost of each item sold. In a periodic system, you post one adjustment at period end after counting inventory.
COGS is an expense account with a normal debit balance. Debits increase it and credits decrease it.
It means a large share of each sale goes to the cost of the product, leaving a thinner gross margin. It's a problem when COGS grows faster than revenue.
Usually not. Pure service businesses don't hold inventory, so they don't calculate COGS for taxes. Some report a cost of sales that covers the direct cost of delivering services.
COGS appears on the income statement right below revenue. Revenue minus COGS equals gross profit.
Cost of goods sold comes down to one formula: beginning inventory plus purchases, minus ending inventory. Get the inputs right, pick an inventory method and stick with it, and you'll know your real gross margin every month, not just at tax time.
Keep every supplier receipt in one place.Scan invoices and freight bills so your COGS is always backed by records.
This guide is for general information and reflects IRS Publication 334 (2025) as of October 2026. It is not tax or accounting advice, so check with a tax professional about your situation.
In this article
The AI receipt scanner captures supplier invoices and freight bills so your purchase totals are always complete.
Try the AI receipt scannerFeatures
Industries
Resources
© 2026 Manage Receipt. All Rights Reserved. Designed by Butterfly Technology LLC.