Here are some formulas for estimating total gallons and pool capacity.
Rectangular or Square Pools:
Length x Width x Average Depth x 7.5
(Example): 20 x 40 x Pool with an average depth of 5 feet
20 x 40 x 5 x 7.5 = 30,000 gallons
Round Pools:
Diameter of Pool x the diameter of the pool x Average Depth x 5.9.
(Example): 20′ round pool, average depth 4′
20 x 20 x 4 x 5.9′ = 9,440 gallons
Oval Pools:
Length x Width x Average Depth x 5.9
Free Form Pools:
If possible, divide pool shape into combinations of the above configurations and add together for total gallons. If this is impractical, calculate as nearly as possible the square footage of surface area of the pool, multiply this by the average depth and multiply this total by 7.5, the number of gallons in each cubic foot. If the pool has sloping sides, multiply total gallons computed by 0.85. In many instances, the pool contractor can provide the capacity of your pool.