To find your tank’s volume, multiply its inside length by width by height in inches, then divide by 231 to get US gallons.
Knowing how to determine gallons in a fish tank matters more than most new aquarists realize. That number drives filter sizing, heater wattage, medication doses, and how many fish you can safely keep. The good news is the math takes about ten seconds—provided you measure the right dimensions.
The Simple Formula For Rectangular Tanks
The calculation for a standard rectangular or cube-shaped aquarium is straightforward: (L × W × H) ÷ 231 = gallons. Each measurement is taken in inches, and 231 represents the number of cubic inches in one US gallon.
That formula is the same one used by the volume calculators from Inch Calculator and Omni Calculator, both of which default to this conversion factor. The equation works for any rectangle, whether it’s a 5-gallon desktop cube or a 6-foot show tank.
Measure Inside, Not Outside
The most common error is measuring the tank’s outer frame. Glass thickness adds up on larger tanks—a half-inch of glass on each side changes the volume more than you’d expect. Measure from the inside edge of the glass, not the plastic trim or the stand.
Here’s what to measure, step by step:
- Length: the inside distance from left wall to right wall
- Width: the inside distance from front glass to back glass
- Height: measured to the water line, not the rim
That last point trips up plenty of owners. A tank labeled “20 gallon high” might only ever hold 17 or 18 gallons of water because you leave an inch of air at the top. For stocking and dosing, the water line is the number that matters.
What About Non-Rectangular Tanks?
Not every aquarium is a box. Bow-front, cylindrical, hexagonal, and pentagon shapes each need their own formula because the rectangle equation assumes straight parallel walls.
For a cylindrical tank, the volume is π × radius² × height ÷ 231. The radius is half the tank’s diameter, and the height is again measured to the water line. Bow-front tanks are trickier—their curved front means no single rectangle formula works. The Bulk Reef Supply calculator handles this shape, as do the ones at Inch Calculator and Omni Calculator, each applying a geometry-specific equation.
If math isn’t your strong suit, these aquarium volume calculators do the heavy lifting. You enter your inside dimensions, pick your tank shape, and they return the volume in gallons, liters, and UK gallons. Just verify you’re reading the US gallons figure, since the other units are easy to grab by mistake.
Why Real Water Volume Is Lower Than The Math
The calculated volume assumes an empty tank. The moment you add substrate, rocks, driftwood, and decor, those objects displace water. On a heavily scaped tank, that displacement can be several gallons—enough to matter when you’re dosing liquid medication or figuring out how many fish the tank truly supports.
Bulk Reef Supply’s water volume calculator exists specifically for this reason. It lets you subtract the estimated displacement of your hardscape so the number you work with reflects actual water volume, not the tank’s theoretical maximum. For dosing and stocking decisions, that adjusted figure is the honest one.
| Tank Shape | Volume Formula (US Gallons) | Key Measurement |
|---|---|---|
| Rectangular / Cube | (L × W × H) ÷ 231 | Inside glass, to water line |
| Cylindrical | (π × r² × H) ÷ 231 | Radius = half the diameter |
| Bow-front | Shape-specific calculator | Inside glass, front curve included |
| Hexagonal | Shape-specific calculator | Side length and height |
The safety angle matters too. If you’re calculating gallons before buying equipment or livestock, overstating the volume by a gallon or two can lead to an undersized filter or an overstocked tank. When in doubt, round your final number down and subtract for displacement. Your fish will thank you, and so will your water testing kit.
If you’re working with a small desktop tank, our tested 2-gallon fish tank roundup covers the best options we’ve verified in person. A tank that small has less margin for volume error, so the formula matters even more there.
References & Sources
- Omni Calculator. “Aquarium Volume Calculator.” Conversion factors and shape-specific formulas anchored in 231 cubic inches per US gallon.
- Inch Calculator. “Aquarium Tank Volume Calculator.” Inside-dimension measurement guidance and rectangular volume formula.
- Bulk Reef Supply. “Aquarium Water Volume Calculator.” Real water volume accounting for substrate and hardscape displacement.
