How Aquarium Stocking Really Works
The famous "one inch of fish per gallon" rule is a useful starting point, but it ignores the single most important factor in a healthy tank: surface area. Oxygen enters the water and carbon dioxide leaves it at the air-water boundary, so a short, wide 20-gallon "long" tank can safely hold more fish than a tall, narrow 20-gallon "high" tank with the exact same volume. This calculator runs both methods and reports whichever is more conservative, so you stay on the safe side.
The Two Methods, Side by Side
For volume we use 231 cubic inches per US gallon and subtract about 10 percent for substrate, rocks, and decor that displace water. For surface area we allow one inch of tropical fish per 12 square inches of water surface, or one inch of heavy-waste coldwater fish (like goldfish) per 30 square inches.
net gal = (L x W x H / 231) x 0.9; surface cap = (L x W) / 12; capacity = min(gallon rule, surface rule)Why Body Mass Matters Too
Inches are a rough proxy for bioload. A 6-inch goldfish produces far more waste than three 2-inch tetras, which is why the coldwater setting is roughly three times stricter. A 30 x 12 x 16 inch tank holds about 22 net gallons and 360 square inches of surface, giving a tropical surface cap near 30 inches of fish versus a 22-inch gallon cap, so surface area wins and you would stock to about 22 inches. Always stock gradually, test ammonia and nitrite weekly during the first month, and aim for around 80 percent of the calculated maximum to leave room for growth and good water quality. For a complete tank setup, the Aquarium Calculator can help you determine water volume from your tank's dimensions.