CALCULATE CAPACITY