Calculating Cost of Goods Sold
You will learn the formula for COGS and how it links to gross profit.
Accountancy and Book Keeping › Trading Account · 20 min read
Welcome back. In the previous chapter, "Special Stock Adjustments," we looked at how to handle unusual situations like goods lost to fire, stolen by thieves, or given away as free samples. We learned how to remove those abnormal items from our standard purchases. Now, we are ready to tackle the ultimate goal of the Trading Account: figuring out exactly how much it cost us to procure the goods we actually sold to our customers this year.
This metric is called the Cost of Goods Sold (COGS).
If you understand COGS, you understand the entire logic of the Trading Account. The Trading Account is not just a random collection of debits and credits; it is simply a visual, T-shaped calculator designed to figure out your COGS and subtract it from your Sales to reveal your Gross Profit.
In this chapter, we are going to build the COGS formula from scratch, understand the deep accounting logic behind it, and learn how to extract it from a messy list of trial balance figures without falling for common traps.
The Intuition: Why Do We Need COGS?
Imagine you open a business selling premium leather jackets. On the first day of the year, you buy 100 jackets from a manufacturer at ₹2,000 each. You pay ₹2,00,000 in total. During the year, you manage to sell 60 of these jackets for ₹3,500 each, bringing in ₹2,10,000 in sales revenue.
If someone asks you, "How much gross profit did you make on trading this year?", what would you say?
A beginner might look at the cash and say: "Well, I received ₹2,10,000 from sales, and I spent ₹2,00,000 on purchases. So my profit is ₹10,000."
This is completely wrong. Why? Because it violates one of the most sacred rules in accounting: the Matching Principle.
In our jacket example, you generated revenue from selling 60 jackets. Therefore, you are only allowed to deduct the cost of those 60 jackets. You cannot deduct the cost of all 100 jackets, because 40 of them are still sitting in your shop. Those 40 unsold jackets are not an expense yet; they are an asset (Closing Stock) that will generate revenue next year.
To find your true profit, you must match the 60 jackets sold against the cost of those specific 60 jackets:
- Revenue from 60 jackets = ₹2,10,000
- Cost of those 60 jackets (60 × ₹2,000) = ₹1,20,000
- True Gross Profit = ₹90,000
That ₹1,20,000 is your Cost of Goods Sold (COGS). It is the direct cost of the goods that actually left your shop in the hands of a customer.
Building the COGS Formula
In the real world, a business doesn't just buy inventory once on the first day of the year. A business starts with some old stock from last year, buys new stock every week, pays freight charges, returns some damaged goods to suppliers, and ends the year with a mix of old and new unsold stock.
Because we cannot easily track the individual cost of every single item as it walks out the door (unless we have a highly advanced barcode scanning system), we calculate COGS mathematically at the end of the year using a simple formula.
Here is the standard formula for Cost of Goods Sold:
COGS = Opening Stock + Net Purchases + Direct Expenses - Closing Stock
Let's break down exactly what each of these four components means and why it is in the formula.
1. Opening Stock
This is the value of the unsold goods you already had sitting on your shelves on the morning of the first day of the financial year. These goods were carried over from the previous year. Because they are available to be sold this year, their cost is the starting point of our calculation.
2. Net Purchases
During the year, you buy more goods to replenish your shelves. We use Net Purchases, which means we take the total Gross Purchases and subtract any Purchase Returns (Returns Outward).
- Net Purchases = Gross Purchases - Purchase Returns
We add Net Purchases to the Opening Stock because these are additional goods you brought into the business to sell.
3. Direct Expenses
As we learned in previous chapters, the cost of a product is not just the price tag paid to the supplier. It includes all direct costs incurred to bring the goods to your godown and get them ready for sale. If you buy ₹50,000 worth of goods but have to pay ₹5,000 in Carriage Inwards (freight) and ₹2,000 in loading wages, the true cost of acquiring those goods is ₹57,000. Therefore, we must add all Direct Expenses to our calculation.
4. Closing Stock
This is the crucial final step. By adding Opening Stock + Net Purchases + Direct Expenses, we have calculated the total cost of every single item that was in our shop at any point during the year. But remember the Matching Principle! We didn't sell all of it. Some goods are still sitting on the shelves at the end of the year. To find the cost of what we did sell, we must subtract the cost of what we did not sell. Therefore, we subtract the Closing Stock.
The Journey of Inventory Costs
- 1Opening Stock: The goods you already had on the shelf on April 1st.
- 2Add Net Purchases: The new goods you bought from suppliers during the year.
- 3Add Direct Expenses: The freight and wages paid to get those goods into your godown.
- 4Equals Cost of Goods Available for Sale (COGAS): The maximum amount of inventory you could possibly sell this year.
- 5Less Closing Stock: The goods still sitting unsold on the shelf on March 31st.
- 6Equals Cost of Goods Sold (COGS): The final cost of the goods that actually went home with customers.
The Intermediate Step: COGAS
Notice the intermediate step in the flow above: Cost of Goods Available for Sale (COGAS). COGAS = Opening Stock + Net Purchases + Direct Expenses. This represents the total pool of goods you had available to sell. Once you have this pool, it can only be split into two destinies: either the goods were sold (COGS), or they were not sold (Closing Stock). Therefore: COGAS = COGS + Closing Stock. If you understand this relationship, you can easily rearrange the formula to solve for any missing number in an exam question.
The Link Between COGS and Gross Profit
Now that we know how much the sold goods cost us, calculating the trading profit is incredibly simple.
Gross Profit = Net Sales - Cost of Goods Sold
(Note: Net Sales = Gross Sales - Sales Returns / Returns Inward)
This simple equation is the entire reason the Trading Account exists. In fact, the traditional T-format of the Trading Account is just a visual way of writing this exact algebraic equation. Let's prove it.
Think about the standard format of a Trading Account:
- On the Debit side, we list: Opening Stock, Net Purchases, and Direct Expenses.
- On the Credit side, we list: Net Sales and Closing Stock.
- The balancing figure on the Debit side is the Gross Profit.
Because the total of the Debit side must equal the total of the Credit side, we can write it as an equation: Opening Stock + Net Purchases + Direct Expenses + Gross Profit = Net Sales + Closing Stock
Now, let's use basic algebra to isolate Gross Profit. We will move Opening Stock, Net Purchases, and Direct Expenses to the other side of the equals sign (which turns them into negative numbers):
Gross Profit = Net Sales + Closing Stock - Opening Stock - Net Purchases - Direct Expenses
Let's rearrange the items on the right side to group the costs together: Gross Profit = Net Sales - (Opening Stock + Net Purchases + Direct Expenses - Closing Stock)
Look at the part in the brackets. What is that? That is the exact formula for COGS! So, the equation simplifies perfectly to: Gross Profit = Net Sales - COGS
The Concept of "Adjusted Purchases"
Sometimes, when you are given a Trial Balance to prepare final accounts from, you will not see "Opening Stock" or "Closing Stock" listed in their usual ways. Instead, you will see a single line item called Adjusted Purchases.
This is a very common scenario that trips up students. You must understand what this term means.
When a business calculates "Adjusted Purchases" before preparing the trial balance, they have already done the heavy lifting of adjusting the inventory. They have taken the purchases, added the old stock, and subtracted the unsold stock.
If you look closely at the formula for Adjusted Purchases, you will realize it is almost identical to COGS. The only difference is that Adjusted Purchases usually does not include Direct Expenses. Therefore: COGS = Adjusted Purchases + Direct Expenses.
Advanced Trap: Gross Profit Margins (Cost vs. Sales)
In advanced problems, you are often asked to calculate COGS or Closing Stock, but you are not given all the numbers. Instead, you are given the Sales figure and a "Gross Profit Percentage."
To extract COGS, you use the formula: COGS = Net Sales - Gross Profit. However, examiners love to play a trick with the Gross Profit percentage. They will state the percentage in one of two ways:
- 1Gross Profit is 20% on Sales.
- 2Gross Profit is 20% on Cost.
You must read the wording carefully.
Scenario A: Percentage on Sales If Sales are ₹1,00,000 and GP is 20% on Sales:
- GP = 20% of ₹1,00,000 = ₹20,000.
- COGS = ₹1,00,000 - ₹20,000 = ₹80,000.
This is straightforward.
Scenario B: Percentage on Cost If Sales are ₹1,20,000 and GP is 20% on Cost: You CANNOT calculate 20% of ₹1,20,000. The 20% applies to the COGS, which you don't know yet! Let COGS be 100. If profit is 20 on cost, then Sales = Cost + Profit = 100 + 20 = 120. So, Sales represent 120% of the cost. To find the cost: COGS = (Sales / 120) × 100 COGS = (₹1,20,000 / 120) × 100 = ₹1,00,000. Gross Profit = ₹20,000.
Worked Examples: Extracting COGS
Let’s put everything we have learned into practice. We will walk through three different scenarios, from basic to advanced, showing exactly how to extract COGS and avoid the traps.
Example 1: The Distractor Test
You are given the following balances for the year ended 31st March:
- Opening Stock: ₹40,000
- Purchases: ₹1,50,000
- Purchase Returns: ₹10,000
- Carriage Inwards: ₹5,000
- Carriage Outwards: ₹8,000
- Factory Wages: ₹15,000
- Office Salaries: ₹25,000
- Closing Stock: ₹35,000
Task: Calculate the Cost of Goods Sold.
Step-by-Step Solution:
- 1Identify the relevant items: We only want Opening Stock, Net Purchases, Direct Expenses, and Closing Stock.
- 2Filter out the distractors:
- Carriage Outwards is an indirect expense (cost of delivering goods to customers). Ignore it.
- Office Salaries is an indirect expense (administrative). Ignore it.
- 1Calculate Net Purchases: Purchases (₹1,50,000) - Purchase Returns (₹10,000) = ₹1,40,000.
- 2Identify Direct Expenses: Carriage Inwards (₹5,000) + Factory Wages (₹15,000) = ₹20,000.
- 3Apply the COGS Formula:
COGS = Opening Stock + Net Purchases + Direct Expenses - Closing Stock COGS = ₹40,000 + ₹1,40,000 + ₹20,000 - ₹35,000 COGS = ₹2,00,000 - ₹35,000 COGS = ₹1,65,000
Example 2: Finding the Missing Closing Stock
A business provides the following information:
- Opening Stock: ₹50,000
- Net Purchases: ₹3,00,000
- Direct Wages: ₹20,000
- Net Sales: ₹4,00,000
- Gross Profit is 25% on Sales.
Task: Calculate the value of the Closing Stock.
Step-by-Step Solution:
- 1Find the Gross Profit: The problem states GP is 25% on Sales.
GP = 25% of ₹4,00,000 = ₹1,00,000.
- 1Find the COGS: We know that Net Sales - COGS = Gross Profit.
Therefore, COGS = Net Sales - Gross Profit. COGS = ₹4,00,000 - ₹1,00,000 = ₹3,00,000.
- 1Set up the COGS formula to find the missing variable:
COGS = Opening Stock + Net Purchases + Direct Expenses - Closing Stock ₹3,00,000 = ₹50,000 + ₹3,00,000 + ₹20,000 - Closing Stock ₹3,00,000 = ₹3,70,000 - Closing Stock
- 1Solve for Closing Stock:
Closing Stock = ₹3,70,000 - ₹3,00,000 Closing Stock = ₹70,000
Example 3: The Adjusted Purchases Scenario
You are given the following trial balance extracts:
- Adjusted Purchases: ₹2,50,000
- Freight Inwards: ₹15,000
- Sales: ₹3,80,000
- Closing Stock (given inside the trial balance): ₹40,000
Task: Calculate COGS and Gross Profit.
Step-by-Step Solution:
- 1Understand Adjusted Purchases: Because Adjusted Purchases is given, Opening Stock and Closing Stock have already been accounted for in that ₹2,50,000 figure.
- 2Calculate COGS:
COGS = Adjusted Purchases + Direct Expenses COGS = ₹2,50,000 + ₹15,000 (Freight Inwards) COGS = ₹2,65,000 (Note: We completely ignore the ₹40,000 Closing Stock for this calculation because it was already subtracted when the accountant calculated the Adjusted Purchases figure).
- 1Calculate Gross Profit:
Gross Profit = Sales - COGS Gross Profit = ₹3,80,000 - ₹2,65,000 Gross Profit = ₹1,15,000
Quick Revision
- The Core Formula: COGS = Opening Stock + Net Purchases + Direct Expenses - Closing Stock.
- The Matching Principle: We subtract Closing Stock because we cannot expense the cost of goods we haven't sold yet. We must match the cost of the goods sold against the revenue they generated.
- COGAS: Cost of Goods Available for Sale is the sum of Opening Stock, Net Purchases, and Direct Expenses. It represents the total pool of goods before Closing Stock is deducted.
- Gross Profit Link: Gross Profit is simply Net Sales minus COGS. The Trading Account is just this equation in a T-format.
- Adjusted Purchases: This means Opening Stock has already been added and Closing Stock has already been subtracted from Purchases. If you see this, do not adjust for stock again in the Trading Account.
- Margin Conversions: A Gross Profit of 25% on Cost (1/4) is exactly equal to a Gross Profit of 20% on Sales (1/5). Read the wording carefully!
- Ignore Indirect Expenses: When calculating COGS, strictly ignore items like Carriage Outwards, Office Salaries, Rent, and Sales Commissions. These belong in the Profit & Loss Account, not the Trading Account.
Related notes
- What is a Trading Account?
You will learn why businesses prepare a trading account and what gross profit means.
- The Format of a Trading Account
You will learn how to set up the debit and credit sides of the account.
- Understanding Direct Expenses
You will learn how to identify expenses that belong in the trading account.
- Purchases, Sales and Returns
You will learn how to calculate net purchases and net sales for the account.