A very common question on forums is how many fish can we stock in a freshwater tank. We know that overstocking our tank will cause problems and we want to avoid it.
There is a weird rule of thumb in the hobby saying that you can keep one 1 inch of fish per gallon of water. This rule worth nothing and should be ignored for one simple reason: every fish species have a different body mass and produce a different amount of waste. According to this rule, my 25-gallon aquarium could hold a maximum of 25 neon tetras (one inch each) or 12 goldfish (two inches each).
Unfortunately, a single 2 inches goldfish will probably produce as much waste as the 25 neon tetras altogether. I used to keep 40 neon tetras in a heavy planted 25-gallon tank without problems. Things could have been different with another fish species.
There are two good ways to know how many fish an aquarium can hold. First, each fish species have its requirements in terms of space. Some will need plenty of places to swim around while others don’t need much. Aggression is another very important factor to consider. When packed into a small tank with not enough hiding places, some fish will become territorial and aggressive which will create lots of stress.
Looking for information about the fish you are keeping is a very important aspect of the hobby. Fish profiles are easy to find online (and we have plenty here in the Aquarium Club).
Water quality is what I believe to be the other very important thing to look at. Assuming you provide the correct maintenance and don’t overfeed, nitrates and phosphate should be within normal ranges. High levels will create stress which often leads to diseases and death. Preferably, those levels should stay below 25 ppm and ideally below 10 ppm. Those are my personal preferences only.
If you do regular water changes and don’t overfeed, but still can’t keep your nitrate and phosphate levels within an acceptable range, there are probably too many fish in your tank.