Use inside dimensions, not outside
Manufacturer-stated tank gallons are computed from outside dimensions. Glass thickness (1/4" on small tanks, up to 5/8" on larger ones), the 1–2 inches of air below the rim, and substrate displacement reduce the actual water volume by 10–20%. A “20-gallon long” sold at 30 × 12 × 12 actually holds about 17 gallons of water once it's set up. Use water height (not tank height) and inside dimensions for accurate stocking, dosing, and water-change math.
Why box gallons lie
Three layers of error stack between the "20 gallons" printed on the box and the water you're actually treating with dechlorinator:
- Outside-vs-inside dimensions.A 20-long's stated 30 × 12 × 12 outside reduces to roughly 29.5 × 11.5 × 11.5 inside once you subtract glass thickness on each face. That alone cuts volume by ~7%.
- Fill below the rim. Most aquarists fill 1–2 inches below the top edge to leave room for the lid, surface agitation, and to prevent splash-out. On a 12-inch-tall tank, 1.5 inches of air gap is another 12.5% reduction in usable height.
- Substrate + hardscape displacement. Two inches of substrate over a 30 × 12 footprint displaces ~3 gallons of potential water. A medium aquascape adds another 5% loss.
Stack those: a stated 20 → ~17 inside-dimensions → ~14.5 after fill drop → ~13 working volume. That's why the calculator above surfaces both gross (geometric capacity) and working (what you actually treat) numbers — they can differ by 30%+ on the same tank.
Working volume vs gross volume
The headline of the calculator is working volume— that's the number to use for dosing chemicals (dechlorinator, ferts, medication) and for sizing weekly water changes. Gross volume only shows up for floor-load planning, where the geometric capacity matters because the tank weighs the same whether you put substrate in it or not.
Most online aquarium calculators only report a single "volume" number (typically gross). That's fine if you understand the gap, fragile if you don't. Beginner stories of overdosing medication usually trace back to dosing for the box gallons, not the working gallons.
Formulas this calculator uses
- Rectangular:L × W × H, divided by 231 (cubic inches per US gallon, NIST exact). The 231 number isn't a rounding — it's the legal definition of a US liquid gallon.
- Bow-front: rectangular base + a half-elliptical bulge on the front. Half-ellipse area is (π/2) × (L/2) × bow depth, where bow depth is measured from the flat-front line to the deepest tip of the bulge (NOT from the back wall to the tip).
- Cylindrical: π × r² × H, where r is half the inside diameter. Simple, but the 0.5-inch glass thickness on a 12-inch outside diameter cuts internal volume by ~16%.
- Hex (regular six-sided): (√3 / 2) × F² × H, where F is the flat-to-flat distance. Hex tanks are typically advertised by point-to-point diameter, which is larger than F by a factor of 2/√3 ≈ 1.155 — verify which dimension your tank uses.
Standard tank sizes — stated vs actual
From Aqueon and Marineland published spec sheets. Outside dimensions are what the manufacturer states; approximate water is what you actually fill once the tank is set up at 1.5" below rim with a shallow substrate bed.
| Stated size | Outside (in) | Stated gal | Actual ~gal |
|---|---|---|---|
| 5 gallon | 16 × 8 × 10 | 5 | ~4 |
| 10 gallon | 20 × 10 × 12 | 10 | ~9 |
| 20 long | 30 × 12 × 12 | 20 | ~17 |
| 29 gallon | 30 × 12 × 18 | 29 | ~26 |
| 40 breeder | 36 × 18 × 16 | 40 | ~37 |
| 55 gallon | 48 × 13 × 21 | 55 | ~50 |
| 75 gallon | 48 × 18 × 21 | 75 | ~70 |
| 125 gallon | 72 × 18 × 23 | 125 | ~118 |
Where this calculator falls short
- Heavy aquascape with substantial rock or driftwood: the qualitative decor preset is a planning estimate, not a survey-grade measurement. For dosing-precision on a stocked aquascape, drain and measure refill volume directly.
- Saltwater tanks: math is identical, but water weight differs. Saltwater is ~2.5% denser than freshwater. For floor-load on a reef build, multiply the freshwater readout by 1.025.
- Acrylic tanks with bowed or asymmetric panels: not modeled. Use the rectangular shape and accept ±2–3% on bowed panels.
- Drilled / overflow tanks: the math here is gross capacity. If your display has an overflow box that constrains water level below the rim, set the "air above water" slider to that constraint.
Related tools
- Water weight calculator — for floor-load planning on tanks above 75 gallons.
- Heater sizing calculator — wattage from volume + room/target temperature delta.
- Substrate calculator — converts tank dimensions + bed depth into pounds and bags.
- Filter flow rate calculator — recommended GPH from working volume + stocking density.
- How to cycle a new aquarium — the foundational beginner guide. Volume is the main input.
Sources: NIST gallon definition (1 US liquid gallon = 231 cubic inches, exact), Aqueon and Marineland published tank spec sheets for standard sizes, peer-reviewed aquaculture literature on substrate-displacement effects. Working-volume math layer in lib/aquarium/tankVolume.ts on GitHub.