Cost of goods sold and inventory accounting in Pakistan
For any business that buys or makes goods to sell, cost of goods sold is usually the largest single figure in the accounts — and one of the most misunderstood. Owners often assume it is simply what they spent on purchases during the year, which is wrong and can badly distort profit. The correct figure depends on inventory: what was left over at the start and end. This guide explains how cost of goods sold is calculated, the inventory valuation methods behind it, and why the closing stock figure quietly drives both profit and tax.
The cost of goods sold formula
The core calculation is straightforward once the logic is clear. Cost of goods sold is opening stock, plus purchases during the period, less closing stock. Think of it physically: you begin the period with some stock, you buy more during it, and whatever is not still sitting on the shelf at the end must have been sold. So the cost of what was sold is everything you had available minus what remains. The common error — treating purchases alone as the cost of sales — ignores the stock movement entirely, and overstates cost (and understates profit) in a year when stock is building up, or the reverse when stock is run down. The purchases figure is only one of three inputs, and the two stock figures matter just as much. This cost-of-sales line is what produces the gross-profit subtotal in the profit and loss format.
Valuing the inventory
The formula raises an immediate question: at what cost is the stock valued, when the same item may have been bought at different prices through the year? Two methods are commonly used:
- FIFO (first in, first out) — assumes the earliest-purchased stock is sold first, so the stock remaining at period end is valued at the most recent purchase costs.
- Weighted average — values all units at the average cost of stock available during the period, smoothing out price changes.
Both are acceptable under the applicable reporting framework, and neither is universally "correct" — but the choice affects the closing stock value, and therefore profit, particularly when prices move significantly. Whichever is chosen must be applied consistently from year to year, because switching methods to flatter a particular year's profit undermines comparability and is exactly what scrutiny looks for. Inventory is also generally carried at the lower of cost and net realisable value, so stock that has become worth less than it cost is written down rather than carried at an inflated figure.
We handle the computation, the minimum-tax comparison, statutory accounts and the annual filings together.
Avail our corporate tax servicesWhy closing stock drives profit and tax
The deduction rules sit in section 20 of the Income Tax Ordinance 2001, which allows expenditure incurred wholly and exclusively for business purposes, and section 35, which requires stock to be valued and brings the cost of goods sold into the computation on an accrual basis. That second provision is why closing stock is not a bookkeeping nicety: it is the figure that decides how much of the year's purchases the Ordinance lets you deduct.
Where the cost of goods sold figure comes from
| Component | Effect on cost of goods sold | Effect on taxable profit |
|---|---|---|
| Opening stock | Increases | Reduces |
| Purchases in the year | Increases | Reduces |
| Freight inward and duties | Increases | Reduces |
| Purchase returns and discounts | Reduces | Increases |
| Closing stock | Reduces | Increases |
Here is the point that surprises owners: the closing stock figure has a direct, mechanical effect on profit and tax. Because closing stock is subtracted in the cost-of-goods-sold formula, a higher closing stock value produces a lower cost of goods sold, which produces a higher gross profit — and therefore higher taxable income. The reverse is equally true. This makes inventory valuation a lever on reported results, which is why it is examined closely in both audits and tax reviews.
Getting it right
The practical essentials are a reliable stock-take at period end, a consistent valuation method, and holding purchases and stock in properly structured ledger accounts — a discipline that starts with the chart of accounts. Cost of goods sold also feeds directly into break-even thinking, since the variable cost per unit in a break-even analysis is essentially the cost-of-sales element, and it sits within the wider articulation of the statements covered under financial statement preparation. For a trading or manufacturing business, getting inventory and cost of goods sold right is fundamental to knowing whether the business is actually making money.
Sources
This guide is written against the official and clearly labelled professional references below. Rates, thresholds and portal procedures change between reviews, so open the primary source before relying on a figure.
Questions people also ask
How is cost of goods sold calculated?
By a simple formula: opening stock at the start of the period, plus purchases (and directly attributable costs) during the period, less closing stock at the end. The logic is that whatever you started with plus whatever you bought, minus whatever is still on the shelf, must be what was sold. Getting the opening and closing stock figures right is therefore essential, because an error in either flows straight into the cost figure and the profit.
What is the difference between FIFO and weighted average?
They are two methods of valuing inventory when unit costs vary over time. FIFO — first in, first out — assumes the earliest stock purchased is sold first, so closing stock is valued at the most recent costs. The weighted-average method values stock at the average cost of all units available. Both are acceptable under the relevant framework; the choice affects the closing stock value and therefore profit, and should be applied consistently.
Why does closing stock affect my tax?
Because closing stock reduces cost of goods sold, and cost of goods sold reduces profit. A higher closing stock value means a lower cost of goods sold, which means higher gross profit — and higher taxable income. So the way inventory is valued has a direct effect on the tax computed. This is exactly why inventory valuation is scrutinised: it is a lever on reported profit, and misstating it misstates tax.
Send the tax year and the transaction or filing involved, and we will tell you what is actually required.
Talk to Chartered Advisory Open the tax calculators