About the Aquarium Calculator
The Aquarium Volume & Fish Stocking Calculator turns the length, width, and height of a rectangular tank into an actual water volume in gallons and liters, since a tank marketed as '20 gallons' rarely holds exactly that once you account for glass thickness and fill line. It also converts that volume into a rough stocking benchmark for freshwater community fish using the long-standing 'one inch of fish per gallon' rule of thumb. Anyone shopping for a new tank, building a custom enclosure, or deciding whether a tank can support another fish can use it to get real numbers instead of guessing from the box.
How It Works
Enter the tank's length, width, and height in inches. The calculator multiplies the three dimensions to get volume in cubic inches, divides by 231 (the number of cubic inches in one US gallon) to produce the gallon figure, and multiplies that by 3.78541 to show liters. The same gallon number is then reported as the rough maximum inches of adult freshwater fish body length the tank could support under the inch-per-gallon guideline.
Formula & Methodology
231 cubic inches per US gallon is a fixed conversion constant, so the core calculation is simply L x W x H / 231 for gallons, then a metric conversion. Because the calculator assumes the tank is filled to whatever height you enter, using the true water-line height rather than the tank's outer glass height gives the more accurate 'as stocked' volume instead of the rated capacity printed on the box.
Examples
Standard 20-gallon-class tank
A tank measuring 24 x 12 x 16 inches works out to 4,608 cubic inches, or about 19.9 gallons (75.5 liters) of water, lining up with the roughly 20-gallon capacity commonly printed on tanks of that footprint. Under the inch-per-gallon guideline, that supports up to about 20 inches of adult community fish.
Larger 55-gallon-class tank
A 48 x 13 x 21 inch tank comes out to 13,104 cubic inches, converting to about 56.7 gallons (214.7 liters), close to the nominal 55-gallon size sold under that footprint. That translates to a rough stocking guideline of about 57 inches of community fish.
Advantages
- Converts the physical dimensions of any custom or oddly sized rectangular tank into an exact gallon and liter figure, rather than relying on a manufacturer's rounded rating.
- Gives a quick, math-based starting point for stocking decisions instead of eyeballing how many fish look right for a given tank.
- Provides both gallons and liters in one pass, useful when comparing a US-labeled tank against liter-based dosing instructions for medication or water conditioner.
Common Mistakes
- Measuring the tank's outer glass dimensions instead of the interior water-holding space, which inflates the volume estimate.
- Using the full tank height instead of the actual water fill line, overstating how much water the tank really holds day to day.
- Applying the inch-per-gallon stocking number to large, deep-bodied, or waste-heavy fish, where it dramatically understates real space and filtration needs.
Edge Cases to Watch For
- All three dimensions must be greater than zero; the calculator returns an error message instead of a number if length, width, or height is left at zero or a negative value.
- The formula assumes a straight-sided rectangular tank filled to the entered height, so it overstates volume for bowfront, cylindrical, or hexagonal tanks, which need a different geometry.
- The stocking figure is meant for small to medium community fish only; it breaks down for large-bodied or heavy-waste species like goldfish or cichlids, which need considerably more volume per inch of length.
Common Use Cases
- Fishkeepers comparing tank options before a purchase who want an apples-to-apples gallon figure across different footprints.
- Hobbyists building a custom or DIY tank who need to know its capacity for sizing equipment like heaters or filters rated by gallon.
- Anyone converting between US gallons and liters for dosing medications, conditioners, or fertilizers labeled in the other unit.