Calculators.Life Calculator
Math

Gallon Calculator

Input Parameters

Scenarios
Select the geometric shape of the volume to calculate.
Unit of measurement for the input dimensions.
Length of rectangular tank, or diameter if cylinder/sphere.
Width of rectangular tank (ignored for cylinder and sphere).
Height or depth of the container (ignored for sphere).

Computed Results

US Liquid Gallons
19.95
Imperial Gallons (UK)16.61
Liters75.51
Cubic Feet2.67

The gallon calculator determines the volume of a container based on its physical dimensions and shape. By entering the length, width, and height (or diameter), you can quickly find the capacity in US liquid gallons, Imperial gallons, liters, and cubic feet.

Practical Use Cases

Calculating the volume of a container in gallons is useful for a variety of projects. You can determine the capacity of a rectangular aquarium or water trough to ensure you have the correct amount of water or treatment chemicals. It also helps in estimating the volume of cylindrical rain barrels or spherical storage tanks. By converting physical dimensions into standard volume units, you can accurately plan for liquid storage or material requirements.

Formula and Calculation Method

The calculator first determines the volume of the container in cubic meters based on its shape, then converts that volume into gallons, liters, and cubic feet.

Volume by Shape

The formulas used to calculate the initial volume depend on the selected shape:

Unit Conversions

Once the volume is calculated in cubic meters, the following conversions are applied to find the final outputs:

Verified Calculation Scenarios

Here are examples of how the calculator determines volume for different shapes and dimensions.

Small Cylindrical Container

For a cylindrical container measured in centimeters with a diameter of 10 cm and a height of 15 cm, the volume is 0.31 US liquid gallons, 0.26 Imperial gallons, 1.18 liters, and 0.04 cubic feet.

Large Rectangular Water Tank

If you have a rectangular tank measured in feet with a length of 8 ft, a width of 4 ft, and a height of 3 ft, the capacity is 718.13 US liquid gallons, 597.97 Imperial gallons, 2718.42 liters, and 96 cubic feet.

Large Spherical Storage Tank

For a spherical tank with a diameter of 5 meters, the total volume is 17,290.02 US liquid gallons, 14,396.95 Imperial gallons, 65,449.85 liters, and 2,311.34 cubic feet.

How to Use the Calculator

Follow these steps to calculate the volume of your container:

  1. Select the Container Shape (rectangular, cylindrical, or spherical).
  2. Choose the Dimension Units you will use for your measurements (inches, feet, centimeters, or meters).
  3. Enter the Length. If you selected a cylinder or sphere, enter the diameter here.
  4. Enter the Width (only required for rectangular containers).
  5. Enter the Height / Depth (required for rectangular and cylindrical containers).
  6. Review the results to see the volume in US liquid gallons, Imperial gallons, liters, and cubic feet.

Inputs and Outputs

FieldTypeDescription
Container ShapeInputSelect the geometric shape of the volume to calculate.
Dimension UnitsInputUnit of measurement for the input dimensions.
Length (or Diameter for Cylinder/Sphere)InputLength of rectangular tank, or diameter if cylinder/sphere.
WidthInputWidth of rectangular tank (ignored for cylinder and sphere).
Height / DepthInputHeight or depth of the container (ignored for sphere).
US Liquid GallonsOutputThe calculated volume in US liquid gallons.
Imperial Gallons (UK)OutputThe calculated volume in Imperial gallons.
LitersOutputThe calculated volume in liters.
Cubic FeetOutputThe calculated volume in cubic feet.

Frequently Asked Questions

What is the difference between US liquid gallons and Imperial gallons?

A US liquid gallon is defined as exactly 231 cubic inches, which is approximately 3.785 liters. An Imperial gallon, used primarily in the UK, is larger and equals approximately 4.546 liters.

How do I measure the diameter for a cylindrical or spherical container?

The diameter is the straight-line distance across the widest part of the circle or sphere, passing directly through the center.

Author portrait
About the Author
Arnab Biswas

Calculator developer and SEO strategist who builds practical online calculators and tests calculation logic, input handling, and expected results using real-world scenarios.