Calculating the container capacity