Gallon Calculator
Input Parameters
Computed Results
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:
- Rectangular: Volume = Length × Width × Height
- Cylindrical: Volume = π × (Diameter ÷ 2)² × Height
- Spherical: Volume = (4 ÷ 3) × π × (Diameter ÷ 2)³
Unit Conversions
Once the volume is calculated in cubic meters, the following conversions are applied to find the final outputs:
- Liters: Cubic Meters × 1,000
- US Liquid Gallons: Liters ÷ 3.785411784
- Imperial Gallons: Liters ÷ 4.54609
- Cubic Feet: Cubic Meters × 35.31466672148859
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:
- Select the Container Shape (rectangular, cylindrical, or spherical).
- Choose the Dimension Units you will use for your measurements (inches, feet, centimeters, or meters).
- Enter the Length. If you selected a cylinder or sphere, enter the diameter here.
- Enter the Width (only required for rectangular containers).
- Enter the Height / Depth (required for rectangular and cylindrical containers).
- Review the results to see the volume in US liquid gallons, Imperial gallons, liters, and cubic feet.
Inputs and Outputs
| Field | Type | Description |
|---|---|---|
| Container Shape | Input | Select the geometric shape of the volume to calculate. |
| Dimension Units | Input | Unit of measurement for the input dimensions. |
| Length (or Diameter for Cylinder/Sphere) | Input | Length of rectangular tank, or diameter if cylinder/sphere. |
| Width | Input | Width of rectangular tank (ignored for cylinder and sphere). |
| Height / Depth | Input | Height or depth of the container (ignored for sphere). |
| US Liquid Gallons | Output | The calculated volume in US liquid gallons. |
| Imperial Gallons (UK) | Output | The calculated volume in Imperial gallons. |
| Liters | Output | The calculated volume in liters. |
| Cubic Feet | Output | The 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.