Calculate Gallons in a Tank by Shape and Dimensions
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.
Calculate gallons in a tank by entering its dimensions in inches and choosing a rectangular, horizontal cylindrical, or vertical cylindrical shape. The calculator returns the tank’s approximate full capacity in US gallons, plus its volume in liters.
Formula
Tank capacity depends on the tank’s inside shape and dimensions. For measurements in inches, divide the volume in cubic inches by 231 to convert to US gallons. One US gallon equals exactly 231 cubic inches, or 3.785411784 liters.
- Rectangular tank: gallons = length × width × height ÷ 231.
- Horizontal cylinder: gallons = π × (diameter ÷ 2)2 × length ÷ 231.
- Vertical cylinder: gallons = π × (diameter ÷ 2)2 × height ÷ 231.
Here, length, width, height, and diameter are interior measurements in inches; π is approximately 3.14159. For a rectangular tank, use its inside length, width, and height. For a horizontal cylinder, length is the distance from end to end and diameter is the inside diameter of the circular end. For a vertical cylinder, height is the tank’s inside height and diameter is the inside diameter. The calculator’s shape selection applies the relevant formula; dimensions not used for that shape do not affect its answer.
Worked Example
Using the default values, select Rectangular and enter a length of 48 inches, a width of 24 inches, and a height of 24 inches. The diameter field remains at its default of 24 inches, but it is not used for this shape.
- Find the rectangular volume: 48 × 24 × 24 = 27,648 cubic inches.
- Convert cubic inches to US gallons: 27,648 ÷ 231 = 119.6883… US gallons.
- Round to two decimal places: 119.69 US gallons.
- Convert to liters: 119.6883… × 3.785411784 = 452.997… liters, or 453.00 liters.
How to Measure and Use the Calculator
Measure the inside dimensions, not the outside dimensions. Wall thickness takes up space, so outside measurements can overstate usable capacity. If the tank is fitted with a liner, measure the space inside the liner. For a tank with a domed, sloped, or otherwise irregular interior, a simple box or cylinder formula may only approximate its capacity.
- Choose the closest listed shape: rectangular, horizontal cylinder, or vertical cylinder.
- Enter the relevant inside measurements in inches. Convert centimeters to inches by dividing by 2.54, or convert feet to inches by multiplying by 12.
- Read the US-gallon result as the tank’s calculated full geometric capacity. The liter result is the same volume in metric units.
For dimensions measured in feet, you can instead calculate volume in cubic feet and multiply by about 7.48052 to get US gallons. For dimensions in meters, calculate cubic meters and multiply by 1,000 for liters. Keep all dimensions in the same unit before multiplying; mixing inches and feet produces a misleading result.
Full Capacity Versus the Amount in the Tank
The result is the volume the idealized tank could hold when filled to its measured top, not necessarily how much liquid is in it now. To estimate the current amount in a rectangular tank, use the liquid depth rather than the tank’s full height. For a vertical cylinder, use the liquid depth as the cylinder height.
A partially filled horizontal cylinder needs a different calculation. Its liquid depth does not represent the same fraction of its total volume: the curved bottom means volume rises slowly at first and faster nearer the top. The calculator reports full capacity for a horizontal cylinder, so it cannot determine a partial fill from depth alone.
Accuracy, Rounding, and Common Mistakes
- Using outside dimensions: this includes the walls and can overestimate interior volume.
- Confusing US and imperial gallons: this calculator uses US gallons. One US gallon is about 3.785 liters; one imperial gallon is about 4.546 liters. They are not interchangeable.
- Mixing units: convert every dimension to the same unit before applying a volume formula.
- Assuming a nominal size is exact: listed or rounded tank dimensions may differ from its actual interior dimensions.
- Rounding too early: retain the calculator’s unrounded intermediate value and round the final answer. Its two decimal places are a useful estimate, not a claim of measurement accuracy.
Real tanks can have rounded corners, tapered walls, domed ends, internal fittings, or a fill line below the top. Those features change the usable volume. A cylindrical tank with flat ends follows the cylinder formula; one with rounded ends does not match it exactly. Treat a result based on a simple shape as an estimate when the construction differs from that shape.
Frequently Asked Questions
How many gallons are in a cubic foot?
One cubic foot contains about 7.48052 US gallons. This is a volume conversion; it does not depend on the shape of the tank.
How do I calculate gallons in a rectangular tank?
Multiply the inside length, width, and height in inches, then divide by 231. For example, 48 × 24 × 24 ÷ 231 gives about 119.69 US gallons.
Does this calculator give US or imperial gallons?
It gives US gallons. If you need imperial gallons, divide the US-gallon result by about 1.20095, or convert liters to imperial gallons using about 4.54609 liters per imperial gallon.
Can I calculate gallons from a tank’s outside dimensions?
You can get a rough estimate, but it will usually be too high because the walls occupy space. Measure the interior dimensions for a better capacity estimate.
How do I find gallons in a partly filled horizontal tank?
Use the tank’s inside diameter, length, and liquid depth in a partial-cylinder calculation. The full-capacity formula alone is not enough because the relationship between depth and volume is nonlinear.
Why is my measured fill amount lower than the calculated capacity?
The tank may not have been filled to its top, its usable fill line may be lower, or its interior may include features the basic formula does not account for. Differences in measurement and rounding can also contribute.
Related
Formula used
sel shape | Tank shape | Rectangular=1, Horizontal cylinder=2, Vertical cylinder=3 in length | Length or tank height | in | 48 | 0 in width | Inside width | in | 24 | 0 in height | Inside height | in | 24 | 0 in diameter | Inside diameter | in | 24 | 0 out gallons | Capacity | US gal | (shape=1)*(length*width*height/231)+(shape=2)*(pi*(diameter/2)^2*length/231)+(shape=3)*(pi*(diameter/2)^2*height/231) | 2 out liters | Capacity | L | gallons*3.785411784 | 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.