Volume of a cylinder in gallons: one formula, two units
Almost every round tank problem arrives with a tape-measure reading of the diameter, but the textbook formula wants the radius — and that one substitution is where most wrong answers are born. I do it the way I do it on site: start from the diameter, halve it once, run one formula, convert once.
Almost every round tank problem I am handed is the same problem in a work shirt: find the volume of a cylinder in gallons. And almost every one arrives with a tape measure reading of the diameter — the width straight across — because that is the measurement a human can actually take on a barrel, a well casing or a fuel tank. The volume of a cylinder with diameter given is not the textbook formula, though; the textbook wants the radius, and that one substitution is where most wrong answers are born. In this guide I will do it the way I do it on site: start from the diameter, halve it once, run one formula, convert once — with the two shortcut constants that let me check any calculator’s answer in my head, and worked examples from a 55-gallon drum to a truck’s fuel tank, every one recomputed for this article.
- Start from the diameter and halve it once: V = π × (d ÷ 2)² × h — then divide by 231 if you measured in inches, or multiply by 7.48052 in feet.
- My two shortcut constants let me check any calculator in my head: gallons = 0.0034 × d² × h in inches, or 5.8752 × d² × h in feet.
- The standard drum sold as 55 gallons actually holds 57.66 gallons by its inside dimensions — and using the diameter as the radius makes an answer exactly four times too big.
- The formula when all you have is the diameter
- The two shortcut constants I check calculators with
- Worked example: the 55-gallon drum that holds 57.7 gallons
- Worked example: fuel tank capacity on a truck saddle tank
- Upright or lying down: what orientation changes (and what it does not)
- The same formula at other jobs: wells, hot tubs and columns
- If you cannot reach across: getting the diameter from the circumference
- Partly full and standing up: the one case where depth is honest
- One last check: whose gallons?
- The four-times mistake
- Frequently asked questions
The formula when all you have is the diameter
The cylinder’s volume is its circular base times its length: V = π × r² × h. Since the radius is half the diameter, r = d ÷ 2, the diameter version I actually use is:
V = π × (d ÷ 2)² × h
Then one conversion turns cubic units into gallons. Measured in inches, divide by 231 (a gallon is exactly 231 cubic inches). Measured in feet, multiply by 7.48052. The steps, in the order I run them:
- Measure the inside diameter and the inside length (or height), in one unit.
- Halve the diameter once, and write the radius down — do not carry it in your head.
- Square the radius, multiply by π, multiply by the length.
- Convert: ÷ 231 from cubic inches, or × 7.48052 from cubic feet.
The two shortcut constants I check calculators with
Fold the π, the halving and the conversion into a single number and gallons fall out of the diameter directly:
| Your measurements are in… | Formula | Constant (exact) |
|---|---|---|
| Inches | gallons = 0.0034 × d² × h | 0.00339999 |
| Feet | gallons = 5.8752 × d² × h | 5.87518626 |
Derived from pi divided by (4 times 231) for inches, and pi/4 times 7.48052 for feet.
I am fond of these because d² × h is arithmetic I can do on a tailgate. A drum 22.5 inches across and 33.5 tall: 22.5² is 506.25, times 33.5 is 16,959, times 0.0034 is about 57.7 gallons — and as the worked example below shows, the exact computation agrees. If a tool ever disagrees with the tailgate estimate by more than a rounding whisker, I know to re-measure before I re-believe.
Worked example: the 55-gallon drum that holds 57.7 gallons
The standard steel drum is sold as 55 gallons, and its actual inside dimensions are about 22.5 inches in diameter and 33.5 inches tall. Run the formula with me: the radius is 11.25 inches; squared, that is 126.5625; times π gives a base of 397.61 square inches; times the 33.5-inch height gives 13,319.86 cubic inches; and divided by 231, that is 57.66 gallons. The nameplate says 55 because drums are filled with headspace for expansion, and because “55-gallon drum” is a size class, not a measurement. Neither number is a lie — but if you are mixing 57 gallons of anything based on the label, the drum will teach you the difference personally.
Worked example: fuel tank capacity on a truck saddle tank
Fuel tank capacity is this same cylinder wearing a parts catalogue. A typical aluminium saddle tank measures 24 inches in diameter and 60 inches long. Radius 12, squared 144, times π is 452.39, times 60 is 27,143 cubic inches — divided by 231, 117.50 gallons brim-full. A slightly different common size, 26 inches across and 48 long, computes to 110.32 gallons. Two honest footnotes belong here. First, usable capacity is less than brim-full: tanks are vented and fuel expands, so I plan journeys on roughly 90–95% of the geometric figure. Second, gallons of fuel are also pounds on the frame: diesel runs about 7.1 pounds per gallon and gasoline about 6.3, so that 117.5-gallon tank carries roughly 834 pounds of diesel when brimmed — a number the suspension cares about even when the driver does not.
Upright or lying down: what orientation changes (and what it does not)
Full is full: a cylinder holds identical gallons standing or lying, because the formula never asks which way is up. Orientation matters only when the tank is partly filled. Standing upright, every inch of depth adds the same gallons — the base area times one inch — so a sight gauge reads honestly. Lying on its side, the width of the liquid surface changes with depth: the first inches spread across a narrow chord and add little, the middle inches add the most, and a gauge or dipstick reading depth will mislead anyone who assumes it scales evenly (at three-quarters depth, a horizontal cylinder is already about 80.5% full). My rule: compute capacity with the cylinder formula, but judge a horizontal tank’s contents from a dipstick chart, never from depth alone.
The same formula at other jobs: wells, hot tubs and columns
Once the diameter habit forms, you start seeing this cylinder everywhere. A well casing 6 inches across holds π × 3² = 28.27 square inches of water per inch of depth, which works out to 1.47 gallons per foot of standing water — so a well with 100 feet of water in the casing is storing 146.88 gallons before the pump ever runs. A round hot tub 6 feet across filled 3 feet deep is the feet version: 5.8752 × 36 × 3 = 634.52 gallons. Even a laboratory chromatography column is the same shape at centimetre scale: 10 cm across and 25 cm tall is π × 25 × 25 = 1,963.50 cm³, or about 1.96 litres of column volume — the number resin is packed and priced by. One formula, three trades.
If you cannot reach across: getting the diameter from the circumference
On a big tank there is often no way to stretch a tape across the top — but there is always a way to walk one around it. The circumference is π times the diameter, so divide whatever you measure around by π (3.14159) and you have the diameter the formula wants. A tank that measures 75.40 inches around is 75.40 ÷ π = 24.0 inches across — the saddle tank from the example above, found without ever climbing on it. One warning from experience: wrap the tape level and snug, and go around the straight barrel of the tank, not over a weld seam or a fitting band, because a quarter-inch of tape error around becomes a real error squared later. Diameter is the input this whole calculation stands on, so it earns the extra minute.
Partly full and standing up: the one case where depth is honest
An upright cylinder is the friendliest vessel in this article, because its contents scale dead evenly with depth — the base never changes shape. So for the drum: it holds 57.66 gallons at its full 33.5 inches, which means each inch of depth is worth 57.66 ÷ 33.5 = about 1.72 gallons, and a drum filled to a 20-inch depth holds 57.66 × (20 ÷ 33.5) = 34.42 gallons. No charts, no segment formula — a ruler and one division. I mention this because people routinely overthink upright tanks after struggling with a horizontal one; the upright case really is this simple, and it is why vertical tanks get honest sight gauges and horizontal ones get printed charts.
One last check: whose gallons?
Every gallon in this article is a US liquid gallon of 231 cubic inches. If your tank’s plate or manual comes from a British or older Canadian maker, its gallons may be imperial — 4.54609 litres each, about 20% larger — and the same drum that holds 57.66 US gallons holds only 48.01 imperial gallons. The cylinder does not care which gallon you finish in, but your conversion must pick one and stay with it; a capacity that seems to have grown by a fifth between two documents is almost always this quiet unit swap, not a bigger tank.
The four-times mistake
I end with the error I have made myself, so you can skip it. If you feed the diameter into the formula where the radius belongs, the answer comes out exactly four times too big — because the radius is squared, and doubling the input quadruples the square. The 57.66-gallon drum becomes a fantastical 230.65 gallons. The tell is that factor of four: whenever a cylinder’s gallons look about four times what the vessel “should” hold, you have not found a bigger tank — you have found the missing halving. Square the radius, not the diameter, and let the shortcut constants above audit you: 0.0034 × d² × h uses the diameter honestly, which is precisely why I trust it.
Run your cylinder
Pick the cylinder shape, enter diameter and height in your units, and get the volume in gallons and litres — the formula above, without the tailgate arithmetic.
Open the Volume CalculatorFrequently asked questions
How do I calculate the volume of a cylinder in gallons?
Measure the inside diameter and height in one unit. Halve the diameter to get the radius, square it, multiply by pi, then multiply by the height. That is the volume in cubic units. From cubic inches, divide by 231 to get US gallons; from cubic feet, multiply by 7.48052. Or skip a step with the shortcuts: gallons equals 0.0034 times diameter squared times height in inches, or 5.8752 times diameter squared times height in feet.
What is the formula for the volume of a cylinder with diameter given?
V equals pi times (d divided by 2) squared times h — the standard pi r squared h with the radius written as half the diameter. For a cylinder 24 inches in diameter and 60 inches long: pi times 12 squared times 60 is 27,143 cubic inches, which divided by 231 is 117.50 gallons.
How do I find the fuel tank capacity of a cylindrical tank?
Treat it as a cylinder: measure the inside diameter and length, run pi times radius squared times length, and convert to gallons. A 24-by-60-inch saddle tank computes to 117.50 gallons brim-full. Plan on using about 90 to 95 percent of that as working capacity, since tanks are vented and fuel expands — and remember the weight: that tank of diesel weighs roughly 834 pounds.
Does a horizontal cylinder hold the same as a vertical cylinder?
Yes, when full — the volume depends only on the radius and the length, not on orientation. The difference appears in partial fills: a vertical cylinder gains the same gallons for every inch of depth, while a horizontal one gains the least near the bottom and top and the most in the middle, which is why horizontal tanks need dipstick charts rather than depth readings.
Why is my cylinder answer exactly four times too big?
Because the diameter went into the formula where the radius belongs. The radius is squared in pi r squared h, so doubling the input quadruples the result. A 55-gallon-class drum that computes to about 231 gallons instead of 57.7 has not grown — the halving step was skipped. Halve the diameter first, or use the diameter-based shortcut, 0.0034 times d squared times h in inches.
Sources: conversion anchors from NIST SP 811 (US gallon = 231 in³ exactly; 1 ft³ = 7.48052 gallons). Fuel densities are the commonly published US figures at 60 °F (diesel about 7.1 lb per gallon, gasoline about 6.3). Every capacity figure was recomputed from the formulas shown.
- 1How many gallons does your tank hold? Tank volume charts and formulas
A tank calculator is never doing anything mysterious: it measures the space inside your tank, then converts…
- 2Volume vs area vs surface area: what’s the difference?
Here is the truth plenty of pages skip: a circle has no volume, and neither does a square — they are flat.…
- 3Liquid volume conversions: gallons, litres, and cubic feet
Liquid is the one thing I measure in four different units before breakfast, and the conversions between them…
- 4Scientific
Advanced functions.
- 5Pythagorean
Right-triangle sides.
- 6Concrete
Slabs and footings.
