You need to figure the volume of the pool: width x length x height in feet, then multiply by 7.5 to get gallons. Assuming your ends are round, yours would be something like 15 x 27 (for the middle) plus 7.5^2 x pi for the circular ends, all times 4 feet for the depth, or a total of 2327 cubic feet. Multiply by 7.5 to get 17451 gallons.
Now, if you want an 8 hour turnover (recommended) then you'd want 2181 gal/hour, or 36 gpm. Add in a safety factor (partially clogged filter, etc.) and somewhere around 50 gpm should be fine. Don't overdo it, though, too much volume is not good either.
A: More simply put would be more like 12 t 18 hrs depending upon use or bather load - - how many people, dogs etc in pool for what length of time - 8 hrs would be the minimum if the pool were not used.
If you fill it with 4 feet of water (48 inches), the pool will contain about 5,310 gallons of water.
6 inches = 1/2 foot(40-ft x 20-ft x 0.5-ft) x (12 inches per foot)3 / (231 cubic inches per gallon) = 2,992.2 gallons (rounded)
367.2 (rounded)
The pool holds 7,600 gallons of water
598 Imperial gallons, approx.
To give you an idea, a 36-foot by 18-foot by 5-foot deep pool takes about 24,000 gallons of water to fill.
7.48 US gallons of water.
548.6 US gallons, approx.
That's 27 cf of water. And, at 7.48 gal/cf, that gives you... 201.96 gallons, or 202 gallons rounded...
50,000 gallons
About 17,204 gallons.
17,204 gallons.