Financial Planning

Cost of Goods Sold: Calculate COGS With a Worked Example

Understand what COGS means, calculate it from inventory records, and follow an original example from purchases to gross profit.

By Finta Editorial TeamPublished November 15, 2026Last reviewed November 15, 2026

A glass workshop sends finished vases through an arch, with unsold vases in a separate bowl.

What you will learn

  • Explain COGS versus purchases and operating expenses.
  • Reconcile inventory movements to the cost of goods sold.
  • Check the assumptions before applying a formula.

Cost of goods sold, or COGS, is the cost assigned to goods sold during a period. Calculating it clearly helps you understand gross profit without confusing inventory purchases, supplier payments and actual sales. Start with what was available, subtract what remains on hand and keep the cost basis consistent. The worked example below traces that movement step by step.

What do COGS mean in business?

The SEC’s business glossary describes COGS as direct expenses associated with products sold or services provided. This lesson uses a simpler retailer example: goods bought for resale. Manufacturing, services and software businesses can have different cost structures and reporting policies.

A retailer may buy inventory now and sell it later. Until the sale, the recorded cost remains inventory under the example’s assumptions. When goods sell, their cost moves into COGS. The timing of the supplier payment is a separate question.

How can I calculate the COGS?

A simplified periodic-inventory relationship is beginning inventory + net inventory purchases and included acquisition costs - ending inventory. All amounts must use compatible cost bases. This is not a substitute for your finance owner’s inventory valuation policy.

Original inventory-to-COGS reconciliation

Input or resultAmount
Beginning inventory$15,000
Purchases+$40,000
Included inbound freight+$2,000
Purchase returns-$3,000
Goods available at cost$54,000
Ending inventory-$14,000
Cost of goods sold$40,000

The fictional retailer has $54,000 of goods available at cost and $14,000 still on hand, leaving $40,000 assigned to goods sold. Assume no write-downs, shrinkage, discounts, manufacturing conversion or other inventory movements. The inbound freight is included by an explicit teaching assumption, not a universal classification instruction.

Connect the cost to gross profit, not to every cash payment

If net sales are $80,000, gross profit is $80,000 - $40,000 = $40,000. That does not mean the company kept $40,000 after rent, marketing, administration, interest and taxes. Those costs have not been deducted in this simplified gross-profit calculation.

OpenStax’s merchandising-transaction explanation distinguishes inventory purchases, payables and sales activity. Paying an old supplier bill changes cash and a payable; it does not mean those goods were sold today. Buying additional unsold goods changes inventory without necessarily changing current-period COGS.

Find the common classification mistakes

  • Expensing every inventory purchase immediately without checking the applicable basis.
  • Using retail selling prices for ending inventory while beginning inventory uses cost.
  • Counting inbound freight twice, in inventory cost and again in the reconciliation.
  • Ignoring purchase returns, credits, stock losses or other movements.
  • Comparing goods-based COGS with a software cost-of-revenue line without understanding its policy.

The formula is only as reliable as the inventory and cost records. A physical count difference is a question to resolve, not a reason to change the ending value until the desired margin appears.

Try a one-input sensitivity

Keep all worked-example inputs unchanged except ending inventory, which is $12,000 rather than $14,000 after a verified correction. COGS becomes $42,000 and gross profit becomes $38,000. A $2,000 lower inventory balance increases this period’s cost by $2,000 under the stated assumptions.

The direction check helps find a broken spreadsheet formula. It does not establish whether a real adjustment is appropriate. Ask what evidence changed, which period it belongs to and who reviewed the treatment.

Use COGS in the right next calculation

The gross-margin mix lesson explains how product mix changes the overall margin after costs are established. The cash conversion cycle uses compatible inventory and cost flows to estimate timing. Keep those tasks distinct from calculating the inventory cost itself.

Give the gross-profit discussion a clear starting point. Keep the COGS reconciliation, inventory assumptions and unanswered questions together in Finta. Ask Aurora to prepare an explanation from those inputs for your next operating or finance meeting. Confirm inventory treatment in the accounting process before using the figures externally.

Copyable AI prompt

Try this with Aurora AI in Finta, Codex, or Claude. Share only information you are allowed to use, and check the answer before acting.

Using [authorized inventory and purchase records], draft a COGS reconciliation for [period and currency]. State valuation and included-cost assumptions. Separate beginning stock, purchases, returns, included costs, ending stock and unexplained movements. Calculate gross profit only from supplied net sales. Mark unknowns and possible double counting. Do not choose accounting or tax policy or alter records. Human review required.

Finta Field Guide. By Finta Editorial Team. Sources checked November 15, 2026. Examples and worksheets are original fictional teaching exercises, not customer results or benchmarks. General education, not individualized accounting, financial, investment, legal or tax advice.