logo
Racklify LogoJoin for Free
Login

How to Calculate COGS: Step-by-Step Guide for Beginners

COGS

Updated September 24, 2025

ERWIN RICHMOND ECHON

Definition

Calculating COGS involves tracking beginning inventory, purchases or production costs, and ending inventory to determine the direct cost of goods sold during a period.

Overview

Overview

Calculating COGS is a straightforward process once you know the inputs. This guide walks beginners through each step with practical examples and tips for both retailers and manufacturers. The goal is to give you confidence in producing an accurate COGS number for your income statement.


Step 1 — Gather your inventory data


Before any calculation, list your beginning inventory value (what you had at the start of the period) and ending inventory value (what remains unsold at period end). These values should be based on a consistent inventory valuation method (FIFO, LIFO where permitted, or weighted average).


Step 2 — Add purchases or production costs


For retailers and resellers, add all purchases of goods made for resale during the period. Include purchase price, import duties, and freight-in when they are capitalized to inventory. For manufacturers, add direct materials, direct labor, and an allocated portion of manufacturing overhead for goods produced during the period.


Step 3 — Apply the basic formula


Use the standard accounting formula:

COGS = Beginning Inventory + Purchases (or Cost of Goods Manufactured) - Ending Inventory

This gives you the total cost of the goods that were sold during the period.


Example — Retailer (simple)


Beginning Inventory: $2,000

Purchases during month: $5,000

Ending Inventory: $1,500

COGS = $2,000 + $5,000 - $1,500 = $5,500. That $5,500 represents the direct cost of goods sold during the month.


Example — Manufacturer (with Cost of Goods Manufactured)


Manufacturers often calculate Cost of Goods Manufactured (COGM) first:

  • Direct materials used: $8,000
  • Direct labor: $4,000
  • Manufacturing overhead allocated: $3,000
  • Beginning Work-in-Process (WIP): $1,000
  • Ending WIP: $800

COGM = Beginning WIP + (Direct materials + Direct labor + Overhead) - Ending WIP = $1,000 + ($8,000 + $4,000 + $3,000) - $800 = $15,200.

Then COGS = Beginning Finished Goods + COGM - Ending Finished Goods.


Step 4 — Consider inventory valuation methods


Your chosen inventory method affects the unit cost you assign to the items sold. FIFO typically results in lower COGS when prices are rising (older, cheaper units are sold first). Weighted average smooths price volatility. Choose a method that fits your business and remain consistent period to period for comparability.


Step 5 — Decide on perpetual vs periodic accounting


Periodic: You update inventory and calculate COGS at the end of the accounting period. Perpetual: Your system updates inventory and COGS continuously with each sale. Many modern point-of-sale and inventory systems support perpetual tracking, making it easier to maintain accurate COGS in real time.


Step 6 — Make the right journal entries


When goods are sold, the typical accounting entry reduces inventory and recognizes COGS. For a sale, debit COGS and credit Inventory for the cost amount, and separately record the sale revenue and cash/accounts receivable.


Practical tips and software


Use accounting or inventory software to automate calculations, especially if you have many SKUs. Warehouse management systems (WMS) can provide accurate inventory counts, while accounting systems handle valuation and reporting. Ensure your system matches your chosen valuation method and that physical counts reconcile with the system periodically.


Common pitfalls for beginners


  • Forgetting freight-in or import duty costs that should be capitalized to inventory.
  • Mixing operating expenses into COGS or vice versa.
  • Failing to perform physical inventory counts to validate system balances.
  • Switching valuation methods frequently, which complicates trend analysis and tax reporting.


Tax and reporting considerations


COGS affects gross profit and taxable income. Tax authorities have rules about acceptable inventory methods and when purchases must be capitalized. If your business grows or inventory becomes significant, consult an accountant to ensure compliance and to optimize tax treatment.


Wrap-up



Calculating COGS is mostly about consistent record keeping and understanding which costs to include. Follow the steps—track beginning inventory, add purchases or production costs, subtract ending inventory, and apply the inventory valuation method you've chosen—and your COGS figure will accurately reflect the direct cost of what you sold.

Tags
COGS
calculate-COGS
inventory-accounting
Related Terms

No related terms available