Convert inches to gallons from a tank’s length, width and height, from cubic inches, or from a cylinder’s diameter and depth, in US or Imperial gallons.

Use inside dimensions. For a partly filled tank, enter the water depth as the height.

Precision (default 2 decimals)

Calculator Functions

FunctionWhat it doesWhat it requires
Gallons from length × width × heightFinds the gallons held by a rectangular tank, box or aquarium measured in inchesRequires the inside length, the inside width and the height or liquid depth, all in inches
Gallons from cubic inchesConverts a volume in cubic inches to gallonsRequires the volume in cubic inches
Gallons in a vertical cylinderFinds the gallons in an upright round tank, drum or bucketRequires the inside diameter and the height or liquid depth in inches
Gallons from base area and depthFinds the gallons over a known base area in square inches at a given depthRequires the base area in square inches and the liquid depth in inches
Cubic inches from gallonsConverts gallons back to cubic inchesRequires the volume in gallons

Every function has a gallon definition setting, US liquid gallon or Imperial gallon, and results also show liters and cubic feet. The three shape functions add the gallons per inch of depth. An optional setting changes the displayed decimal places from the default of 2.

Inches to Gallons Formulas

gal = V ÷ 231 [1]
galVolume in US liquid gallons
VVolume in cubic inches (in³)
231Cubic inches in one US liquid gallon, an exact value [1]

An inch is a length and a gallon is a volume, so a single measurement in inches has no gallon value. Three dimensions in inches multiply out to cubic inches, and cubic inches convert to gallons. For Imperial gallons the divisor is about 277.42 [1]: the calculator converts cubic inches to liters at 0.016387064 L each and divides by 4.54609 L per Imperial gallon [2].

Gallons from length × width × height

gal = L × W × H ÷ 231

L, W and H are the inside length, width and height in inches. For a partly filled tank, H is the liquid depth. An 18 × 18 × 24 inch tank holds 7,776 in³, which is 33.66 US gallons.

Inside size (in)Cubic inchesUS gallonsImperial gallons
8 × 8 × 85122.221.85
10 × 10 × 101,0004.333.60
12 × 12 × 121,7287.486.23
20 × 10 × 122,40010.398.65
30 × 12 × 124,32018.7015.57
24 × 12 × 164,60819.9516.61
24 × 16 × 166,14426.6022.15
18 × 18 × 247,77633.6628.03
36 × 18 × 1811,66450.4942.04
48 × 20 × 2019,20083.1269.21

Gallons from cubic inches

The main formula applies directly. 1,000 in³ is 1,000 ÷ 231 = 4.33 US gallons, or 3.60 Imperial gallons. One cubic foot is 1,728 in³, which is 7.48 US gallons.

Gallons in a vertical cylinder

gal = π × (D ÷ 2)² × H ÷ 231

D is the inside diameter and H is the height or liquid depth, both in inches. A round tank 24 inches across filled to 36 inches holds 16,286 in³, or 70.50 US gallons. The formula fits a cylinder standing upright. A horizontal cylinder that is partly full has a different shape of liquid and needs its own calculation.

Gallons from base area and depth

gal = A × H ÷ 231

A is the base area in square inches and H is the depth in inches. Square inches alone cannot become gallons, because an area has no depth: each square inch of base holds 1 ÷ 231 = 0.00433 US gallons for every inch of depth. A base of 144 in² (one square foot) holds 0.62 gallons per inch and 7.48 gallons at 12 inches deep. The base area must be the same at every depth.

Cubic inches from gallons

V = gal × 231

Five US gallons is 1,155 in³. Five Imperial gallons is 5 × 4.54609 ÷ 0.016387064 = 1,387.10 in³.

Limits of This Estimate

  • Inside dimensions give the liquid volume. Outside dimensions include the wall thickness and overstate it, and a tank is rarely filled to the brim.
  • The shape functions assume straight vertical sides. Tapered buckets, rounded corners, bow-front tanks and horizontal cylinders hold a different amount.
  • The result is a volume. The weight of the liquid depends on its density and is not calculated.

Sources

  1. NIST, Handbook 44 (2026), Appendix C, General Tables of Units of Measurement: 1 US gallon = 231 cubic inches exactly, and the British Imperial gallon as 277.42 cubic inches
  2. NIST, Guide for the Use of the International System of Units (SP 811), Appendix B.8: Imperial gallon as 4.54609 L exactly, and the cubic inch in metric units