The number everything else depends on
Pool volume is not a fact you look up once and forget. It is the input for every dose of chlorine, every shock treatment, every algaecide, and the run time on your pump. Get it wrong by a quarter and every chemical decision you make for the rest of the season is wrong by a quarter too.
The formula
For a rectangular pool it is three numbers multiplied together:
Length × width × average depth × 7.48 = US gallons
The 7.48 is the number of US gallons in a cubic foot. Everything before it gives you the volume in cubic feet.
Take a common backyard size — 32 ft by 16 ft, sloping from 3 ft at the steps to 8 ft at the far end. The surface is 512 ft². The average depth is (3 + 8) ÷ 2 = 5.5 ft. So the volume is 512 × 5.5 × 7.48, which comes to roughly 21,065 gallons, or about 79,740 litres.
Average depth is where people go wrong
The instinct is to use the deep end, because that is the number people quote when they talk about their pool. Using 8 ft instead of 5.5 ft on the pool above gives 30,640 gallons — a 45% overestimate, and enough to make every chemical dose meaningfully wrong.
The shallow-plus-deep-halved shortcut works because most pools slope fairly evenly. If yours has a long flat shallow area and then drops off sharply, the true average sits below the halfway point and you will be overestimating slightly.
Round and oval pools
Only the surface area calculation changes. For a circle it is π × radius², so a 24 ft round pool is π × 12² = about 452 ft². For an oval, multiply the long axis by the short axis by 0.785. Then multiply by average depth and 7.48 exactly as before.
What the number is actually for
Once you have it, the dosing arithmetic gets easy. Divide by 10,000 and you have the multiplier for almost every product on the shelf. At 21,065 gallons that is 2.11 — so a dose written as "one pound per 10,000 gallons" means 2.11 pounds for your pool.
It also tells you how long filling will take. A garden hose moving 8 gallons a minute needs about 44 hours to fill that pool from empty, which is most of two days and worth knowing before you start.
Run your own numbers
FAQ
What is the formula for pool volume in gallons?
How do I find average depth if the floor slopes?
Does a round pool use a different formula?
Why does my chemical label say per 10,000 gallons?
Is a US gallon the same as an imperial gallon?
Sources
Primary references used for the figures and rules on this page.