=

Cost of goods sold (COGS): how do you calculate it?

Jonny Parker
October 1, 2026
10 min read

Cost of goods sold (COGS) is the direct cost of producing or buying the goods a business sells during a given period. Get it right and you gain a clear view of profitability, pricing, and inventory value. Get it wrong and every downstream metric, from taxable income to margin, drifts off course.

COGS feeds your income statement, shapes your gross profit margin, and anchors the inventory valuation the IRS expects at tax time. This guide breaks down how to determine cost of goods sold. You will see the formulas that matter, the four accounting methods, and practical ways to bring the number down.

Key takeaways

  • Cost of goods sold measures the direct cost of producing or buying the goods a business sells in a period.
  • The standard COGS formula is beginning inventory plus purchases minus ending inventory. Direct materials, direct labor, and overhead drive the total.
  • FIFO, LIFO, weighted average cost, and specific identification each produce a different COGS from the same inventory.
  • A lower COGS ratio leaves more gross profit, so supplier terms, waste control, and order sizing all move the number.

What is cost of goods sold?

Cost of goods sold is the money it takes to produce the goods a company sells over a set period. Picture a furniture maker: the wood, fabric, direct labor, tools, and machinery that go into each finished desk all feed COGS.

The “sold” part is the catch. COGS only counts the cost of goods you actually sold in the period, not everything you made or bought. Unsold stock stays on the balance sheet as inventory until it moves, which is why COGS ties so closely to how you value and count inventory.

That number rolls into core business accounting metrics, most notably gross profit margin. COGS appears on the income statement, and it drives the inventory valuation that the IRS requires every business to report at tax time. Because it sits between revenue and profit, a small error in COGS can distort how healthy your business looks.

a man-wearing-a-safety-vest-holding-a-clipboard-and-pointing-out-shelves-to-a-woman-wearing-a-safety-vest-in-a-warehouse
Want to see how Fishbowl can improve your business?
Book a Demo

What’s included in cost of goods sold?

Knowing exactly which costs belong in COGS keeps your margins honest and your tax filing defensible. COGS captures the costs tied directly to making or acquiring what you sell. The main components are:

  • Direct materials: the raw inputs that become part of the finished product, such as wood or fabric.
  • Direct labor: wages for the workers who build or assemble the goods.
  • Manufacturing overhead: factory costs like equipment depreciation and utilities tied to production.
  • Freight-in: the cost of shipping materials to you, which counts toward COGS.

Costs that keep the business running but sit outside production stay out of COGS. That means administrative and office salaries, marketing spend, and rent. Because COGS is deducted from gross receipts on Schedule C, the IRS draws a firm line between production costs (including freight-in) and non-production costs.

How do you determine cost of goods sold?

COGS counts only the direct costs of production. Indirect costs, like your sales team’s salaries or office supplies, stay out of the calculation.

So how do you determine cost of goods sold? It comes down to two formulas and the costing method behind them. The most widely used version works from your inventory balances:

COGS = Beginning inventory + Purchases − Ending inventory

Start with your beginning inventory, add anything you purchased or produced during the period, then subtract the ending inventory value left on the shelf. For example, $20,000 in beginning inventory plus $12,000 in purchases minus $8,000 in ending inventory gives a COGS of $24,000.

When you want to build the number up from production inputs instead, use the direct-cost view:

COGS = Cost of materials + Cost of direct labor + Other direct costs

Say a desk factory produces 500 desks in a month. Raw materials run $10,000, labor for 10 employees costs $16,000, and other production costs add $4,000. Total COGS for the month is $30,000.

The two formulas answer different questions. The inventory-based version tells you what left the shelf over a period, which is what accountants report. The direct-cost version tells you what a batch costs to make, which is what you need when you set prices.

Which approach fits best depends on your costing method, covered next. The costing method decides which dollar value you attach to each unit as it sells. It can shift your reported COGS even when the physical goods are identical.

How do you account for cost of goods sold?

Your COGS changes depending on which inventory costing method you use. Four methods dominate.

1. First in, first out (FIFO)

FIFO assumes the oldest items sell first, which suits perishable or time-sensitive goods.

Inventory COGS = Cost of oldest goods × total quantity sold

Imagine a warehouse bought 50 desks at $500 each in January and 100 desks at $250 each in February. If it sells 25 desks, FIFO values them at the January cost: $500 × 25 = $12,500.

Because FIFO clears older, often cheaper stock first, it tends to report a lower COGS and a higher profit when prices are climbing. That also means a larger tax bill in inflationary periods.

2. Last in, first out (LIFO)

LIFO is the reverse: the newest items sell first. It fits periods of rising prices or inflation, when recent costs are higher.

Inventory COGS = Cost of most recent goods × quantity sold

Using the same January and February inventory, LIFO draws from the February batch. To calculate inventory COGS using LIFO, apply the most recent cost: $250 × 25 = $6,250.

By matching current costs against current revenue, LIFO reports a higher COGS when prices rise, which lowers taxable income. Note that LIFO is permitted in the US but not under international accounting standards.

3. Weighted average cost (WAC)

WAC averages the cost across every available unit, which works well when items are similar and costs stay stable.

Inventory COGS = (Cost of all goods for sale / number of units) × quantity sold

Take the same two batches: 50 desks at $500 plus 100 desks at $250 equals $50,000 across 150 units. Dividing gives an average of $333.34 per desk, so 25 desks sold equals $8,333.50.

WAC smooths out price swings between purchases, which keeps your COGS steady and your books simple. The trade-off is precision, since no single sale reflects the exact cost of the units that left.

In Fishbowl, the system recalculates average cost when new inventory is added, not when items sell. If an item’s quantity hits zero, its average cost resets on the next receipt.

4. Specific identification

This method tracks the actual cost of each individual item. It suits unique or high-value goods like automobiles and jewelry, where every unit carries its own price.

Specific identification is the most precise method, but it only works when each item is distinct enough to trace. It rarely fits high-volume, interchangeable stock.

What is a good COGS ratio?

The COGS ratio shows what share of revenue gets consumed by production costs. You calculate it as COGS ÷ revenue × 100.

There is no single “good” number, because the ratio varies widely by industry. A grocer that resells goods runs a high ratio, while a software maker runs a low one.

According to NYU Stern professor Aswath Damodaran’s data, COGS averages about 66% of sales across the total US market excluding financials. That leaves a gross margin near 34% (data as of January 2026).

A lower COGS ratio means more of each sale drops through to gross profit. If a company books $1,000,000 in revenue and $660,000 in COGS, its ratio is 66% and its gross margin is 34%. Shave the COGS to $600,000 and the margin jumps to 40% on the same revenue.

That is why trimming production and purchasing costs, covered next, has such a direct effect on margin. The most useful comparison is against direct competitors, since a grocery wholesaler and a software firm live in completely different ranges.

How can you reduce cost of goods sold?

A lower COGS lifts gross margin without touching your prices, which is why it is often the first place to look when profit feels thin. The goal is to spend less to make or buy each unit while keeping quality steady. These levers help:

  • Negotiate with suppliers: ask for better terms or buy in volume to lower your per-unit material cost.
  • Cut waste, shrinkage, and spoilage: tighten handling and storage so fewer goods are lost before they sell.
  • Right-size order quantities: order to real demand to avoid excess carrying cost and dead stock.
  • Choose the right costing method: match FIFO, LIFO, WAC, or specific identification to how your business actually operates.
  • Automate tracking: replace manual counts with a system that catches costing errors before they reach your books.

Treat these as ongoing habits rather than one-time fixes. Costs move as suppliers, demand, and freight rates shift. The business that reviews its COGS regularly is the one that keeps its margin from eroding.

How does cost of goods sold affect inventory decisions?

COGS tells you exactly what each item costs to produce, which makes it a practical tool for everyday decisions. It informs pricing, guides inventory management, and highlights where cost control will pay off.

Accurate COGS also protects your margins. On average, Fishbowl users experience an 8% increase in profit margins, largely because cleaner cost and inventory data surfaces problems earlier. Extract Production, an oil and gas services company in Houston, TX, saved $11M in inventory costs after gaining better reporting and stock visibility.

These gains are not one-off wins. Fishbowl tracks landed cost, applies your costing method, and keeps valuation current. That discipline is what makes the underlying COGS reliable enough to act on.

Pair reliable COGS with clear optimal stock levels and you can price with confidence. You also reorder at the right time and keep working capital from sitting idle on the shelf.

The reverse is just as true. When COGS is guesswork, you overprice slow movers, underprice your best sellers, and lose track of which products actually earn their space. Reliable cost data turns each of those calls into a decision you can defend with numbers.

Simplify COGS tracking with Fishbowl

Fishbowl makes calculating COGS straightforward by tracking your inventory costs in real time. It syncs with QuickBooks, so your COGS stays accurate across your books without manual re-entry.

The result is cleaner financial reporting, fewer costing errors, and a number you can trust when you set prices or plan a purchase. Fishbowl applies your chosen costing method automatically, records landed cost as goods arrive, and keeps every unit valued correctly through to the sale. See how Fishbowl keeps your cost of goods sold accurate from receipt to sale.

Book a Demo

Frequently asked questions about cost of goods sold

Is cost of goods sold tax deductible?

Yes. Per the IRS, businesses that make or buy goods to sell can deduct COGS from their gross receipts on Schedule C, which lowers taxable income. You can include the direct production and purchasing costs tied to the goods you sold that year, such as materials, direct labor, and freight-in.

What is a good COGS ratio?

A good COGS ratio depends heavily on your industry, so compare against peers in your own sector. You calculate it as COGS divided by revenue, then multiplied by 100. NYU Stern data pegs the benchmark near 66% of sales, or a gross margin around 34%, across the US market excluding financials.

Where do you find cost of goods sold on financial statements?

You will find COGS on the income statement, where it is subtracted from revenue to reach gross profit. It does not appear on the balance sheet, though the inventory that feeds it does. COGS sits high on the income statement, so it has an outsized effect on every profit figure below it, from gross profit to net income.

What accounting method is best for calculating COGS?

The best method depends on your business and industry. FIFO, LIFO, weighted average cost, and specific identification each value inventory differently, so FIFO often suits perishables while LIFO can help during inflation. One caveat: LIFO is allowed in the US but prohibited under IFRS, so consult an accountant before you commit.

How do you track COGS if you use QuickBooks?

QuickBooks handles your accounting, but it is not built to track inventory costs in fine detail. An inventory platform like Fishbowl syncs with QuickBooks to keep your COGS accurate automatically. As you receive, build, and sell stock, Fishbowl records the true cost of each item so your COGS reflects what happened on the floor.