The formula used to calculate cosa is:
cosa = (historical cost of closing stock – historical cost of opening stock)
average index number
index number appropriate to closing stock
index number appropriate to opening stock