COGS: Definition and Calculation Methods

Cost of Goods Sold (COGS) is the direct cost of the products you sell. It sits above gross profit on the income statement and includes things like raw materials, items purchased for resale, direct labor in the factory, freight-in, and manufacturing overhead allocated to units produced. It excludes selling, general, and administrative expenses (rent, marketing, office payroll). Getting COGS right is essential because it affects pricing, margins, taxes, and inventory valuation. Accounting rules also matter: U.S. GAAP permits FIFO, weighted-average, specific identification, and (in the U.S.) LIFO; IFRS prohibits LIFO — so your cost method changes both COGS and ending inventory.

Key Takeaways

  • COGS covers direct product costs — materials, direct labor, freight-in, and factory overhead; it excludes SG&A.
  • Standard formula — Beginning Inventory + Purchases − Ending Inventory (or + COGM for manufacturers).
  • Method matters — FIFO, weighted-average, specific ID, and (US-only) LIFO change COGS and inventory; IFRS bans LIFO.
  • System choice affects timing — Perpetual systems update COGS in real time; periodic systems compute it at period-end.

What COGS includes (and excludes), and why it matters

Included: For retailers/wholesalers, COGS includes the purchase cost of inventory intended for resale plus freight-in and other costs required to bring goods to a saleable condition. For manufacturers, COGS flows from direct materials, direct labor, and allocated manufacturing overhead tied to the units sold in the period. Many practitioner guides list raw materials, purchased items for resale, inbound shipping, factory labor, parts used in production, storage tied to production, and factory overhead as typical COGS components.

Excluded: Selling costs, general and administrative expenses, office rent, corporate utilities, and marketing live below gross profit as operating expenses (OpEx); they are not part of COGS. Keeping the line clean improves comparability and avoids overstating margins.

Why it matters: COGS directly impacts gross profit and tax liability. Selecting a cost method (e.g., FIFO vs. LIFO) shifts which units’ costs flow to COGS first and can materially change reported profit and inventory, especially in inflationary periods. Under U.S. GAAP, companies disclose the basis of inventory measurement (e.g., FIFO/average/LIFO) in the notes, and many disclose a LIFO reserve when applicable so readers can bridge to a non-LIFO basis.

Two guardrails from accounting frameworks shape treatment: (1) under IFRS (IAS 2), allowable cost formulas are FIFO and weighted average — LIFO is not permitted; (2) under U.S. GAAP, FIFO, weighted average, specific ID, and LIFO are all allowed, with additional rules for lower-of-cost measurements (LCNRV under IFRS; lower of cost or market, with LIFO nuances, under GAAP). These differences explain cross-border financial statement gaps for otherwise similar businesses.

The standard COGS formula and inventory systems

The classic, period-end formula for merchandising businesses is:

COGS = Beginning Inventory + Purchases − Ending Inventory. For manufacturers, replace purchases with Cost of Goods Manufactured (COGM) to reflect production during the period: COGS = Beginning Finished Goods + COGM − Ending Finished Goods.

Periodic vs. perpetual systems: In a periodic system, you compute COGS at the end of the accounting period using the formula above; inventory and COGS aren’t updated with each sale. In a perpetual system, inventory records track unit costs continuously, and COGS updates with every sale — useful for real-time margin tracking and less end-period estimation. The math reconciles at period-end (subject to shrinkage/adjustments), but the timing of recognition differs.

When records are missing, you can algebraically solve for a missing beginning inventory if you know COGS, purchases, and ending inventory: Beginning Inventory = COGS + Ending Inventory − Purchases. This identity is just a rearrangement of the standard formula and helps clean up ledgers.

Remember that physical counts (or reliable cycle counts) are still needed periodically — even with perpetual systems — to true up shrink, damage, and mis-scans that creep into records and would otherwise distort COGS.

For valuation at period-end, the measurement basis matters: IFRS uses lower of cost and net realizable value (NRV); U.S. GAAP uses lower of cost or market (with specific LIFO considerations). Write-downs reduce inventory and flow through COGS (or an expense line) depending on policy.

Inventory cost methods: FIFO, LIFO, weighted average, specific ID

FIFO (First-In, First-Out). Assumes oldest costs sell first. In rising-price environments, FIFO generally reports lower COGS and higher ending inventory than LIFO, boosting gross profit. IFRS and U.S. GAAP both permit FIFO.

LIFO (Last-In, First-Out). Assumes newest costs sell first. In inflation, LIFO usually produces higher COGS and lower taxable income relative to FIFO. Allowed under U.S. GAAP, prohibited under IFRS. Many U.S. filers disclose a LIFO reserve to show the difference between LIFO inventory and a non-LIFO basis.

Weighted-Average Cost. Pools costs to compute an average per-unit cost (periodic average or moving average under perpetual systems). Simpler to maintain and less sensitive to price swings than FIFO/LIFO. Permitted under both frameworks.

Specific Identification. Tags actual costs to individual items (e.g., unique serial-numbered goods, high-value items). Provides the most precise matching of cost to revenue but is impractical for homogeneous, high-volume items. (Permitted under GAAP/IFRS when feasible.)

MethodBest forEffect in inflationIFRS / GAAP
FIFOPerishables; typical retail/wholesaleLower COGS, higher ending inventoryAllowed by both
LIFOU.S. firms seeking tax alignment with current costsHigher COGS, lower taxable incomeGAAP: allowed; IFRS: not allowed
Weighted averageLarge volumes of indistinguishable itemsSmooths price swingsAllowed by both
Specific IDUnique, high-value itemsMatches actual costAllowed when practical

Choice of method has presentation and analysis implications. For example, investors comparing two retailers should check the footnotes for FIFO vs. LIFO and, if disclosed, the LIFO reserve to bridge inventory and COGS to a comparable basis. GAAP requires disclosure of the inventory measurement basis in the notes.

How to calculate COGS step-by-step (merchandisers and manufacturers)

For retailers/wholesalers (periodic):

  • Start with Beginning Inventory (BI).
  • Add Purchases (including freight-in; net of purchase returns/allowances and discounts).
  • Subtract Ending Inventory (EI) at cost (per your method). The result is COGS.

For manufacturers:

  • Compute COGM first: beginning WIP + manufacturing costs (DM, DL, OH) − ending WIP.
  • Then apply: COGS = Beginning Finished Goods + COGM − Ending Finished Goods.

For perpetual systems: Your software relieves inventory and records COGS on each sale using the current layer cost (FIFO), the rolling average (moving average), or the tagged cost (specific ID). Period-end counts true up variances.

Finally, ensure your period-end inventory valuation complies with measurement rules (IFRS: LCNRV; GAAP: LCM — with LIFO/retail method considerations). Write-downs and reserves impact COGS and margins immediately, so document triggers and approvals.

Frequently Asked Questions (FAQs)

What’s the difference between COGS and operating expenses?

COGS are direct costs tied to the products sold (materials, factory labor, freight-in, manufacturing overhead). Operating expenses are the indirect costs of running the business (rent, admin salaries, marketing). Mixing them distorts gross margin and comparability.

Which inventory methods are allowed under IFRS vs. U.S. GAAP?

IFRS (IAS 2) allows FIFO and weighted average and prohibits LIFO. U.S. GAAP allows FIFO, weighted average, specific identification, and LIFO (with required disclosures in the notes).

Does my inventory system change the COGS formula?

No — the underlying math is the same. Periodic systems compute COGS at period-end with BI + Purchases − EI (or + COGM for manufacturers). Perpetual systems update COGS continuously as each sale occurs.

What is a LIFO reserve?

It’s a disclosure that shows the difference between inventory reported using LIFO and what it would be under a non-LIFO method (often FIFO/average). It helps analysts compare companies that use different cost formulas and ties into note disclosures required by GAAP.

Which costs belong in COGS for a manufacturer?

Direct materials, direct labor, and manufacturing overhead attributable to production. Many practitioner lists also include freight-in, parts used in production, and storage tied to the factory. Selling and administrative costs remain below the line.

Sources