This guide shows you how to calculate the volume of a container in gallons, whether it’s a rectangular tank, a cylindrical drum, or an oddly shaped bucket. You’ll need the container’s dimensions (length, width, and height, or radius and height) and a simple formula. The calculator below handles the math for you—just enter your measurements and it returns the volume in US gallons.
Formula
The core formula for a rectangular container is:
Volume (gal) = Length (ft) × Width (ft) × Height (ft) × 7.48052
Where:
- Length is the longest horizontal side, in feet.
- Width is the shorter horizontal side, in feet.
- Height is the vertical depth, in feet.
- 7.48052 is the number of US gallons in one cubic foot.
For a cylindrical container (like a drum or a round tank), the formula is:
Volume (gal) = π × (Radius)² × Height × 7.48052
Where Radius is half the diameter of the circular base, in feet, and Height is the vertical depth, in feet.
Worked Example
Let’s use the default values from the calculator: a box that is 2 ft long, 1 ft wide, and 1 ft high.
Step 1: Find the volume in cubic feet.
2 ft × 1 ft × 1 ft = 2 ft³
Step 2: Convert cubic feet to gallons.
2 ft³ × 7.48052 = 14.96104 gallons
Step 3: Round to two decimal places.
14.96 US gallons
This matches the calculator’s output exactly.
When to Use This
You need this calculation whenever you’re filling, emptying, or sizing a container: a fish tank, a rainwater barrel, a fuel tank, a pool, or a shipping container. It’s also the first step in many other calculations, like figuring out how much water weight you’re carrying or how much chemical to add to a tank.
How to Read the Result
The result is in US liquid gallons. Be aware that there are different “gallons”:
- US liquid gallon (used in this guide): 231 cubic inches, or about 3.785 liters.
- UK imperial gallon: about 4.546 liters, or 277.42 cubic inches. It’s about 20% larger than the US gallon.
If you are outside the US, check which gallon your project expects. For most everyday container sizing, the difference matters only when you’re buying fuel or chemicals in bulk.
Common Mistakes
- Mixing units. The formula requires all dimensions in feet. If you measure in inches, divide each by 12 first. If you measure in meters, multiply the final cubic meters by 264.172 to get US gallons.
- Using the diameter instead of the radius. For a cylinder, the radius is half the diameter. Using the diameter makes the volume four times too large.
- Forgetting the height. For a partially filled tank, use the water depth, not the total height of the tank.
- Confusing US and UK gallons. The factor 7.48052 is for US gallons. For UK gallons, use 6.22884 instead.
- Rounding too early. If you round the cubic feet to a whole number before multiplying, you introduce error. Carry extra digits until the final step.
Tips
- For an irregularly shaped container (like a bucket that is wider at the top), measure the average of the top and bottom diameters, then treat it as a cylinder.
- If you only have a ruler that shows inches, convert to feet by dividing by 12. For example, 18 inches = 1.5 ft.
- For large tanks, always measure the interior dimensions, not the exterior, to account for wall thickness.
- To convert the result to liters, multiply the gallons by 3.78541.
- If you’re filling a tank and want to know how long it will take, divide the gallon volume by your flow rate in gallons per minute.
Troubleshooting
My result seems way too large or too small.
Double-check your units. A common error is entering inches as if they were feet. For example, a 12″ × 12″ × 12″ box is 1 ft³ (7.48 gal), but if you enter 12 for each side in feet, you get 1,728 ft³ (12,926 gal).
My container is not a perfect rectangle or cylinder.
For a tapered container (like a flower pot), use the average radius. For a truly irregular shape, the water displacement method is more accurate: fill the container with water, then pour that water into a known container (like a 5-gallon bucket) and count how many times it fills it.
The calculator says “Cannot compute” for my inputs.
Check that all values are positive numbers. The calculator rejects zero or negative dimensions because a container cannot have a zero or negative side length.
I need imperial gallons, not US gallons.
Take the result in US gallons and multiply by 0.83267 to get imperial gallons. Or, redo the calculation with the factor 6.22884 instead of 7.48052.
Frequently Asked Questions
How many gallons are in a cubic foot?
Exactly 7.48052 US gallons. A cubic foot is about 28.317 liters.
How do I calculate gallons from inches?
First convert all inches to feet by dividing by 12. Then multiply length × width × height (in feet) × 7.48052. For example, a 24″ × 12″ × 12″ tank is 2 ft × 1 ft × 1 ft = 2 ft³ = 14.96 gallons.
What is the difference between US and imperial gallons?
A US gallon is 3.785 liters. An imperial (UK) gallon is 4.546 liters. The imperial gallon is about 20% larger. Always confirm which one you need for fuel, chemicals, or aquariums.
How many gallons is a 10-inch diameter by 12-inch tall cylinder?
Radius = 5 inches = 0.4167 ft. Height = 1 ft. Volume = π × (0.4167)² × 1 × 7.48052 ≈ 4.08 US gallons.
Can I use this for a round swimming pool?
Yes, if the pool has a uniform depth. Use the formula for a cylinder: π × (radius)² × depth × 7.48052. For a pool with a sloped bottom, use the average depth.
How much does a gallon of water weigh?
A US gallon of water weighs about 8.34 pounds at room temperature. If you’re calculating weight, multiply your gallon result by 8.34 to get pounds.
Related
Formula used
in l | Length | ft | 2 | 0 | 100 in w | Width | ft | 1 | 0 | 100 in h | Height | ft | 1 | 0 | 100 out gal | Volume | US gal | l * w * h * 7.48052 | 2 out ft3 | Volume | ft³ | l * w * h | 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.
More in this bed
- WiFi Ping Speed Test: How to Measure & Fix Lag
- WiFi Ping Spikes Every Few Seconds? Fixes That Work
- WiFi Ping Spikes Fix: Causes & Solutions
- WiFi Ping Test Online: How to Check Ping
- WiFi Ping Test CMD: How to Run It
- WiFi Ping Troubleshooting: Lower Lag & High Ping