Cost of Goods Sold (COGS): Formula, Examples and What to Include

Diagram of the cost of goods sold formula: boxes of beginning inventory, purchases and ending inventory beside a stack of banknotes

Cost of goods sold (COGS) is what the stock you sold in a period cost you to buy or make. It equals opening stock plus purchases minus closing stock, all at cost. Subtract it from sales and you have gross profit, the first figure that tells you whether your prices work.

Most guides disagree on what goes into cost. This one settles it line by line from IFRS for SMEs, the version of IFRS for smaller companies. It then works COGS for a Lusaka shop and a Kampala candle maker.

What Is Cost of Goods Sold (COGS)?

COGS is the cost of the goods that left your business as sales in a period, and nothing else. IFRS calls it cost of sales.

Stock you buy is not an expense yet. It sits on the balance sheet as inventory. Its cost becomes an expense in the period of the sale (IFRS for SMEs, paragraph 13.20).

COGS sits on the profit and loss straight under sales. Sales minus COGS is gross profit, and gross profit divided by sales is your gross margin.

A shop's COGS is what it paid for the goods it sold, landed at its door. A maker's adds the cost of turning materials into goods: the makers' wages and the workshop's running costs.

Why Cost of Goods Sold Matters

COGS is the figure every later decision about price and stock rests on. Get it wrong and the profit, the margin and the tax figure are all wrong with it.

  • Profit. Gross profit is sales minus COGS. A shop that leaves freight out of COGS shows a margin it never earns.
  • Prices. Cost per unit is the floor of your price. To keep a 25% gross margin, the price is the cost divided by 0.75.
  • Losses. COGS from a count includes stock stolen, broken or expired, because it left the shelf too. Set it beside what your sales records say the goods cost, and the gap is your loss.
  • Tax. Taxable profit starts from the same closing stock, so its value moves your tax bill.

What's Included in COGS

COGS includes every cost of getting the goods to the place and condition in which they are sold. IFRS for SMEs lists these costs in paragraphs 13.5 to 13.9, and the table applies them to a shop and a maker.

What goes into the cost of goods sold, under IFRS for SMEs
CostShopMakerParagraph
The supplier's price, less trade discounts and rebatesInIn, for materials13.6
Import duties, and taxes you cannot claim backInIn13.6
Transport and handling to your premises: freight in, offloadingInIn13.6
Wages of the people who make the goodsNot applicableIn13.8
Workshop rent and power, machine depreciation and repairs, the production supervisorNot applicableIn, spread at normal output13.8, 13.9
Indirect materials: glue, labels, cleaning on the lineNot applicableIn13.8
Normal scrap from each runNot applicableIn13.13(a), by contrast

Spread at normal output means the workshop's fixed costs are divided by what it makes in a normal month (13.9). In a slow month, the part left over is an expense of that month, not extra cost on each unit.

The landed cost of one carton of cooking oil delivered to Mbarara is worked through in our guide to inventory valuation methods. A maker's raw materials are costed the same way, at their landed cost.

The full text is in the IFRS Foundation's module on inventories for SMEs, with worked examples for each paragraph.

What's Not Included in COGS

Any cost that doesn't bring the goods to the shelf, or to their finished state, stays out as an expense of the month. Paragraph 13.13 names four kinds, and two more sit beside them.

What stays out of the cost of goods sold
CostWhy it stays outParagraph
VAT you claim backIt is refunded, so it is not a cost13.6
Shop and office rent, office wages, power for the sales floorAdministration or selling, not production13.13(c), (d)
Sales staff, adverts, market stall fees, delivery to customersSelling costs13.13(d)
Storing finished goodsStorage, unless the process needs it before a further stage13.13(b)
Abnormal waste, such as a batch spoiled in a power cutNot a normal cost of making the goods13.13(a)
The extra paid for longer credit than normalIt is interest13.7

The common shortcut, direct costs only, is half right. A maker's workshop rent and machine depreciation are indirect, yet IFRS puts them in the cost of the goods it makes.

Stock losses sit in between. A COGS worked from counts includes them. Stock records that move with every sale show them on their own line, as inventory accounting explains.

How to Calculate Cost of Goods Sold (COGS)

COGS = opening inventory + purchases − closing inventory

Each figure is at cost. Purchases means net purchases: the supplier's price, less trade discounts and returns, plus freight and duties.

Closing inventory is subtracted, never added. What is still on the shelf at the end of the period was not sold.

Example

For example, a shop starts the month with stock that cost UGX 5,000,000, buys UGX 3,000,000 more and counts UGX 2,000,000 left at cost. COGS = 5,000,000 + 3,000,000 − 2,000,000 = UGX 6,000,000.

If sales were UGX 8,000,000, gross profit is UGX 2,000,000, a gross margin of 25%.

A month at a Lusaka shop, worked in full

For example, a grocery shop in Zambia closes October with these figures in kwacha. They are illustrative, not a real shop's.

For example: one month's cost of goods sold (ZMW)
LineZMW
Opening stock, counted at cost120,000
+ Purchases at the supplier's price, before VAT310,000
− Trade discount of 2%6,200
+ Transport from the supplier9,000
− Goods returned to the supplier4,800
= Net purchases308,000
− Closing stock, counted at cost130,000
= Cost of goods sold298,000
Sales, before VAT400,000
Gross profit102,000, a 25.5% margin

The 298,000 includes ZMW 3,500 of stock the count found missing. The shop's sales records cost the goods sold at ZMW 294,500; the formula can't tell the other 3,500 apart from sales.

Three errors that change the answer

Each error below changes the same month's figures. The first is the one that flatters profit most.

For example: the Lusaka shop's month with one error each (ZMW)
ErrorCOGSGross profitEffect
No error298,000102,000The true figure
Closing stock valued at its selling price, 170,000258,000142,000Profit overstated by 40,000
Shop rent of 15,000 added to purchases313,00087,000Gross margin understated: rent is an expense below gross profit
The purchase return not recorded302,80097,200Profit understated by 4,800

With stock records that move at every sale, COGS is also the cost of each sale added up. That total leaves out the missing stock, which is why it can sit below the counted figure.

Inventory Costing Methods (FIFO, LIFO, Average Cost)

When you bought the same item at different prices, a cost formula decides which price each sale carries. IFRS for SMEs requires specific identification for items that are not interchangeable, and FIFO or weighted average for the rest. It does not permit LIFO (13.17, 13.18).

Cost formulas and what each does to COGS
MethodHow a sale is costedUnder IFRSWhen prices rise
FIFO, first in, first outOldest cost firstAllowedLowest COGS, highest profit
Moving averageA new average cost after each deliveryAllowedBetween FIFO and LIFO
Periodic averageOne average for the whole periodAllowedBetween FIFO and LIFO
Specific identificationEach item's own costRequired for one-off itemsItem by item
LIFO, last in, first outNewest cost firstNot permitted; US GAAP allows itHighest COGS, lowest profit

The IFRS Foundation's module names both averages: periodic, worked once a period, and moving, worked after each purchase. The candle example below shows that they give different answers.

Use one formula for goods of a similar nature and keep it from year to year (13.18). FIFO vs LIFO works the gap through a quarter of rising prices.

COGS in Manufacturing

A maker works COGS in two steps: first the cost of the goods made, then the cost of those sold.

Cost of goods manufactured = opening work in progress + materials used + direct labour + production overheads − closing work in progress

COGS = opening finished goods + cost of goods manufactured − closing finished goods

Bill of Materials (BOM)

A bill of materials lists the materials and quantities in one unit. Multiply each line by the material's landed cost to get the materials part of the unit's cost.

Work in Progress (WIP)

Goods half made at the period end are work in progress, valued at the materials and conversion costs spent on them so far. They stay out of COGS until they are finished and sold.

Direct Labour and Overheads

The wages of the people who make the goods go in. So do the workshop's rent, power and machine costs, spread at normal output.

Office and sales wages stay out. A product's full cost, line by line, is in manufacturing costs.

Scrap and Quality Control

Normal scrap stays in the cost of the good units; abnormal waste is an expense of the period. In the module's example, a cotton maker's normal wastage of CU2,000 per run stays in cost. The extra CU5,000 lost to weak controls is expensed.

Worked Example: A Candle Maker's Month, Three Ways

For example, a candle maker in Uganda sells scented candles at UGX 8,000 each. It makes two batches of 30 in one month, and wax and jars cost more for the second. The figures are illustrative.

For example: what each batch of 30 candles cost (UGX)
CostBatch 1Batch 2
Wax and fragrance30,00054,000
Jars15,00021,000
Wicks and labels3,0003,000
Direct labour7,5007,500
Workshop overheads at normal output4,5004,500
Total60,00090,000
Cost per candle2,0003,000

The maker sells 25 candles from batch 1 before batch 2 is ready, then 15 more by the month end. Sales are 40 × 8,000 = UGX 320,000, and 20 candles are left.

For example: the same month under three cost formulas (UGX)
FIFOMoving averagePeriodic average
How the 40 sold are costed30 at 2,000 + 10 at 3,00025 at 2,000, then 15 at 2,85740 at 2,500
Cost of goods sold90,00092,857100,000
Closing stock, 20 candles60,00057,14350,000
Gross profit on 320,000230,000227,143220,000

The moving average changes when batch 2 arrives. The 5 candles left at 2,000 and the 30 new ones at 3,000 make 35 candles for UGX 100,000, or UGX 2,857 each.

The UGX 2,500 figure is the periodic average, not a moving average: UGX 150,000 for 60 candles, worked once for the month.

All three columns are allowed under IFRS. The UGX 10,000 gap is timing, not money lost. The cost not charged this month sits in closing stock until those candles sell.

Tips for Accurate COGS Tracking

Accurate COGS comes from accurate costs and an honest count. Eight habits cover most errors.

  • Count closing stock at cost, never at its selling price.
  • Record discounts and returns on the purchase, so net purchases are right.
  • Add freight and import duty to the goods, not to expenses.
  • Keep VAT you claim back out of every figure.
  • Separate abnormal losses from normal scrap, so a bad month doesn't raise every unit's cost.
  • Update a product's cost when the supplier's price changes, or your margin report goes stale.
  • Reconcile the count with your records every month. Inventory reconciliation shows how to find each gap.
  • Keep raw materials, work in progress and finished goods apart, on the shelf and in the records, so half-made goods are never counted as finished.

How to Find Your Cost of Goods Sold in ArmPOS

ArmPOS keeps the quantity and cost of every product as you buy and sell. Its reports take the cost of goods sold off your profit, but its ledger gets no cost of goods sold entry by itself.

  1. Give every product its cost. Product Cost on the product form is what you pay (Add your first products). On a purchase, each line shows its Net Unit Cost, and the pencil changes it for that purchase (Record a purchase).
  2. Read profit after COGS. Reports › Profit and Loss ends with two tiles, Net Profit (FIFO) and Net Profit (Average Cost). Each is sales minus the cost of the products sold, minus expenses (Reports to check every day).
  3. Read the formula's figures. Reports › Analytics Report shows the Opening Stock and Closing stock by purchase price, beside the period's purchases (Sales reports). If its purchases include VAT you claim back, take that off first.
  4. Value the closing stock. Reports › Inventory Valuation multiplies each product's STOCK ON HAND by its Cost (Stock reports). It uses one cost per product, not FIFO layers.
  5. Take losses out as they happen. Record breakage as a damage (Record damaged stock) and count errors as an adjustment (Count and adjust stock).
  6. Post COGS to the ledger at the month end. ArmPOS posts no COGS by itself (The chart of accounts and journal entries). The month-end entry brings 1200-INV to Inventory Valuation at cost, and inventory accounting shows it step by step.

Write-downs go to 1210 Inventory allowance, not 1200-INV, as inventory write-down explains, or the month-end entry undoes them. Accounting comes with some plans only.

ArmPOS has no production module: no bill of materials, work orders or automatic use of materials. A small maker records each run as two adjustments: a Subtraction for the materials and an Addition for the goods made. Barcodes in manufacturing sets out that method.

That guide sets the finished product's Product Cost at the run's material cost divided by the units made. Leave the makers' wages and workshop costs out of it when you record them as expenses. Profit and Loss takes off both the cost of products sold and the expenses, so they would count twice.

The full cost the IFRS rule above asks for, with labour and overheads at normal output, belongs in your costing sheet. Give it to your accountant for the year-end value of the goods still in stock.

Frequently asked questions

How do I calculate COGS?

Add purchases to your opening stock and subtract your closing stock, all at cost. For the Lusaka shop, 120,000 + 308,000 − 130,000 = ZMW 298,000.

Is COGS an expense?

Yes. It is the first expense on the profit and loss, charged in the period the goods are sold. Until then, their cost is inventory, an asset.

Does COGS include labour?

Only for a maker, and only the wages of the people who make the goods. A shop's wages, and a maker's office and sales wages, are operating expenses.

Is COGS the same as cost of sales?

For a business that sells goods, yes: IFRS uses the name cost of sales. A business that also sells services adds the cost of delivering them.

Is COGS the same as price?

No. COGS is what the goods cost you; the price is what the customer pays. The gap between them is your gross profit.

Which costing method should I use?

Under IFRS, FIFO or weighted average, chosen with your accountant and kept every year. LIFO is allowed under US GAAP only.

Count your stock at cost at the end of this month and run the formula beside Reports › Profit and Loss. Create a free ArmPOS account to keep each product's cost, purchases and counts in one place.