The general rule is 1 inch of fish per gallon for small fish, but this varies. A better approach: 1" per 2 gallons for active swimmers, and consider adult size. A 20-gallon tank might hold 10-12 small fish (1-2") or 4-5 medium fish (3-4").
Aquarium Calculator
Tank Volume
20.0 gal
Max Fish
17"
Stocking
48%
Heater
80W
e.g., Tetras, Guppies, Corys
Add up adult sizes of all fish (e.g., 5 tetras × 2" = 10")
20.0 gal
16.5 gal
17"
48%
understocked
Room for more fish. Consider adding compatible species.
Equipment
Heater
76-80°F
80W
Filter
5x turnover
100 GPH
Water Change
20% weekly
3.3 gal