ThisCalculator

Conversions

Capacity in Gallons Calculator: How to Find Any Tank’s Volume

Updated · Standard formula, shown below

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.

Capacity in Gallons Calculator: How to Find Any Tank's Volume

This calculator works out the volume of a rectangular, cylindrical, or odd-shaped container in US gallons. You enter the dimensions (length, width, height for a box; diameter and height for a cylinder) and the calculator returns the capacity in gallons, plus the volume in cubic feet and liters for reference. Choose the shape that matches your tank or container, enter the measurements in inches or feet, and the result updates instantly.

Formula

For a rectangular tank: Gallons = Length × Width × Height ÷ 231, where all dimensions are in inches. The number 231 is the cubic inches in one US gallon. For a cylindrical tank: Gallons = π × (Diameter ÷ 2)² × Height ÷ 231, using the same inch units. If you measure in feet, divide by 7.48052 instead of 231 because there are 7.48052 gallons in one cubic foot.

Worked Example

Using the defaults: a rectangular tank that is 24 inches long, 12 inches wide, and 12 inches high. First, find the volume in cubic inches: 24 × 12 × 12 = 3,456 cubic inches. Then divide by 231: 3,456 ÷ 231 = 14.96 gallons. The calculator rounds to 14.96 US gallons. In liters, that is 14.96 × 3.78541 = 56.63 liters. In cubic feet, 14.96 ÷ 7.48052 = 2.00 cubic feet.

Why 231 and 7.48052? The History of the Gallon

The US gallon is defined as exactly 231 cubic inches, a number that dates back to the British wine gallon used in colonial America. That definition was adopted as the standard US gallon in the 19th century. The imperial gallon used in the UK and some Commonwealth countries is different: it holds 277.42 cubic inches, about 20% larger. When you use a capacity calculator, always check which gallon it returns. This calculator gives US gallons, which is the default for most fuel, water, and aquarium measurements in the United States. If you need imperial gallons, multiply the US gallon result by 0.83267.

How to Measure Your Tank Correctly

Get accurate dimensions before you calculate. For a rectangular tank, measure the inside dimensions—not the outside—because the wall thickness reduces the actual capacity. Use a tape measure and record to the nearest quarter inch. For a cylinder, measure the inside diameter at the widest point and the inside height from the bottom to the top (or to the fill line if you only want usable capacity).

  • Measure in inches for the direct ÷231 formula.
  • If you measure in feet, use the ÷7.48052 version.
  • For odd shapes, break the tank into sections (rectangular + half-cylinder) and add the gallons.
  • If the tank has a tapered bottom or sloped sides, treat it as a trapezoid and use an average width or height.

Common Mistakes and How to Avoid Them

The most frequent error is mixing units. If you measure length in feet but width in inches, the result will be off by a factor of 12. Always convert everything to the same unit before dividing. Another common mistake is using outside dimensions for a thick-walled tank; a 0.25-inch wall on each side reduces volume by more than you might think. For a 24×12×12 tank, subtracting 0.5 inches from each dimension (0.25 per side) gives 23.5 × 11.5 × 11.5 = 3,109 cubic inches, which is 13.46 gallons—about 1.5 gallons less than the outside calculation. Finally, don’t confuse US gallons with imperial gallons or with cubic feet. A 2-cubic-foot box is not 2 gallons; it’s about 15 gallons.

When to Use This Calculator (and When Not To)

Use this calculator for aquariums, fuel tanks, water storage, paint buckets, or any container with a regular shape. It works for both liquid and granular materials, though for granular you may want a slight overestimate because particles don’t pack perfectly. Do not use it for pressure vessels, pipes with complex internals, or tanks with built-in baffles that reduce usable volume. For those, you need more advanced methods or manufacturer specs. Also, if you are filling a tank to a certain level, you can use the height of the liquid, not the full tank height, to get the partial volume.

Alternatives: Liters, Cubic Feet, and Weight

Sometimes you need more than gallons. One US gallon equals 3.785 liters, so multiply gallons by 3.785 to get liters. One cubic foot equals 7.48052 gallons, so divide gallons by 7.48052 to get cubic feet. If you need the weight of the contents, multiply the volume in gallons by the density of the liquid in pounds per gallon. Water weighs about 8.34 pounds per US gallon at room temperature, so a 15-gallon tank holds about 125 pounds of water. For other liquids, look up the specific gravity and multiply by 8.34.

Frequently Asked Questions

How many gallons is a 20-inch by 10-inch by 12-inch tank?

Multiply 20 × 10 × 12 = 2,400 cubic inches. Divide by 231 to get about 10.39 US gallons. If you measure in feet, convert first: 1.667 ft × 0.833 ft × 1 ft = 1.389 cubic feet, then divide by 7.48052 to get the same 10.39 gallons.

Does the calculator work for round tanks?

Yes, select “Cylindrical� and enter the inside diameter and height. The formula uses π × radius² × height. For a 12-inch diameter, 12-inch tall cylinder, the volume is π × 6² × 12 = 1,357 cubic inches, which is 5.88 gallons.

What’s the difference between US and imperial gallons?

The US gallon is 231 cubic inches; the imperial gallon is 277.42 cubic inches. That makes an imperial gallon about 1.2 times larger. To convert US gallons to imperial, multiply by 0.83267. This calculator returns US gallons only.

Can I use this for a fish tank to know how much water to add?

Yes, but remember to measure the inside height to the fill line, not the top edge. Also, decorations and substrate displace water, so the actual water volume will be slightly less than the calculated full capacity. For safety, always leave a small air gap at the top.

How do I calculate the gallons in a rectangular tank if I only know liters?

If you already have liters, divide by 3.78541 to get US gallons. For example, 50 liters ÷ 3.78541 = 13.21 gallons. The calculator does this conversion automatically in the output.

Related

Formula used
sel shape | Shape | Rectangular=1, Cylindrical=2
in l | Length | in | 24 | 0
in w | Width | in | 12 | 0
in h | Height | in | 12 | 0
in d | Diameter | in | 12 | 0
out gallons | Capacity | US gal | shape == 1 ? (l * w * h / 231) : (pi * (d/2)^2 * h / 231) | 2
out liters | Volume | L | gallons * 3.78541 | 2
out cuft | Volume | cu ft | gallons / 7.48052 | 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.