Tank Volume Calculator Gallons: How to Measure
The calculator for this page is switched off while it is checked. The formula is below, and the worked example in the article shows how to use it by hand.
This calculator works out the volume of a rectangular, cylindrical, or spherical tank in US gallons and liters. You enter the tank’s dimensions (length, width, height for a rectangle; diameter and length for a cylinder; diameter for a sphere) and it returns the total capacity in gallons, along with cubic feet and liters. It uses the standard geometric volume formulas and converts the result to gallons using the US liquid gallon definition.
Formula
For a rectangular tank: V = L × W × H, where L is length, W is width, and H is height (all in feet). For a cylindrical tank: V = π × (D/2)² × L, where D is diameter and L is length. For a spherical tank: V = (4/3) × π × (D/2)³. The result is in cubic feet. To convert cubic feet to US gallons, multiply by 7.48052 (since 1 cubic foot = 7.48052 US gallons). For liters, multiply cubic feet by 28.3168.
Worked Example
Using the default rectangular tank: length = 4 ft, width = 2 ft, height = 3 ft. Volume in cubic feet = 4 × 2 × 3 = 24 ft³. Gallons = 24 × 7.48052 = 179.53 gallons. Liters = 24 × 28.3168 = 679.60 liters. The calculator shows 179.5 gallons and 679.6 liters.
How to Measure Your Tank Correctly
To get an accurate gallon count, measure the inside dimensions, not the outside. Wall thickness can add several inches, especially on plastic or fiberglass tanks. Use a metal tape measure for straight lines; for round tanks, measure the diameter at the widest point. If the tank is not a perfect geometric shape (e.g., has a conical bottom or rounded ends), break it into simpler shapes and add the volumes. For a horizontal cylinder that is partially filled, the formula changes; this calculator gives full capacity only.
Common Mistakes and How to Avoid Them
- Mixing units: Always convert all dimensions to the same unit before multiplying. If you measure in inches, convert to feet by dividing by 12.
- Using outside dimensions: This overestimates capacity, sometimes by 10% or more.
- Forgetting the conversion factor: Cubic feet and gallons are not 1:1. Multiply by 7.48, not by 1.
- Assuming imperial gallons: The calculator uses US gallons (231 in³). UK imperial gallons are about 20% larger (277.42 in³). Always check which gallon your pump or filter uses.
- Ignoring dished heads: Many cylindrical tanks have curved ends; the formula assumes flat ends. Add the head volume separately if needed.
When to Use This Calculator
Use it for sizing aquarium filters and heaters, calculating water treatment doses, estimating fuel or water storage capacity, or planning a rainwater collection system. For aquaculture or hydroponics, knowing the exact volume helps with nutrient mixing. For a home aquarium, the actual water volume is less than the tank volume because of substrate, rocks, and decorations; subtract 10-20% for a realistic water volume. For a fuel tank, the usable volume may be less than the geometric volume due to internal baffles or pickup tube height.
Limits of the Formula
The formulas assume perfectly flat, smooth surfaces and uniform dimensions. Real tanks have seams, rounded corners, and internal components that reduce volume. For a horizontal cylindrical tank that is not full, the volume varies with liquid height; the full-capacity formula does not apply. For a spherical tank, the formula gives the volume of a perfect sphere; most real spheres have a manhole or legs that do not affect internal volume but the shell thickness does. The calculator gives the geometric volume, not the actual usable volume. Always check with the manufacturer’s specifications when precision matters.
Frequently Asked Questions
How many gallons is a 4x2x3 foot tank?
Using the formula: 4 × 2 × 3 = 24 cubic feet. Multiply by 7.48052 to get 179.5 US gallons. That is a common size for a large aquarium or small water tank.
How do I convert cubic inches to gallons?
Divide the number of cubic inches by 231 (since 1 US gallon = 231 cubic inches). For example, 1,000 cubic inches ÷ 231 = 4.33 gallons. For liters, divide cubic inches by 61.024.
What is the difference between US and imperial gallons?
A US gallon is 231 cubic inches (about 3.785 liters). An imperial gallon is 277.42 cubic inches (about 4.546 liters). So an imperial gallon is about 20% larger. If you are using a British or Canadian product, check which gallon it references.
How do I calculate the volume of a horizontal cylinder tank that is partially full?
For a horizontal cylinder with radius r and length L, filled to height h, the volume is L × [r² × arccos((r – h)/r) – (r – h) × sqrt(2rh – h²)]. This is more complex; many online calculators have a dedicated partial-fill option. This calculator only gives full capacity.
Does the shape of the tank affect the formula?
Yes. Rectangular tanks use length × width × height. Cylindrical tanks use πr²L. Spherical tanks use (4/3)πr³. For irregular shapes, you can use water displacement: fill the tank with a known volume of water and measure, or break the shape into simpler parts.
Can I use this calculator for a vertical cylinder?
Yes, the formula is the same for vertical and horizontal cylinders: π × (diameter/2)² × height. Just enter the height as the cylinder length. The orientation does not change the total volume.
Related
Formula used
in shape | Tank shape | Rectangular=1, Cylinder=2, Sphere=3 in length | Length (ft) | ft | 4 | 0 in width | Width (ft) | ft | 2 | 0 in height | Height (ft) | ft | 3 | 0 in diameter | Diameter (ft) | ft | 2 | 0 in cyl_length | Cylinder length (ft) | ft | 5 | 0 out gallons | Volume (US gallons) | gal | shape==1 ? length*width*height*7.48052 : shape==2 ? (pi*(diameter/2)^2*cyl_length)*7.48052 : (4/3*pi*(diameter/2)^3)*7.48052 | 1 out liters | Volume (liters) | L | shape==1 ? length*width*height*28.3168 : shape==2 ? (pi*(diameter/2)^2*cyl_length)*28.3168 : (4/3*pi*(diameter/2)^3)*28.3168 | 1 out cubic_ft | Volume (cubic ft) | ft³ | shape==1 ? length*width*height : shape==2 ? pi*(diameter/2)^2*cyl_length : (4/3*pi*(diameter/2)^3) | 2
Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.