How to measure a fish tank and convert it to gallons

The exact constants, the substrate correction most people skip, and how to sanity-check any volume you calculate.

Free · No signup · Runs entirely in your browser

Inside dimensions of the tank (inches)

Measure the inside faces of the glass, and take the height to where the water line will actually sit — not the top of the frame.

Substrate, rock and headspace displace water. 90% suits a lightly decorated tank; 75–80% a heavily planted or rocky layout; 100% a bare tank.

19.94 gallons
Nominal capacity
Actual water
17.95 gal
Conservative stocking
13.46 in
Standard stocking
17.95 in
Generous stocking
22.44 in

Using a 90% fill factor (gravel, rockwork and headspace removed).

Read the stocking figures as a range, not a limit. They come from the classic one-inch-of-adult-fish-per-gallon guideline applied to your actual water volume. That guideline takes no account of body shape, waste output, filtration, planting or temperament — two six-inch goldfish are not equivalent to twelve one-inch tetras. Use the conservative column for territorial fish and for species that are unusually messy for their length — but note that the guideline fails outright for a few groups rather than merely needing a lower tier, and goldfish are the clearest case: a single fancy goldfish needs far more water than one inch per gallon implies. Look those species up separately. The generous column is only realistic with strong filtration and a disciplined water change routine. Always check the adult size and needs of a species before buying, and dose medication off the actual water volume rather than the number printed on the box.

Step by step

  1. 1 Measure inside the glass. Most people use the number printed on the box, and that number is both rounded and measured before any gravel went in. Getting it right takes one measurement and one division.
  2. 2 Divide by the exact constant. There are exactly 231 cubic inches in a US gallon and exactly 1,000 cubic centimetres in a litre — both are definitions rather than approximations, so a volume worked out this way is as accurate as your tape measure. A 24 by 12 by 16 inch tank is 4,608 cubic inches, which divided by 231 gives 19.94 gallons. A 100 by 40 by 50 centimetre tank is 200,000 cubic centimetres, or exactly 200 litres. One US gallon is 3.785411784 litres if you need to move between the two.
  3. 3 Subtract what is not water. Substrate, rockwork, hardscape and the headspace under the lid all displace water, and a planted tank with three inches of aquasoil can easily lose a fifth of its nominal volume. Ninety percent is a reasonable default for a lightly decorated tank, seventy-five to eighty for a heavily planted or rocky layout, and a hundred only if you are calculating a bare tank. That corrected figure — not the box number — is what every dose and every stocking estimate should be based on.
  4. 4 Read stocking as a range. The conservative reading suits territorial species and fish that are unusually messy for their length; the generous reading assumes strong filtration, live plants and a disciplined water change routine. Neither tier rescues the groups the rule simply does not fit — goldfish above all, where the honest answer is a species-specific minimum tank size rather than a fraction of an inch-per-gallon figure. When in doubt, stock under the conservative figure and add fish slowly over several weeks, because a new filter has almost no bacterial colony and even a correctly sized plan will spike ammonia if everything arrives at once.

Worked example: a standard 20 gallon tank

Step Working Result
Cubic inches24 × 12 × 164,608 in³
To US gallons4,608 ÷ 23119.94 gal
To litres19.94 × 3.78541178475.50 L
Actual water at 90%19.94 × 0.9017.95 gal
Stocking, standard17.95 × 1.0 in/gal17.95 in
Stocking, conservative17.95 × 0.7513.46 in
Values are truncated, not rounded up. 4,608 ÷ 231 is 19.948…, which this tool shows as 19.94 rather than 19.95. A calculator that rounds up tells you that you have more water than you measured, and every dose based on it runs slightly strong. Truncating is the conservative choice.

Why the stocking rule is a starting point

The one-inch-per-gallon rule persists because it is easy to remember and roughly right for small, slim, peaceful community fish in a filtered tank. It falls apart at both extremes. Two six-inch goldfish are not equivalent to twelve one-inch tetras, because waste output scales with body mass rather than length and because goldfish need room to swim. Equally, a heavily planted tank with an oversized filter and weekly water changes can comfortably support more than the rule suggests. Treat it as a sanity check on a plan you have already researched, not as a shopping list.

Dosing off the wrong number is the mistake with the sharpest consequences. Medication and fertiliser doses are specified per unit of water, so if you dose a 20 gallon tank that actually holds 17 gallons you are running roughly eighteen percent over the intended concentration. That is enough to matter with copper-based treatments, with shrimp and snails, and with any fish already weakened by whatever you are treating. Always dose off actual water volume, and when you are unsure, err low and repeat rather than high and hope.