Volume Calculator
A box that measures 12 by 8 by 10 inches holds 960 cubic inches, which is 4.16 US gallons or 15.73 liters. A cylinder 12 inches across and 48 inches tall holds 5,428.67 cubic inches, or 23.5 gallons. The US liquid gallon is defined as exactly 231 cubic inches, so every other unit follows from that one.
| Volume | |
| What was measured | |
| Cubic inches | |
| Cubic feet | |
| Cubic yards | |
| Liters | |
| US liquid gallons |
The gallon here is the US liquid gallon, defined as 231 cubic inches. The imperial gallon used in the UK is about 20 percent larger. Everything runs in your browser, nothing is uploaded.
Pick a shape, enter its dimensions in inches, feet, centimeters or meters, and read the volume in cubic inches, cubic feet, cubic yards, liters and US gallons.
Key takeaways
- Box volume is length x width x height: 12 x 8 x 10 = 960 cubic inches
- The US gallon is 231 cubic inches, so 960 cubic inches is 4.16 gallons
- A cylinder is 3.14159 times radius squared times height, and 12 by 48 inches gives 23.5 gallons
- A sphere uses 4 / 3 times 3.14159 times radius cubed: a 26 inch ball is 39.84 gallons
On this page
Volume of a box: length times width times height
A box, a tank, a shipping carton and a room all share one formula: length times width times height. Measure all three sides in the same unit and the result lands in that unit cubed. Twelve inches by eight inches by ten inches gives 12 x 8 x 10 = 960 cubic inches.
The measurement that matters is the inside one. A cooler listed as 24 inches long has walls, so the space inside is narrower. For a room, measure wall to wall and floor to ceiling; for a tank, measure to the water line rather than the rim. Guessing outside dimensions is the quickest way to buy too little soil, paint or water.
Worked example: a 12 by 8 by 10 inch box
Take the 12 by 8 by 10 inch box. Its volume is 960 cubic inches, and each unit converts from there. In gallons, 960 / 231 = 4.16 US gallons. In liters, 960 x 16.387064 / 1000 = 15.73 liters, since one cubic inch is 16.387064 cubic centimeters and a liter is 1,000 of those. In cubic feet, 960 / 1,728 = 0.556 cubic feet.
| Unit | Value for the 12 x 8 x 10 box |
|---|---|
| Cubic inches | 960 |
| Cubic feet | 0.556 |
| Cubic yards | 0.0206 |
| Liters | 15.73 |
| US gallons | 4.16 |
Which number you report depends on the job. Paint and aquarium treatments use gallons or liters. Shipping and storage use cubic feet. Concrete and mulch use cubic yards, which is why the calculator lists them all at once instead of asking which one you want.
Aquarium keepers want one extra step. The tank volume inside the glass is not the water you dose for, because substrate, rock and the gap under the rim all take up space. The aquarium volume calculator starts from the same 231 formula and then subtracts those displacements, which is the difference between the shape and the water.
Cylinders, cones and spheres
A cylinder swaps the three sides for a circle and a height: 3.14159 times the radius squared times the height. A 12 inch concrete form tube that stands 48 inches tall has a 6 inch radius, so 3.14159 x 6 x 6 x 48 = 5,428.67 cubic inches, which is 5,428.67 / 231 = 23.5 gallons. That lands within a rounding step of one cubic foot of concrete, and the tube label says as much.
| Shape | Formula | Example measurements | Result |
|---|---|---|---|
| Box | length x width x height | 12 x 8 x 10 inches | 960 cubic inches, 4.16 gallons |
| Cylinder | 3.14159 x radius x radius x height | 12 inches across, 48 inches tall | 5,428.67 cubic inches, 23.5 gallons |
| Cone | one third of the matching cylinder | 16 inches across, 14 inches tall | 938.29 cubic inches, 4.06 gallons |
| Sphere | 4 / 3 x 3.14159 x radius cubed | 26 inches across | 9,202.77 cubic inches, 39.84 gallons |
A cone is one third of the cylinder that would wrap it: the same 3.14159 times radius squared times height, divided by 3. A tapered planter 16 inches across and 14 inches tall holds 3.14159 x 8 x 8 x 14 / 3 = 938.29 cubic inches, or 938.29 / 231 = 4.06 gallons of soil.
A sphere is 4 / 3 times 3.14159 times the radius cubed. A 26 inch exercise ball measures 13 inches to the center, so 4 / 3 x 3.14159 x 13 x 13 x 13 = 9,202.77 cubic inches. In gallons that is 9,202.77 / 231 = 39.84 gallons of air, which is a fair way to picture how much space the ball takes up in a room.
Every one of those formulas takes a radius, and every label, tape measure and product listing gives a diameter. Halve the diameter first. A 26 inch ball with a 26 inch radius would come out eight times too large, since 2 cubed is 8.
Cubic inches, gallons and liters: how the units connect
The gallon is not a floating number. NIST Handbook 44, Appendix C defines the US liquid gallon as exactly 231 cubic inches, and one inch as 2.54 centimeters, so 2.54 x 2.54 x 2.54 = 16.387064 cubic centimeters per cubic inch. Multiply 231 by that and the gallon is 3,785.411784 cubic centimeters, or 3.785411784 liters. The liter itself is one cubic decimeter, 1,000 cubic centimeters, per the BIPM SI brochure.
| Volume unit | Equals |
|---|---|
| 1 US gallon | 231 cubic inches, 3.785 liters, 128 fluid ounces |
| 1 cubic foot | 1,728 cubic inches, 7.48 US gallons, 28.32 liters |
| 1 cubic yard | 27 cubic feet, 202 US gallons |
| 1 liter | 1,000 cubic centimeters |
The imperial gallon used in the United Kingdom is a different animal: 4.54609 liters, about 20 percent larger than the US gallon. A recipe or a fuel figure quoted in imperial gallons will not match one quoted in US gallons, and the gap grows with the batch. This calculator always uses the US liquid gallon, the one on a milk jug in Ohio.
Filled volume versus shape volume
The geometric volume of a container is its full shape. The useful volume is smaller whenever something sits inside it or the fill line stops short of the top.
The 12 by 8 by 10 inch box filled one inch below the rim, for instance, holds 12 x 8 x 9 = 864 cubic inches, which is 864 / 231 = 3.74 gallons rather than 4.16. An aquarium with two inches of gravel loses the same kind of space, and a pool loses more to the taper of its walls, which is why pool volume is figured on an average depth rather than the deep end.
For a pool, the round pool volume calculator takes the diameter and the average depth, then runs the same cylinder formula. For a fish tank, the aquarium volume calculator subtracts the substrate and the air gap. This page gives the raw shape, which is the starting point for all of those.
One inch of rain over an acre
The largest volume most people ever compute is rainfall. One inch of rain falling on one acre of ground is about 27,154 gallons, according to the USGS Water Science School. The arithmetic explains the number: an acre is 43,560 square feet, one inch is a twelfth of a foot, and 43,560 / 12 = 3,630 cubic feet. At 7.480519 gallons per cubic foot, 3,630 x 7.480519 = 27,154 gallons.
The same page gives a roof example that is easier to picture: a 40 by 70 foot roof collects about 1,743 gallons from one inch of rain. That is the number behind rain barrel sizing, and it is why a 55 gallon barrel fills in a hurry during a real storm.
Measuring tips that keep the number honest
Volume errors are nearly always measurement errors rather than arithmetic errors. Five habits keep the number honest.
- Measure the inside, not the outside. Wall thickness of half an inch on every side quietly removes about 15 percent from a small box.
- Take the diameter at the widest point. Buckets and planters are rarely round, and the widest reading is the one the manufacturer means.
- Keep one unit for every side. A tank 30 centimeters wide and 2 feet long cannot be multiplied until both are converted.
- Use an average depth for anything tapered. A pool that runs from 3 feet to 8 feet has an average near 5.5 feet, not 8.
- Round once, at the end. Carry the decimals through the multiplication and round the gallons on the last step.
The check worth doing every time: cube a 12 inch box by hand. 12 x 12 x 12 = 1,728 cubic inches, and 1,728 / 231 = 7.48 gallons, which is exactly the gallons per cubic foot figure the calculator reports. If your inputs give a wildly different answer, one side is probably in the wrong unit.
Frequently asked questions
How do I calculate the volume of a box?
Multiply length by width by height in one consistent unit. A 12 by 8 by 10 inch box is 12 x 8 x 10 = 960 cubic inches, and dividing by 231 turns that into 4.16 US gallons.
How many gallons is a 12 x 8 x 10 inch box?
4.16 US gallons. The box holds 960 cubic inches, and the US gallon is 231 cubic inches, so 960 / 231 = 4.16. In liters the same box is 15.73.
How many gallons are in a cubic foot?
7.48. A cubic foot is 1,728 cubic inches and 1,728 / 231 = 7.48, so every cubic foot holds about seven and a half US gallons.
How do I calculate the volume of a cylinder?
3.14159 x radius x radius x height, with the radius at half the diameter. A tube 12 inches across and 48 inches tall holds 5,428.67 cubic inches, which is 23.5 gallons.
How do I convert cubic inches to gallons?
Divide the cubic inches by 231. That divisor is the definition of the US liquid gallon, so 5,428.67 cubic inches becomes 5,428.67 / 231 = 23.5 gallons.
Is this the US gallon or the imperial gallon?
The US liquid gallon, defined as exactly 231 cubic inches, which is 3.785411784 liters. The imperial gallon is 4.54609 liters, about 20 percent larger, and this calculator does not use it.
How many liters are in a US gallon?
3.785411784 liters, since 231 cubic inches at 16.387064 cubic centimeters each is 3,785.411784 cubic centimeters, and a liter is 1,000 of those.
What is the volume of a 26 inch ball?
9,202.77 cubic inches, which is 39.84 US gallons. The radius is 13 inches, and 4 / 3 x 3.14159 x 13 x 13 x 13 gives the cubic inches.
How many gallons is a 2 x 2 x 3 foot box?
89.77 US gallons. The box is 2 x 2 x 3 = 12 cubic feet, and 12 x 7.480519 = 89.77 gallons.
Why do I need to halve the diameter?
Because the formulas take a radius and labels give a diameter. Halving the diameter first is the step that gets missed, and a radius that is twice too big makes a sphere eight times too large.
How many cubic inches are in a gallon?
231, exactly. That is the legal definition of the US liquid gallon, not a measurement, so the conversion has no rounding error at all.
How many gallons are in a cubic yard?
202 US gallons. A cubic yard is 27 cubic feet and 27 x 7.480519 = 202 gallons, which is why a yard of mulch or gravel is such a large pile.
Does the shape change how many gallons it holds?
No. A gallon is a fixed amount of space, 231 cubic inches, so a long thin tank and a cube with the same cubic inches hold the same gallons. The shape changes how the container fits in a room, not how much it holds.
How accurate is the result?
The unit conversions are exact and the only rounded constant is pi, carried to five decimals. The weak link is your tape measure, so the result is usually as good as the inside dimensions you enter.
Spotted a wrong number or a broken result?
More Converters tools
- 12 Hour to 24 Hour Converter Calculator
- Acres to Hectares Converter
- Acres to Linear Feet Calculator
- Acres to Square Feet Converter
- Activation Energy Calculator
- Air Density Calculator
- Amps to Watts Calculator
- Angle Converter
- Angle of Depression Calculator
- Angle of Elevation Calculator
- Area Calculator
- Area Converter
- BPM to FPS Calculator
- BPM to Hz Calculator
- BPS to Hz Calculator
- BTU per Hour to Tons Converter
Fee schedules, rates and rules change without notice. Always confirm important figures with the official source before you rely on them.