Multiply this number by the height to determine the cubic volume in inches. For example, if you have a tank that is 12 inches in diameter and 20 inches high, the calculation looks like this: Divide the cubic volume in inches by 231 in order to find the number of gallons.