Quick way to calculate gallon capacity of an aquarium: multiply length times width times height in inches and divide by 231, since there are 231 cubic inches in a gallon. This method is quick and convenient when you want to know the exact capacity of a given tank. Be sure to allow for the 1/2 inch or so thickness of the glass or acrylic panels the tank is made of.