Although i do agree with everyone, experience and knowledge is the best way to choose fish to fit into a tank, the mathmatical equations can be useful in giving a ball park figure when working with certain fish. After you have the "ball park figure" you can take into account all the other factors such as compatibility, activity, waste, dimensions, etc and design the tank accordingly.