The gross profit is simply Sales minus the Cost of the
goods sold. It’s quite logical, if you think about it. So you need the Cost of Goods Sold figure (COGS), for a period, to find out the gross profit for that period. How to calculate the COGS if you don't have a computer to do it for you, is what we need to find out.

The first thing to come in mind is to take all the sales
receipts and invoices for the period for which you need to find the COGS. Then, find out which all items were sold out. Find the cost of
the individual items, from the purchase register. Then calculate the cost of all the
items sold. This will be your COGS for that period. By now you can see that it's not that simple at all. But, fortunately, there is another way.

Imagine that you are an accountant recruit at a retail firm.
On the first day of your employment, you are asked to calculate the stock
(inventory) at the warehouse of the retail firm. After a day of grueling work, you arrive at
an inventory figure, which represents the inventory at the end of the day at
the warehouse. Let’s say that it is

**I**(Inventory on day 1 at your job). You note it down and soon forget it._{1}
A few months go by. You are busy at your job. Suddenly your
boss asks how much is the COGS for the sales done, from your beginning of your
joining date. You scroll through the various registers and find out that there
has been lots of purchase of goods, since your date of joining. An the firm has also had a good period, with a lot of sales. You think of calculating the cost of each
items sold, and after sometime, conclude, that it’s quite cumbersome. So you think that you need to find another way.

Then you remember the inventory value

**I**(Inventory on day 1 at your job), which you had jotted down on the first day at the firm._{1}
You know that the inventory values must have been quite changed
from the beginning inventory figure

**I**, due to purchases and sales of goods, that have happened after you started working in the firm. So you wonder what changes must have happened to_{1}**I**, to arrive at the present inventory. You spend almost a day to calculate the present inventory figure, which is_{1 }**I**_{2}_{ }(inventory on the day you are asked to calculate COGS).
You know that purchases increase the inventory, and sales
(measured in COGS) decreases the inventory.
If there were no sales, then

**I**would have been, the total goods available for sale from day 1 to the present day. But the sales did happen, and the total goods available for sale must have got reduced by the sale of goods (measured in COGS). So, the present inventory_{1 }+ Purchases**I**would be_{2, }**I**.

_{1 }+ Purchases-COGS

_{}
This whole story of inventory change can be represented in
the equation

**I**

_{2}= I_{1 }+ Purchases-COGS
OR

**COGS= I**_{1}- I_{2}+ Purchases
Now you got an easy method to calculate COGS, and you don’t
waste any time.

**So you immediately begin calculating the the COGS for the period starting from the day of your joining to the day at which you were asked to find COGS.**
When the boss asks you the next time, to calculate the COGS
for the current financial year, you know that the formula for COGS, you arrived
earlier can be used that time too. You can modify your formula and finally arrive
at the general formula, which used world over, for calculating COGS.

**COGS= I**

_{(Beginning)-}I_{(Ending)}+ Purchases