Quick answer: compute the volume in cubic units first, then convert. Cubic inches ÷ 231 = US gallons. Cubic feet × 7.4805 = US gallons. For imperial gallons, divide cubic inches by 277.42 or multiply cubic feet by 6.2288. The calculator above does both automatically.
Cubic units to gallons — conversion table
| From | US gallons | Imperial gallons | Liters |
|---|---|---|---|
| 1 cubic inch | 0.004329 | 0.003605 | 0.01639 |
| 1 cubic foot | 7.4805 | 6.2288 | 28.317 |
| 1 cubic yard | 201.97 | 168.18 | 764.55 |
| 1 cubic centimeter | 0.000264 | 0.000220 | 0.001 |
| 1 cubic meter | 264.17 | 219.97 | 1,000 |
| 1 liter | 0.26417 | 0.21997 | 1 |
| 231 cubic inches | 1.0000 | 0.8327 | 3.7854 |
| 277.42 cubic inches | 1.2009 | 1.0000 | 4.5461 |
The two rows at the bottom are the definitions everything else derives from: a US gallon is exactly 231 cubic inches, and an imperial gallon is 4.54609 liters — about 20% larger. Mixing them up on a large tank is an expensive mistake, which is why the result menu here labels them explicitly.
Gallon formulas by shape
Cylinder: gal = π × (d/2)² × h (in) ÷ 231
Oval: gal = (π/4) × l × w × h (in) ÷ 231
Sphere: gal = (π/6) × d³ (in) ÷ 231
Worked example — a rectangular stock tank 6 ft long, 2 ft wide, filled 18 inches deep:
- Work in one unit: 72 in × 24 in × 18 in = 31,104 in³
- Divide by 231: 31,104 ÷ 231 = 134.6 US gallons
- Cross-check in feet: 6 × 2 × 1.5 = 18 ft³ × 7.4805 = 134.6 ✓
Both routes agree, as they must — 1,728 cubic inches per cubic foot divided by 231 cubic inches per gallon is exactly the 7.4805 factor.
Gallon capacities worth memorising
| Container | US gallons | Liters |
|---|---|---|
| Standard bathtub | 40–60 | 150–225 |
| Kitchen sink | 8–12 | 30–45 |
| Water heater (residential) | 40–80 | 150–300 |
| 55-gallon drum (brim-full) | 57.7 | 218 |
| IBC tote | 275 | 1,040 |
| Oil barrel (petroleum) | 42 | 159 |
| Car fuel tank | 12–16 | 45–60 |
| Toilet tank | 1.6–3.5 | 6–13 |
| Five-gallon bucket (brim) | 5.7 | 21.6 |
Common mistakes & pro tips
- Mixing US and imperial. A 20% difference compounds fast on tanks. Check which one a spec sheet means before ordering.
- Multiplying mixed units. Feet times inches times centimetres is meaningless. Convert first, or let the per-field selectors here handle it.
- Dividing by 128 instead of 231. 128 is fluid ounces per gallon, not cubic inches. Both numbers live near this calculation and get swapped often.
- Using container height rather than fill depth. For liquids you want the depth of the liquid.
- Pro tip — the 7.5 shortcut. Cubic feet × 7.5 is within 0.3% of the true 7.4805 and is easy to do in your head on a job site.
Frequently asked questions
How do I convert cubic feet to gallons?
Multiply cubic feet by 7.4805 for US gallons, or by 6.2288 for imperial gallons. A 10 cubic foot container holds about 74.8 US gallons. Going the other way, divide gallons by 7.4805 to get cubic feet.
How do I convert cubic inches to gallons?
Divide cubic inches by 231, because a US gallon is defined as exactly 231 cubic inches. A tank measuring 4,620 in³ therefore holds exactly 20 US gallons. For imperial gallons, divide by 277.42 instead.
What is the difference between a US and imperial gallon?
An imperial (UK) gallon is 4.546 liters, about 20% larger than the US gallon's 3.785 liters. The gap is big enough to matter: a 500 US gallon tank is only about 416 imperial gallons. Canada, the UK and several Caribbean nations use imperial; the US uses its own.
How many gallons is a cubic meter?
One cubic meter is 264.17 US gallons, or 219.97 imperial gallons. It is also exactly 1,000 liters, which is why metric water calculations are so much simpler than imperial ones.
Why is a US gallon 231 cubic inches?
It descends from the English wine gallon, standardised in 1707 as a cylinder 7 inches across and 6 inches tall — which works out to about 231 cubic inches. When the UK reformed its measures in 1824 it adopted a new imperial gallon based on ten pounds of water, but the young United States kept the older wine gallon, and the two have differed ever since.
Is a dry gallon the same as a liquid gallon?
No. The US dry gallon is 268.8 cubic inches, roughly 16% larger than the 231 cubic inch liquid gallon. It is rarely used today outside some agricultural contexts — produce is usually sold by dry quart or bushel instead. Everything on this page uses liquid gallons.