Well, obviously all sorts of other factors than inches are relevant too:
footprint of the tank
swimming needs
territoriality
schooling needs
aggression/timidity
dietary needs
water requirements
and I've probably left out a few.
But assuming that you are talking a rectangular tank of 24+ inches long, smallish fish not more than c. 3 inches and have worked out all the compatibility/schooling issues, 22-25 inches would seem to be about right.