HomeBlogsCost of Goods Sold
Small Business FinanceLast updated October 202610 min read

Cost of Goods Sold: COGS Formula and Examples

What is cost of goods sold and how do you calculate it? Here is the COGS formula, three worked examples, what counts as COGS and how to report it on Schedule C.

Warehouse racks stacked with boxed inventory on pallets
In this article
  1. What is COGS
  2. COGS formula
  3. How to calculate
  4. COGS examples
  5. What COGS includes
  6. Inventory methods
  7. Financial statements
  8. Reporting COGS on taxes
  9. Expense, debit or credit
  10. COGS vs cost of sales
  11. High COGS
  12. Track COGS receipts
  13. FAQs
  14. Final thoughts
Quick answer

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.

What Is Cost of Goods Sold?

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.

Cost of Goods Sold Formula

COGS formula

Beginning Inventory + Purchases and Production Costs − Ending Inventory = Cost of Goods Sold

Here's what each piece means:

  • Beginning inventory: The value of products on hand at the start of the period. It should match last period's ending inventory.
  • Purchases and production costs: What you spent during the period to buy or make stock, including freight-in, materials, direct labor and production overhead.
  • Ending inventory: The value of products still unsold at the end of the period, based on a physical count or your inventory system.

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.

How to Calculate Cost of Goods Sold in 5 Steps

  1. Pick the period. Most small businesses calculate COGS monthly or quarterly for bookkeeping and annually for taxes.
  2. Find beginning inventory. Use the ending inventory value from the previous period's books.
  3. Add up purchases and production costs. Total supplier invoices, freight-in, materials and direct labor for the period. Subtract returns to suppliers, trade discounts and anything you took for personal use.
  4. Count ending inventory. Do a physical count and value the items with your inventory method, such as FIFO or weighted average.
  5. Apply the formula. Beginning inventory + purchases − ending inventory = COGS.

Cost of Goods Sold Examples

Example 1: A Retail Gift Shop

A small gift shop wants its COGS for the year. Here are its numbers:

Line ItemAmount
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%.

Example 2: A Small Candle Manufacturer

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 ItemAmount
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.

Example 3: An Online Seller Who Pulled Stock for Personal Use

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.

What Is Included in Cost of Goods Sold?

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 COGSUsually Not Included in COGS
Products bought for resaleOffice rent and utilities
Raw materials and partsMarketing and advertising
Freight-in and shipping to receive stockShipping orders out to customers
Direct labor for production staffSalaries for sales and admin staff
Production overhead such as factory utilitiesSoftware subscriptions and accounting fees
Packaging and containers that are part of the productGeneral 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.

Inventory Methods That Change Your COGS

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:

MethodHow It WorksCOGS for 150 UnitsEnding 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 averageEvery unit costs the average, $11$1,650$550
Specific identificationTracks the actual cost of each itemDepends on items soldDepends 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.

Where Cost of Goods Sold Appears on Financial Statements

COGS sits on the income statement directly under revenue. The line below it is gross profit:

Gross profit formula

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.

How to Report Cost of Goods Sold on Your Taxes

Sole proprietors and single-member LLCs figure COGS in Part III of Schedule C. The lines follow the same formula:

Schedule C LineWhat Goes There
Line 35Inventory at beginning of year
Line 36Purchases less cost of items withdrawn for personal use
Line 37Cost of labor
Line 38Materials and supplies
Line 39Other costs, such as freight-in, containers and production overhead
Line 40Add lines 35 through 39
Line 41Inventory at end of year
Line 42Cost 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:

  • Service businesses usually don't have COGS. The COGS rules don't apply to a personal service business, like a consultant or painter, unless it also sells or charges for materials.
  • Small businesses get simpler options. If your average annual gross receipts for the prior 3 tax years are $31 million or less (indexed for inflation) and you aren't a tax shelter, you can treat inventory as non-incidental materials and supplies or follow your financial statement method.

Is Cost of Goods Sold an Expense? Debit or Credit?

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:

EntryDebitCredit
Record the sale of $100Cash or Accounts Receivable $100Sales Revenue $100
Record the cost of the item sold, $60Cost of Goods Sold $60Inventory $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 vs. Cost of Sales vs. Operating Expenses

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.

What Does It Mean If COGS Is High?

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:

  • Supplier price increases you haven't passed on to customers
  • Rising inbound freight costs
  • Inventory shrinkage from damage, theft or spoilage
  • Heavy discounting that lowers revenue while costs stay the same

How to Reduce Cost of Goods Sold

  • Negotiate volume pricing or early-payment discounts with suppliers.
  • Consolidate orders to cut inbound shipping costs.
  • Track waste and shrinkage so losses show up before year end.
  • Review your pricing when supplier costs change.
  • Keep every supplier invoice and freight receipt so no deductible cost is missed.

Track COGS Receipts With Manage Receipt

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.

Frequently Asked Questions

How do you calculate cost of goods sold?

Add your beginning inventory and the purchases and production costs for the period, then subtract ending inventory. The result is COGS.

What is the formula for COGS with an example?

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.

What is another name for cost of goods sold?

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.

What is the journal entry for cost of goods sold?

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.

Is cost of goods sold a debit or credit?

COGS is an expense account with a normal debit balance. Debits increase it and credits decrease it.

What does it mean if COGS are high?

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.

Do service businesses have cost of goods sold?

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.

Where is cost of goods sold found on financial statements?

COGS appears on the income statement right below revenue. Revenue minus COGS equals gross profit.

Know Your COGS, Know Your Margins

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.

Every COGS number starts with a receipt.

The AI receipt scanner captures supplier invoices and freight bills so your purchase totals are always complete.

Try the AI receipt scanner