Knowing how much a tank holds matters when you order fuel, size a water supply, plan a chemical dose or pick a pump. The math is short. A tank is either a cylinder or a box, and you only need a few inside measurements and one conversion to get gallons.
Updated November 2026
Step 1: Measure the inside of the tank
Use inside dimensions. Outside measurements include the wall, which can be a quarter inch of steel or more of plastic, and that error grows quickly on a small tank. If you can only measure the outside, subtract twice the wall thickness from each dimension. Measure in inches, because the gallon is defined in cubic inches.
Step 2: Pick the formula for the shape
A horizontal and a vertical cylinder use the same volume formula. Only the name of the third dimension changes: length for a horizontal tank, height for a vertical one.
Cylinder volume = 3.14159 x radius x radius x length (or height)
Rectangular volume = width x length x height
The radius is half the diameter. Both formulas give cubic inches.
Step 3: Convert to gallons and liters
A U.S. gallon is 231 cubic inches, so divide cubic inches by 231. One gallon is 3.785412 liters, and one cubic foot is 1,728 cubic inches. The NIST guide to SI conversion factors lists these definitions. Watch for imperial gallons on tanks made outside the United States, since they are larger than U.S. gallons.
Worked examples
These sizes are illustrations. Replace them with your own measurements.
Horizontal cylinder, 48 inch diameter, 96 inch length. The radius is 24 inches. Volume = 3.14159 x 24 x 24 x 96 = 173,718 cubic inches. Divide by 231 and the tank holds 752.02 gallons, or 2,846.7 liters.
Vertical cylinder, 48 inch diameter, 60 inch height. Volume = 3.14159 x 24 x 24 x 60 = 108,573 cubic inches, which is 470.01 gallons. Each inch of height holds 7.83 gallons, so a dipstick reading converts directly: multiply the liquid depth in inches by 7.83.
Rectangular tank, 48 by 30 by 24 inches. Volume = 48 x 30 x 24 = 34,560 cubic inches, which is 149.61 gallons.
Partly filled tanks
A vertical cylinder or a box fills in a straight line: if the liquid is 15 inches deep in a 60 inch tank, it holds one quarter of the full capacity. A horizontal cylinder does not behave that way. The liquid surface is narrow near the bottom and near the top, so the first and last few inches hold much less than the middle. For partial fills in a horizontal tank, use a manufacturer’s chart or a circular segment calculation.
Do it in Excel
Put the diameter in A2 and the length in B2, both in inches. Then use these formulas.
Gallons for a cylinder: =PI()*(A2/2)^2*B2/231
Gallons for a box with width in A2, length in B2 and height in C2: =A2*B2*C2/231
Liters from gallons in D2: =D2*3.785412
What the formula leaves out
The result is the full geometric capacity. Domed or dished ends add a little volume, cone bottoms change it, and internal baffles, heating coils and fittings take some away. Fuel and chemical tanks often carry a maximum fill level below brim capacity, so check the label or local rules before using the number for a delivery. The maker’s rating plate is the best source for a purchased tank.
Skip the arithmetic
Our tank volume calculator handles horizontal cylinders, vertical cylinders and rectangular tanks, and shows gallons, liters and cubic feet at once. For round pools see the pool volume calculator, and for soil, gravel or concrete use the cubic yard calculator. Water weighs about 1 gram per milliliter, according to the USGS Water Science School, which is useful when you need the weight of a full tank for a stand or pad.
Common measuring mistakes
Three errors cause most wrong answers. The first is entering the diameter where the radius belongs. The formula squares the radius, so using the full diameter makes the result four times too large. The second is mixing units, such as a diameter in inches and a length in feet. Convert everything to inches first, or convert the final cubic inches carefully. The third is measuring a tank that is not a true cylinder. Many residential tanks have flat ends, but others have domed ends that add capacity the simple formula ignores.
For tanks with oval cross sections, measure the width and height separately and use the ellipse area, 3.14159 times half the width times half the height, in place of the circle. Multiply that area by the length as usual. If the tank is buried or hard to reach, the rating on the manufacturer’s plate, or the delivery records from the last fill, are better sources than a measurement from the outside.

Frequently asked questions
How many gallons are in a horizontal cylinder tank?
Multiply 3.14159 by the radius squared and by the length in inches, then divide by 231. A 48 inch diameter by 96 inch tank holds 752.02 gallons.
Do I measure inside or outside?
Inside. Outside dimensions include the wall thickness and overstate the capacity.
How do I find the gallons in a partly filled tank?
For a vertical tank or a box, multiply the full capacity by the fill depth divided by the total height. A horizontal cylinder needs a chart or a segment formula.
How many liters are in a gallon?
One U.S. gallon is 3.785412 liters. An imperial gallon is larger, so confirm which gallon your tank label uses.


