Opening and closing inventory: from stock on hand to cost of sales

Opening and closing inventory: from stock on hand to cost of sales
Every business that buys goods to resell them faces the same question when it closes a period: how much did the merchandise that went out sold actually cost? The answer does not lie in selling prices but in purchase costs, and finding it requires looking at three figures that chain together: what was on hand at the start, what was purchased during the period and what remained at the end. Those three figures are the opening inventory, the purchases of the period and the closing inventory, and their combination produces the cost of sales, one of the most important values in the income statement of any trading business.
Earlier lessons of this manual explained how purchases are recorded, how incoming merchandise is valued and how adjustments related to inventory are prepared. This lesson does not repeat those explanations: it uses them. Here we show the exact point of the accounting cycle at which the opening inventory and the closing inventory become the cost of sales of the period, and we compare the way of reaching that cost under the periodic system and under the perpetual system. When the lesson is over, the reader should be able to explain in his or her own words why cost of sales cannot be calculated without knowing the opening inventory and the closing inventory, and when it is better to rely on a physical count or on a kardex record.
A continuous cycle: the closing of one period opens the next one
The opening inventory of a period does not appear out of nowhere: it is exactly the closing inventory of the previous period. If on December 31 the business counted its stock and determined that it had merchandise left worth $8,000,000, then on January 1 it opens its books with an opening inventory of $8,000,000. The inventory account is not reset or erased when the year changes; it simply continues with the balance left by the closing, and that is why the quality of a period's closing determines the quality of the next period's starting point.
This continuity explains a phrase often repeated in accounting: a good closing leaves the next period ready. If the final count was wrong, if a purchase invoice was omitted or if an exit was recorded twice, that error does not die on December 31: it travels inside the opening inventory of the new year and contaminates, from the very first day, every cost calculation made afterwards. That is why the opening inventory is not a formality: it is the memory of the business turned into numbers.
Once the period is open, the logic is simple. During the year the company buys more merchandise, and that purchased merchandise is added to what already existed. Everything the business can sell in the period is, therefore, the opening inventory plus the purchases. At the end of the period the warehouse is looked at again: what remained unsold is the closing inventory. The difference between what was available to sell and what remained at the end is, precisely, what was sold, and its cost is the cost of sales.
The opening inventory: the starting point of the formula
The opening inventory enters the cost of sales formula as an addition for a very concrete reason: the units left over from the previous period did not evaporate. If they were not sold before, chances are they will be sold now, and the cost of those units belongs to the cost of sales of the current period. A merchant who sells in January merchandise bought in December is earning income in January with a cost born in December; if the opening inventory were not included in the calculation, that cost would go unrecognized and the period's profit would appear inflated.
Think of the formula as an inventory of everything that passed through the warehouse. The opening inventory represents the part of that journey that was already done when the period started. Adding it is a way of recognizing that those goods are also available for this year's sales and that, if they are sold, their cost must appear here. Leaving it out or ignoring it would break the balance between what came in, what went out and what remained, which is the foundation of any inventory control.
Purchases of the period: the second ingredient
The purchases of the period are the second ingredient of the formula and are taken at the value already learned in the lessons devoted to purchases. In that part of the manual it was explained how the cost of merchandise placed in the warehouse is built: the invoice value adjusted for returns and discounts, plus the expenses needed to make the goods ready for sale, such as freight and transport insurance. This lesson does not go back over those calculations; it only reminds us that, in the formula, the purchases figure must be the real cost of the merchandise acquired, not the nominal value of the invoices.
Buying increases the merchandise available for sale. If the business started with $8,000,000 of stock and purchased $15,000,000 more during the period, then it had $23,000,000 of merchandise available. Nobody can sell more than what was available, so that figure is the ceiling of the business: everything sold comes out of those $23,000,000, and whatever is not sold will be kept for the next period.
The closing inventory: what remains at the end of the period
The closing inventory plays the opposite role to the opening one: it is subtracted. The reason is just as simple. The merchandise that remained unsold at the closing did not generate income in this period, so its cost cannot be charged to this period either. That merchandise is still an asset of the business, a value kept in the warehouse that will become a cost only when it is sold, probably in the next period. If the closing inventory were not subtracted, the cost of sales would be overstated by that amount and the period's profit would appear reduced for no real reason.
The closing inventory figure can come from two sources: from the physical count of the warehouse, which gives the real ending balance, or from the kardex record, which gives the ending balance according to the books. Both should match if everything was recorded properly, but in practice that does not always happen, and knowing when to use each one is part of what is explained later in this same lesson.
| Component of the formula | What it represents | Value in the example |
|---|---|---|
| Opening inventory | Stock carried over from the previous period | $8,000,000 |
| Purchases of the period | Merchandise acquired and available for sale | $15,000,000 |
| Merchandise available for sale | Opening inventory plus purchases | $23,000,000 |
| Closing inventory | Stock that remained unsold at the closing | $9,500,000 |
| Cost of sales of the period | Available merchandise minus closing inventory | $13,500,000 |
The formula looks like this: cost of sales equals opening inventory plus purchases minus closing inventory. With the figures of the example, $8,000,000 plus $15,000,000 minus $9,500,000 equals $13,500,000. The reading is clear: out of the $23,000,000 of merchandise the business had available, $9,500,000 are still in the warehouse on December 31 and $13,500,000 went out sold. That last value is the cost of sales that is matched against revenue in the income statement, and comparing it with sales produces the gross profit of the business.
| Movement of the period | Units | Unit cost | Total value |
|---|---|---|---|
| Opening inventory | 1,600 | $5,000 | $8,000,000 |
| Purchases of the period | 3,000 | $5,000 | $15,000,000 |
| Merchandise available | 4,600 | - | $23,000,000 |
| Closing inventory (physical count) | 1,900 | $5,000 | $9,500,000 |
| Cost of sales | 2,700 | $5,000 | $13,500,000 |
To make the example easy to read, a constant unit cost of $5,000 per unit was assumed; in real life that cost changes according to the valuation method used, but the structure of the calculation is the same. Seen in units, the example also adds up: 1,600 units at the start plus 3,000 purchased give 4,600 available; if 1,900 remain at the end, then 2,700 units were sold, which at $5,000 each confirm the $13,500,000 of cost of sales. The formula works the same in units as in values, and that double check is an excellent way to validate that the period's calculations are correct.
Physical count and kardex: the real ending balance versus the balance according to records
Now it is time to answer when each source of the closing inventory is used. The physical count means going to the warehouse, counting unit by unit what really exists and valuing that result. It is the most faithful picture of the stock, but it costs time and money, which is why most businesses do it at least once per period, usually at the closing. The kardex, on the other hand, is the record that is updated with every entry and every exit: it provides the ending balance according to the records at any moment, without the need to count, but it is only reliable if every movement was recorded properly.
Why can the count and the kardex differ? The causes are many and very human: damaged merchandise that nobody reported, units lost or misplaced, internal or external theft, purchase invoices that have not been entered yet, sales that left the warehouse but were not recorded, customer returns that arrived but were not posted, packing or weighing errors. Any of those situations makes the records say one thing while the warehouse shows another. Correcting those differences is the subject of the adjustments lesson, and it is not repeated here; what matters at this point is understanding that the cost of sales is only as reliable as the closing inventory used in the formula.
The practical rule is simple. Under the periodic system, cost of sales is calculated with the closing inventory coming from the physical count, once the necessary adjustments have been made. Under the perpetual system, the kardex balance is used all through the period to make decisions, and the closing count serves to validate that the record matches reality; if it does not, the record is adjusted and the differences are treated as explained in the adjustments lesson. Both systems arrive at the same destination: a closing inventory that reflects what really remained, because only on that basis does the cost of sales tell the truth.
Periodic system and perpetual system: two roads to the same cost
Under the periodic system, throughout the period the inventory account keeps the value of the opening inventory and purchases accumulate in separate accounts, such as the purchases account. Sales are recorded at their selling value, but no cost is deducted at the moment of each sale. All the costing work is concentrated at the closing: the physical count is made, the closing inventory is determined and the closing entry is prepared, which takes the opening inventory out of the books, brings in the purchases and leaves the counted final balance as the inventory balance; the counterpart of that movement is precisely the cost of sales of the period, obtained with the formula already explained.
Under the perpetual system, the kardex deducts on each sale: when merchandise is sold, the exit of its cost is recorded at that very moment, debiting the cost of sales account and crediting the inventory account for the value of the units sold. In this way the inventory account is always up to date and the cost of sales account accumulates sale by sale throughout the period, without waiting for the closing. The final physical count is still necessary, but its role changes: it no longer serves to calculate the cost, but to verify that the records match the reality of the warehouse.
Which system is better? Most modern businesses use the perpetual one, supported by software, because they need to know at any moment how much is left of each product and how much it is costing them to sell. The periodic system is still useful in very small businesses or in those whose sales can be measured well with a closing count. The important thing is to understand that both roads must reach the same destination: if at the end of the period the opening plus purchases minus closing formula is applied to the perpetual figures, the result must match the cost of sales accumulated sale by sale. That coincidence is the best proof that the records are healthy.
| Aspect to compare | Periodic system | Perpetual system |
|---|---|---|
| When the inventory balance is known | Only at the end of the period, after the physical count | At any moment, because the kardex deducts on each sale |
| How the cost of sales is determined | With the formula: opening plus purchases minus closing | It accumulates sale by sale in the cost of sales account |
| When the inventory account is adjusted | Once, with the closing entry | On every entry and every exit; the final count only verifies |
| Recording effort during the period | Lower: purchases and sales are recorded, with no cost per sale | Higher: every sale requires valuing and recording its cost |
| Information available in the middle of the period | The cost of what was sold is unknown until the closing | The margin of each sale is known at the moment it is made |
| Usual tools | Notebooks, worksheets and simple spreadsheets | Kardex and inventory software |
It is worth insisting on one point: even under the perpetual system, the opening inventory and the closing inventory remain the pieces that join one period with the next. The formula does not disappear; it simply stops being the only way to calculate the cost because the daily record already builds it. But when closing the year, the business that uses the perpetual system must also make sure that its closing inventory is properly determined, because that value will be the opening inventory of the coming year, and because the formula applied to the annual figures must match what accumulated over the twelve months.
Frequent mistakes when calculating the cost of sales
- Forgetting that the opening inventory belongs to this period: if inherited merchandise is sold now, its cost must be added now.
- Adding the closing inventory instead of subtracting it: subtracting it is what prevents charging this period with the cost of what has not been sold yet.
- Using selling prices instead of costs: the formula works with what the merchandise cost, not with what was charged for it.
- Trusting only the records without validating them with the count: an undetected shortage stays hidden inside the cost of sales.
- Carrying over a badly made previous closing: a wrong opening inventory contaminates the whole year, because the formula starts from it.
- Recording incomplete purchases: if freight is missing or returns are not deducted, the purchases figure does not reflect the real cost.
Most of those mistakes are avoided by keeping the inventory up to date instead of rebuilding it at the end. A permanent record, fed by every purchase and every sale, turns the cost of sales calculation into a verification task instead of a guessing game. Tools such as Kardex Tauro exist precisely for that purpose: to keep the kardex always up to date and make the period closing a calm procedure.
The essentials of the lesson
- The opening inventory is what remained from the previous period, and that is why a good closing leaves the next period ready.
- The purchases of the period are added to the opening inventory and form the merchandise available for sale.
- The closing inventory is what remains at the closing, counted physically or calculated with the kardex, and it is subtracted from what was available.
- The cost of sales equals opening inventory plus purchases minus closing inventory: in the example, $13,500,000.
- The physical count gives the real ending balance and the kardex gives the balance according to records; if they differ, the correction belongs to the adjustments lesson.
- Under the periodic system the cost is calculated with the formula at the closing; under the perpetual system the kardex deducts on each sale and the balance is always up to date.
Knowing the cost of sales accurately is what separates a business that decides with data from one that only guesses. If you still calculate your inventory once a year and want to move to permanent control, remember that the basis of everything is the same formula and that the daily record is the best ally of the closing. With Kardex Tauro, the opening and closing inventory stop being an end-of-year mystery and become just another figure of the day to day.