A general rule of thumb is to select a pump that can provide a flow rate of at least 3-5 times the volume of the tank per hour. For a 40 gallon tank, this would mean a flow rate of 120-200 gallons per hour (GPH).
However, if you have a large sump or a high head height, you may need a more powerful pump. To calculate the head height, measure the vertical distance from the water level in the tank to the outlet of the pump. Then add 1 foot for every 10 feet of horizontal pipe.
Here is a table of some common pump sizes and their corresponding flow rates:
| Pump Size (GPH) | Flow Rate (GPH) |
|---|---|
| 100 | 100-120 |
| 200 | 150-200 |
| 300 | 250-300 |
| 400 | 300-400 |
You can also use a pump calculator to determine the size of pump you need. Here are some popular pump calculators:
* [Aquarium Co-Op's Pump Calculator](https://www.aquariumcoop.com/blogs/articles/how-to-choose-a-water-pump-for-your-aquarium)
* [The Spruce's Pump Calculator](https://www.thespruce.com/how-to-size-an-aquarium-pump-1468727)
* [Petco's Pump Calculator](https://www.petco.com/content/petco-store/en_US/pet-supplies/fish/articles/how-to-choose-an-aquarium-pump.html)
Once you have selected a pump, be sure to follow the manufacturer's instructions for installation and maintenance.