From The Aquarium Wiki
Minimum Tank Size refers to the size of the tank, in litres or gallons, that the particular creature in question can thrive in once fully grown. Of course, most fish will prefer tanks at least 20 gallons/litres larger than what is specified, especially when it comes to the larger fish over 12"/30 cm long.
The footprint of the tank must also be taken into consideration. A 37.9 Litres (10 US G.) hexagonal tank will be smaller than a 37.9 Litres (10 US G.) long tank. Therefore you will be able to keep more in the long tank than the hexagonal tank. Active fish need lots of lateral swimming space so prefers long tanks and would feel cramped and unhappy in tall tanks.
With larger fish, you must always provide turning space (in vertical and horizontal directions), especially with less flexible fish, so the tank must be at least three times wider than the fish's length and twice taller than its maximum dorsal fin to pelvic fin height.
- See Common tank sizes.