Real-world examples of cost of goods sold calculation (COGS)

If you learn best by seeing the numbers, you’re in the right place. This guide walks through real, step‑by‑step examples of cost of goods sold calculation so you can see exactly how COGS works in different types of businesses. Instead of abstract theory, we’ll focus on examples of real situations: a retailer tracking inventory, a manufacturer dealing with raw materials and labor, a SaaS company wrestling with what counts as COGS, and even a seasonal business with big swings in demand. You’ll see how COGS flows from inventory to the income statement, how to treat freight, returns, and discounts, and how different inventory methods change the numbers. These examples of cost of goods sold calculation are designed for founders, finance managers, and students who need to translate textbook formulas into real decisions. By the end, you’ll be able to look at any business model and say, with confidence, “Here’s the COGS, and here’s why it matters for gross margin.”
Written by
Jamie
Published

Let’s start with the classic retail scenario, then layer on more complex examples of cost of goods sold calculation.

Imagine a small electronics store for the year 2024:

  • Beginning inventory (Jan 1): $40,000
  • Purchases during the year: $160,000
  • Purchase returns and allowances: $5,000
  • Purchase discounts (for early payment): $3,000
  • Freight‑in (shipping to get goods to the store): $7,000
  • Ending inventory (Dec 31, physical count): $50,000

First, compute net purchases:

Net purchases = Purchases − Returns − Discounts
Net purchases = \(160,000 − \)5,000 − \(3,000 = \)152,000

Add freight‑in to get goods available for sale:

Goods available for sale = Beginning inventory + Net purchases + Freight‑in
= \(40,000 + \)152,000 + \(7,000 = \)199,000

Now apply the basic formula for this example of cost of goods sold calculation:

COGS = Goods available for sale − Ending inventory
COGS = \(199,000 − \)50,000 = $149,000

On the income statement, that $149,000 sits right under sales revenue and drives gross profit. Simple, but this is the backbone for all the more advanced examples below.


Retail inventory method: more nuanced examples of cost of goods sold calculation

Real stores rarely have clean, one‑line numbers. They deal with shrinkage, markdowns, and multiple inventory methods. Here’s how different approaches change the examples of cost of goods sold calculation.

FIFO vs. LIFO vs. Weighted Average (retail)

Assume a clothing retailer buys the same T‑shirt at rising prices in 2024:

  • Jan: 1,000 units @ $8
  • Apr: 1,000 units @ $9
  • Aug: 1,000 units @ $10

Total units available: 3,000
Total cost: \(8,000 + \)9,000 + \(10,000 = \)27,000

The store sells 2,200 units during the year. Ending inventory is 800 units (3,000 − 2,200).

FIFO example of cost of goods sold calculation
Under FIFO (first‑in, first‑out), you assume the earliest units are sold first.

COGS (2,200 units) is:

  • 1,000 @ \(8 = \)8,000
  • 1,000 @ \(9 = \)9,000
  • 200 @ \(10 = \)2,000

Total FIFO COGS = $19,000
Ending inventory (800 units, all at \(10) = \)8,000

LIFO example of cost of goods sold calculation
Under LIFO (last‑in, first‑out), the most recent units are sold first.

COGS (2,200 units) is:

  • 1,000 @ \(10 = \)10,000
  • 1,000 @ \(9 = \)9,000
  • 200 @ \(8 = \)1,600

Total LIFO COGS = $20,600
Ending inventory (800 remaining @ \(8) = \)6,400

Weighted‑average example of cost of goods sold calculation
Average cost per unit = \(27,000 ÷ 3,000 = \)9

COGS = 2,200 × \(9 = \)19,800
Ending inventory = 800 × \(9 = \)7,200

Same business, same physical flow of goods, three different examples of cost of goods sold calculation—and three different gross margins. This is exactly why U.S. GAAP and tax rules around LIFO vs. FIFO matter so much. The IRS explains inventory methods in Publication 538:
https://www.irs.gov/publications/p538


Manufacturing: full examples of cost of goods sold calculation

Retailers buy finished goods. Manufacturers build them. That means COGS includes raw materials, direct labor, and manufacturing overhead.

Consider a mid‑sized furniture manufacturer in 2024:

  • Beginning finished goods inventory: $120,000
  • Beginning work‑in‑process (WIP): $60,000
  • Raw materials used: $400,000
  • Direct labor: $250,000
  • Manufacturing overhead applied: $200,000
  • Ending WIP: $80,000
  • Ending finished goods inventory: $150,000

First, calculate cost of goods manufactured (COGM):

Total manufacturing costs = Raw materials + Direct labor + Overhead
= \(400,000 + \)250,000 + \(200,000 = \)850,000

Add beginning WIP and subtract ending WIP:

COGM = Beginning WIP + Total manufacturing costs − Ending WIP
= \(60,000 + \)850,000 − \(80,000 = \)830,000

Now plug COGM into the income statement style example of cost of goods sold calculation:

COGS = Beginning finished goods + COGM − Ending finished goods
= \(120,000 + \)830,000 − \(150,000 = \)800,000

This is a classic manufacturing example of cost of goods sold calculation taught in accounting courses at universities like Harvard Business School and others that publish cost accounting material online:
https://www.hbs.edu


SaaS and digital products: modern examples of cost of goods sold calculation

By 2025, a growing share of businesses are software, platforms, and digital subscriptions. Their COGS looks very different from retail or manufacturing.

Take a B2B SaaS startup with $5 million in revenue in 2024. Here’s how they might define COGS:

  • Cloud hosting and infrastructure (AWS, Azure, etc.): $420,000
  • Third‑party APIs required to deliver service: $110,000
  • Customer support salaries (only those directly supporting existing customers): $300,000
  • Payment processing fees on subscriptions: $90,000

Total COGS = \(420,000 + \)110,000 + \(300,000 + \)90,000 = $920,000

Gross profit = \(5,000,000 − \)920,000 = $4,080,000
Gross margin = 81.6%

In this example of cost of goods sold calculation, product development salaries, marketing, and general admin are not in COGS; they’re operating expenses. But some companies classify support or implementation differently, which is why investors always read the footnotes.

For public tech companies, you can see real examples of cost of goods sold calculation in their Form 10‑K filings on the SEC’s EDGAR system:
https://www.sec.gov/edgar


Service businesses: gray‑area examples include labor and materials

Traditional accounting textbooks say pure service businesses don’t have “cost of goods sold” because they don’t sell goods. In practice, many service firms still report a COGS‑like line, often called “cost of revenue” or “cost of services.”

Consider a plumbing contractor with $1.2 million in service revenue in 2024. The owner wants an example of cost of goods sold calculation that reflects how much it costs to deliver jobs.

She classifies:

  • Direct materials (pipes, fixtures, valves): $260,000
  • Direct labor (technicians’ wages and payroll taxes): $380,000
  • Truck fuel and job‑related vehicle costs: $70,000
  • Small tools and consumables: $30,000

Total “COGS” or cost of services = $740,000

Gross profit = \(1,200,000 − \)740,000 = $460,000

This is not a textbook inventory example of cost of goods sold calculation, but it serves the same purpose: isolating direct costs to understand gross margin and pricing.

The IRS allows flexibility in how service businesses categorize direct costs, as long as methods are consistent and follow general tax rules:
https://www.irs.gov/businesses/small-businesses-self-employed


E‑commerce: returns, discounts, and shipping in COGS

Online sellers have messy data: returns, promo codes, free shipping, and marketplaces like Amazon taking a cut. Let’s build a realistic 2024 e‑commerce example of cost of goods sold calculation.

Assume:

  • Beginning inventory: $80,000
  • Purchases: $300,000
  • Purchase returns: $10,000
  • Purchase discounts: $5,000
  • Freight‑in: $20,000
  • Ending inventory (counted at year‑end): $90,000

On the revenue side:

  • Gross sales: $750,000
  • Sales returns and refunds: $60,000
  • Sales discounts and promo codes: $40,000
  • Marketplace fees (e.g., Amazon referral fees): $55,000

First, COGS:

Net purchases = \(300,000 − \)10,000 − \(5,000 = \)285,000

Goods available for sale = \(80,000 + \)285,000 + \(20,000 = \)385,000

COGS = \(385,000 − \)90,000 = $295,000

Now, net revenue (to put COGS in context):

Net sales = Gross sales − Returns − Discounts
= \(750,000 − \)60,000 − \(40,000 = \)650,000

Many e‑commerce brands treat marketplace fees as a reduction of revenue, not COGS. Others put them in COGS because they’re variable and tied to sales volume. If you treat the $55,000 as COGS, your example of cost of goods sold calculation becomes:

Adjusted COGS = \(295,000 + \)55,000 = $350,000

That one classification decision moves gross margin from 54.6% to 46.2%. Same cash, different story—exactly why investors compare accounting policies across real examples.


Seasonal and inflation‑heavy examples of cost of goods sold calculation

Two real‑world headaches for finance teams in 2024–2025: seasonality and inflation.

Seasonal retail example

Picture a ski shop with most of its sales in Q4 and Q1. For the 2024–2025 season:

  • Pre‑season inventory (Sept 1): $500,000
  • Purchases during season: $700,000
  • Freight‑in: $60,000
  • End‑of‑season inventory (Mar 31): $350,000

Goods available for sale = \(500,000 + \)700,000 + \(60,000 = \)1,260,000

COGS for the season = \(1,260,000 − \)350,000 = $910,000

If the shop reports monthly, it must allocate COGS across months based on sales and inventory movements. A single physical count at year‑end won’t explain monthly gross margin swings, so many seasonal businesses now use perpetual inventory systems to keep examples of cost of goods sold calculation accurate in real time.

Inflation and rising input costs

With global inflation spikes in 2022–2023 and lingering cost pressure into 2024–2025, inventory costing choices matter more. Under inflation, LIFO tends to show higher COGS and lower taxable income; FIFO does the opposite.

Suppose a food distributor buys the same canned product three times:

  • Batch 1: 10,000 units @ $1.00
  • Batch 2: 10,000 units @ $1.20
  • Batch 3: 10,000 units @ $1.40

Total units: 30,000
Total cost: $36,000

The distributor sells 22,000 units.

Under FIFO, COGS is based more on \(1.00 and \)1.20 costs; under LIFO, more on $1.40. That choice can swing reported COGS by tens of thousands of dollars across real examples of cost of goods sold calculation, which is why standard setters and tax authorities pay attention to these methods.

For broader context on inflation trends and their impact on businesses, the U.S. Bureau of Labor Statistics publishes current data:
https://www.bls.gov


Common mistakes in real examples of cost of goods sold calculation

Once you’ve seen a few dozen real income statements, you notice the same COGS mistakes over and over.

Mixing operating expenses into COGS

Founders often throw everything “product‑related” into COGS. That can include:

  • Product development salaries
  • Marketing creative tied to a specific product
  • Office rent for HQ

Those are usually operating expenses, not COGS. In clean examples of cost of goods sold calculation, you include only costs directly tied to getting a product or service ready for sale and delivered.

Ignoring freight‑in and handling

Freight‑in and customs duties to get goods into your warehouse belong in inventory and COGS, not in “shipping expense” below gross profit. Freight‑out (shipping to customers) is usually a selling expense. Many small businesses misclassify these and end up with distorted examples of cost of goods sold calculation.

Not reconciling physical counts to the books

If your system says ending inventory is \(500,000 and your physical count says \)470,000, that $30,000 difference is shrinkage. It needs to be recognized, usually by increasing COGS. Skipping this step is a fast way to end up with fictional gross margins.


How to use these examples of cost of goods sold calculation in your business

The point of all these examples of cost of goods sold calculation is not to memorize formulas; it’s to sharpen judgment.

In a product business, better COGS data helps you:

  • Set prices that actually cover direct costs and leave room for overhead and profit
  • Negotiate with suppliers using hard numbers on material cost per unit
  • Decide whether to outsource manufacturing or keep it in‑house

In a SaaS or service business, clear COGS definitions help you:

  • Understand true gross margin by customer or product line
  • Spot customers who are support‑heavy and unprofitable
  • Decide whether to invest in automation that reduces variable delivery costs

If you’re not sure how to classify a particular cost in your own example of cost of goods sold calculation, check:

  • Whether the cost varies directly with units sold or customers served
  • Whether the cost is required to get the product or service ready for sale
  • Whether that cost would disappear if you stopped selling that product entirely

When in doubt, many finance teams build internal “COGS policies” so that everyone treats similar costs the same way across periods and product lines. That consistency is what makes your own real examples of cost of goods sold calculation comparable over time.


FAQ: examples of cost of goods sold calculation

Q: Can you give a quick example of cost of goods sold for a small shop?
Yes. A coffee shop starts the month with \(5,000 of beans, milk, and pastries, buys \)12,000 more, and ends the month with \(4,000 left. Ignoring other details, an example of cost of goods sold calculation would be: COGS = \)5,000 + \(12,000 − \)4,000 = $13,000.

Q: What examples of costs belong in COGS for a manufacturer?
Typical examples include raw materials, factory labor directly making the product, factory utilities, depreciation on production equipment, and factory rent. Office salaries and corporate marketing do not belong in COGS.

Q: Are software development salaries part of COGS for a SaaS company?
Usually not. In most real examples of cost of goods sold calculation for SaaS, development is treated as R&D or product expense below gross profit. COGS focuses on hosting, support, and other direct delivery costs. That said, some companies capitalize development costs or classify certain implementation teams in COGS; you have to read the accounting policy notes.

Q: How often should I update my COGS calculations?
At least every reporting period—monthly or quarterly for most businesses. Retailers with fast‑moving inventory often update COGS continuously using perpetual systems, so their internal examples of cost of goods sold calculation are almost real time.

Q: Where can I see real examples of COGS in public company reports?
Look at the income statement and footnotes in Form 10‑K filings on the SEC’s EDGAR site. You’ll see how different industries define COGS and what their examples of cost of goods sold calculation look like in practice.

Explore More Income Statement

Discover more examples and insights in this category.

View All Income Statement