Cost of Goods Sold Calculation

Calculating Cost of Goods Sold - Complete Controller

Cost of Goods Sold Calculation:
Manufacturing Step-By-Step

Cost of goods sold calculation for manufacturing is a sequential process: you total your direct materials, direct labor, and manufacturing overhead, roll those into cost of goods manufactured (COGM) through work-in-process, and then apply the finished goods formula — Beginning Finished Goods Inventory + COGM − Ending Finished Goods Inventory = COGS. Unlike a retailer who simply adjusts purchases against inventory, manufacturers must build COGS from production accounts before it ever hits the income statement.

In my 20+ years running Complete Controller, I’ve watched manufacturing owners lose six-figure margins because they treated COGS as a single formula instead of a chain of inventory accounts that need monthly reconciliation. Working with thousands of small and mid-sized businesses across nearly every industry — from custom furniture shops to specialty food producers — I’ve learned that the operators who win at gross margin are the ones who treat raw materials, WIP, finished goods, and overhead as living, breathing accounts. In this article, I’ll walk you through the exact step-by-step calculation, show you a worked example with real numbers, flag the compliance traps the IRS and SEC actually care about, and give you the framework I’d hand my own team on day one. Cubicle to Cloud virtual business

How do you calculate cost of goods sold for a manufacturer step by step?

  • Answer: Calculate direct materials used, add direct labor and overhead to get total manufacturing cost, adjust through WIP for COGM, then apply beginning finished goods + COGM − ending finished goods to arrive at COGS.
  • Direct materials used = beginning raw materials + purchases − ending raw materials.
  • Total manufacturing cost = direct materials used + direct labor + manufacturing overhead.
  • COGM = beginning WIP + total manufacturing cost − ending WIP.
  • COGS = beginning finished goods + COGM − ending finished goods.

How Manufacturing COGS Differs From Retail

Manufacturers can’t shortcut COGS the way resellers do, because you have to determine the cost of producing the goods before you can determine the cost of selling them. That means three inventory accounts — raw materials, work-in-process, and finished goods — all need to move in concert.

The IRS reinforces this in Publication 538, noting that inventoriable costs include both direct costs like raw materials and labor and indirect costs needed to produce the item, including a share of factory overhead and transportation costs needed to bring goods to a usable state. Skip any of those layers and your COGS is wrong before you even start.

The COGS formula for manufacturers depends on COGM

For a manufacturer, the headline COGS formula is built on finished goods inventory and COGM — not purchases. COGM captures everything that finished production during the period, and the finished goods adjustment captures what actually left the warehouse as a sale.

  • COGM represents items completed during the period and transferred out of WIP.
  • Finished goods inventory adjusts for what was available versus what shipped.
  • This is the bridge from production accounting to income statement expense recognition.

How to Calculate Cost of Goods Sold Using Beginning Inventory and Ending Inventory

The classic inventory-based approach still applies — you just have to apply it to the finished goods account, not the raw materials account. Beginning finished goods inventory represents product already on the shelf when the period started, and ending finished goods inventory represents product that didn’t sell and therefore shouldn’t be expensed yet.

Inventory costing affects every number you plug in

Your inventory costing method directly changes both the inventory balance and the COGS expense. FIFO assumes older costs flow out first, weighted average blends costs across the period, and the method you pick should match your accounting policy — not whichever number looks better this quarter.

  • FIFO tends to produce lower COGS and higher gross margin in periods of rising costs.
  • Weighted average smooths volatility, which is helpful for commodity inputs.
  • Consistency matters more than chasing the lowest tax bill — inventory errors flow straight through to gross profit reporting.

Cost of Goods Sold Calculation With Purchases and Freight

This is where a lot of manufacturers leak money quietly. Freight, duties, and landed costs aren’t optional line items — the IRS specifically says you must include transportation and other costs needed to acquire goods and get them ready for sale as part of inventoriable cost.

  • Freight-in on raw materials is capitalized into inventory cost.
  • Freight-out to ship finished goods to customers is a selling expense, not COGS.
  • Duties, tariffs, and receiving costs on imported materials should be allocated as landed cost.

Calculate COGS from income statement figures

When you only have summary financials, you can still back into COGS using the reported inventory rollforward. Pull beginning inventory, production costs (or purchases), and ending inventory directly from the statements, then reconcile back to the underlying inventory accounts to make sure the math ties.

Accurate COGS starts with accurate books. See how Complete Controller helps manufacturers gain financial clarity. ADP. Payroll – HR – Benefits

COGS Calculation for Periodic Inventory System

Under a periodic inventory system, you don’t update inventory continuously — you calculate COGS at period-end using physical counts and adjusting entries. It’s simpler operationally but it puts enormous pressure on the accuracy of your count and your overhead allocation.

Where manufacturers get tripped up

After two decades watching factory books come across our desks, the same three mistakes show up over and over:

  1. Misclassifying overhead as a period expense instead of capitalizing it into inventory.
  2. Forgetting to move items from WIP to finished goods, which understates COGM.
  3. Using outdated physical counts that distort both ending inventory and gross margin.

COGS Formula Under FIFO and Weighted Average

The COGS formula under FIFO and weighted average produces meaningfully different numbers when input costs move. FIFO pushes older — usually cheaper — costs into COGS first, while weighted average smooths them out. Either is acceptable under GAAP; what matters is consistent application and disclosure.

Gross margin is sales minus COGS, so any change in costing method affects reported profitability. Higher COGS means lower gross margin, period. According to QuickBooks, small changes in costing assumptions can shift reported gross margin by several percentage points — enough to change pricing decisions and loan covenants.

Manufacturing Cost of Goods Sold Calculation Example

Here’s the full walkthrough with numbers. This is the exact flow I’d hand a new bookkeeper at our firm.

Step 1 — Direct materials used:

  • Beginning raw materials: $10,000
  • Purchases (including freight-in): $40,000
  • Ending raw materials: $8,000
  • Direct materials used = $42,000

Step 2 — Total manufacturing cost:

  • Direct materials used: $42,000
  • Direct labor: $25,000
  • Manufacturing overhead: $18,000
  • Total manufacturing cost = $85,000

Step 3 — Cost of goods manufactured:

  • Beginning WIP: $12,000
  • Total manufacturing cost: $85,000
  • Ending WIP: $9,000
  • COGM = $88,000

Step 4 — Cost of goods sold:

  • Beginning finished goods: $14,000
  • COGM: $88,000
  • Ending finished goods: $11,000
  • COGS = $91,000

This is the discipline that separates owners who actually know their margin from owners who think they do. For deeper guidance on building these systems, see our bookkeeping and accounting services overview and our small business resource library.

The Compliance Risks of Accounting for Inventory When COGS Is Wrong

Bad accounting for inventory isn’t just a bookkeeping nuisance — it’s a restatement risk. The SEC has flagged inventory and cost of sales as among the most common areas where companies have to restate financial statements due to accounting errors. That’s a credibility hit no business wants on its record.

A real-world example: when Adidas worked through its Reebok acquisition, excess inventory was one of the biggest operational drags. The company reported reducing Reebok inventory by more than €2 billion over time and directly linked that cleanup to improved margins and a healthier business. Inventory discipline isn’t theoretical — it shows up in the financial statements every quarter.

Where AI and software still need human oversight

Software can automate calculations, but it can’t fix bad source data. Scrap, rework, freight allocations, and unusual shutdown costs still need a human controller to review them before close. For a deeper look at what the IRS expects in inventory documentation, see IRS Publication 538, and for materiality standards on inventory errors, the SEC’s Staff Accounting Bulletin No. 99 is the foundational reference.

Final Thoughts

The most reliable cost of goods sold calculation isn’t the one you scramble together at year-end — it’s the one built from disciplined monthly tracking of raw materials, WIP, finished goods, and overhead. Get the sequence right, apply your costing method consistently, capitalize the costs that belong in inventory, and your gross margin will finally tell you the truth.

If you’re ready to tighten up your manufacturing books and get COGS right the first time, my team at Complete Controller does this every day for businesses just like yours. Reach out — we’d love to help. LastPass – Family or Org Password Vault

Frequently Asked Questions About Cost of Goods Sold Calculation

What is the formula for COGS in manufacturing?

COGS in manufacturing equals beginning finished goods inventory + cost of goods manufactured (COGM) − ending finished goods inventory. COGM itself is built from direct materials, direct labor, overhead, and WIP adjustments.

What’s the difference between COGM and COGS?

COGM is the cost of goods completed during the period and transferred from WIP to finished goods. COGS is the cost of goods actually sold during the period after adjusting for finished goods inventory on hand.

How do you calculate direct materials used?

Direct materials used = beginning raw materials inventory + raw materials purchases (including freight-in) − ending raw materials inventory.

Does freight count in COGS?

Freight-in tied to acquiring raw materials is capitalized into inventory and flows through to COGS when those materials are sold as finished goods. Freight-out to ship products to customers is typically a selling expense, not COGS.

Which inventory method is best for manufacturers, FIFO or weighted average?

It depends on your cost volatility and reporting goals. FIFO produces cleaner margins when input costs are stable; weighted average smooths volatility for commodity-driven manufacturers. The most important thing is applying your chosen method consistently year over year.

Sources

Download A Free Financial Toolkit About Complete Controller® – America’s Bookkeeping Experts Complete Controller is the Nation’s Leader in virtual bookkeeping, providing service to businesses and households alike. Utilizing Complete Controller’s technology, clients gain access to a cloud platform where their QuickBooks™️ file, critical financial documents, and back-office tools are hosted in an efficient SSO environment. Complete Controller’s team of certified US-based accounting professionals provide bookkeeping, record storage, performance reporting, and controller services including training, cash-flow management, budgeting and forecasting, process and controls advisement, and bill-pay. With flat-rate service plans, Complete Controller is the most cost-effective expert accounting solution for business, family-office, trusts, and households of any size or complexity. Complete Controller. America’s Bookkeeping Experts
author avatar
Jennifer Brazer Founder/CEO
Jennifer is the author of From Cubicle to Cloud and Founder/CEO of Complete Controller, a pioneering financial services firm that helps entrepreneurs break free of traditional constraints and scale their businesses to new heights.
Reviewed By: reviewer avatar Brittany McMillen
reviewer avatar Brittany McMillen
Brittany McMillen is a seasoned Marketing Manager with a sharp eye for strategy and storytelling. With a background in digital marketing, brand development, and customer engagement, she brings a results-driven mindset to every project. Brittany specializes in crafting compelling content and optimizing user experiences that convert. When she’s not reviewing content, she’s exploring the latest marketing trends or championing small business success.