Liquid Volume Calculator
A liquid volume calculator tells you how much liquid a container can hold, or how much liquid a given mass represents. This tool handles four jobs in one place: rectangular tanks and boxes, upright cylindrical tanks, spherical vessels, and the mass-to-volume conversion (volume equals mass divided by density). Pick your units once, enter the dimensions, and read the answer in liters, US gallons, cubic centimeters and cubic inches at the same time.
Applies to the shape modes. Mass to Volume always uses kg and kg/m³.
Tip: to find the volume of a partially filled tank, enter the liquid depth instead of the full height.
Quick Answer
For the pre-filled fish tank, 48 inches long, 24 inches wide and 12 inches deep, the volume is 226.53 liters, which is 59.84 US gallons (226,534.77 cm³, or 13,824.00 in³). Filled to only 8 inches deep, the same tank holds 151.02 liters, or 39.90 gallons. The calculator above is pre-filled with this exact tank in Rectangular Tank mode.
Key takeaways
- Four modes, one unit selector: rectangular tank, upright cylinder, sphere, and mass to volume. The selector converts centimeters, inches or meters before the shape math runs.
- Partial fill needs no separate tool. Enter the liquid depth in place of the full height in the rectangular and cylinder modes.
- Mass to Volume ignores the unit selector. It always takes kilograms and kg/m³, and it is the only mode where the liquid itself, through its density, changes the answer.
- The result is a theoretical maximum. Real tanks lose space to walls, fittings and headspace, so plan on 5 to 10 percent less in practice.
- Quick Answer
- How to use the liquid volume calculator
- How the liquid volume formulas work
- Worked example: a rectangular fish tank, plus one run per mode
- Why real capacity is smaller than the calculated volume
- Mass to volume: when the liquid is weighed, not measured
- What competing calculators miss
- Frequently asked questions
- Add This Calculator to Your Website
- References
How to use the liquid volume calculator
Pick the mode that matches your container, set the unit you measured in, enter the dimensions, and click Calculate. Results stay hidden until you click Calculate.
- Choose a mode: Rectangular Tank for boxes, crates and fish tanks; Cylinder for upright round tanks and drums; Sphere for spherical vessels; Mass to Volume when you know the weight of a liquid and its density rather than the container’s size.
- Set the dimension units: centimeters, inches or meters. One selector covers all three shape modes, so a tank measured in inches and a tank measured in meters are handled the same way.
- Measure inside, not outside: the formulas treat your numbers as the space the liquid actually occupies, so interior dimensions are the honest input.
- For a partial fill, enter the liquid depth: in the rectangular and cylinder modes the height field doubles as the fill depth, so a half-depth entry returns half the volume.
- Read all four outputs: liters and US gallons for planning, cubic centimeters and cubic inches for checking against a spec sheet.
If the container is a simple dry box and you do not need liquid units at all, the box volume calculator covers the rectangular solid on its own. This page adds the liquid side: gallon and liter readouts, fill depth, and the density mode.
How the liquid volume formulas work
Every shape mode converts your inputs to cubic centimeters first, then reports liters (divide by 1,000) and US gallons (divide by 3,785.411784, the exact number of cubic centimeters in one US gallon). The liter itself is a special name for the cubic decimeter in the NIST guide to SI volume units, which is why the centimeter-first route is exact rather than approximate.
Cylinder: volume = π × radius² × height
Sphere: volume = (4 ÷ 3) × π × radius³
Mass to volume: volume = mass ÷ density
Conversions: liters = cm³ ÷ 1,000; US gallons = cm³ ÷ 3,785.411784; cubic inches = cm³ ÷ 16.387064
The shape formulas are the standard ones tabulated for tank work in the Merck Veterinary Manual’s tank volume formulae table, which uses the same rectangular and cylindrical forms for dosing and housing tanks. If you measured in inches, each cubic inch equals 16.387064 cm³; if you measured in meters, each cubic meter equals 1,000,000 cm³. The unit selector applies those conversions before the shape math, so the results are identical to measuring in centimeters directly. Conversion factors of this kind follow the NIST Guide to the SI, Appendix B conversion factors.
Worked example: a rectangular fish tank, plus one run per mode
Take a rectangular tank with interior dimensions 48 inches long, 24 inches wide, and 12 inches deep. Select Inches as the unit and enter 48, 24, and 12:
Cubic centimeters = 13,824 × 16.387064 = 226,534.77
Liters = 226,534.77 ÷ 1,000 = 226.53 L
US gallons = 226,534.77 ÷ 3,785.41 = 59.84 gal
Run the same numbers through the tool and the four result fields match exactly. If the tank is only filled to 8 inches deep, enter 8 as the height and the tool returns the partial-fill volume of 151.02 liters, about 39.90 gallons. Aquarium keepers planning stocking or water changes around a tank this size can cross-check against the aquarium capacity calculator, which sizes fish tanks specifically.
Each mode below is pre-filled in the calculator, so every row reproduces with one click after switching tabs:
| Mode and pre-filled run | Liters | US gallons | cm³ | in³ |
|---|---|---|---|---|
| Rectangular: 48 × 24 × 12 in | 226.53 | 59.84 | 226,534.77 | 13,824.00 |
| Cylinder: radius 10 in, height 50 in | 257.41 | 68.00 | 257,407.40 | 15,707.96 |
| Sphere: radius 15 in | 231.67 | 61.20 | 231,666.66 | 14,137.17 |
| Mass to volume: 1,500 kg at 1,000 kg/m³ | 1,500.00 | 396.26 | 1,500,000.00 | 91,535.62 |
Scaled to the mass run, the four pre-filled results look like this. The three containers cluster near each other; the mass run is bigger because 1,500 kg of water is a tonne and a half, not because the mode inflates anything:
Why real capacity is smaller than the calculated volume
The calculated volume is the volume of a perfect geometric solid. A real tank holds less, typically 5 to 10 percent less, and knowing why keeps an order or a dosing plan honest.
The formulas assume zero wall thickness, sharp corners and no internal fittings. Real tanks lose capacity to wall thickness when you measure from outside, to rounded or sloped corners, to baffles, pumps and heaters sitting in the liquid, and to the headspace every sensible fill leaves at the top. A fish tank is also rarely filled to the brim, and substrate displaces water. Treat the calculator’s number as the theoretical maximum, enter interior dimensions and the actual liquid depth, and derate by 5 to 10 percent for practical planning. For a sphere on its own, without the tank context, the ball volume calculator covers the same (4 ÷ 3) × π × radius³ geometry as a pure shape problem.
Mass to volume: when the liquid is weighed, not measured
Mass to Volume mode answers the reverse question: given a mass of liquid and its density, how much space does it take up? Volume equals mass divided by density, and one cubic meter equals 1,000 liters, so liters equal (mass in kg ÷ density in kg/m³) × 1,000.
Density is the whole game in this mode. Water at 1,000 kg/m³ makes the arithmetic trivial (1,500 kg is 1,500 liters), but milk at about 1,030 kg/m³ turns 500 kg into 485.44 liters, and cooking oil at about 920 kg/m³ turns 920 kg into exactly 1,000 liters. Published density tables such as the Engineering ToolBox liquids density table list typical values, and density drifts with temperature, which is why the tool asks you for the number instead of hard-coding a liquid list. If you need the density itself from a mass and a known volume, the density calculator runs that relationship in the direction this mode does not. Two honest limits: this mode always works in kilograms and kg/m³, whatever the unit selector says, and it cannot help with a liquid whose density you do not know.
What competing calculators miss
Most tools ranking for this keyword cover one shape or one conversion and stop. Each of the gaps below was checked against the live tools during the research for this page:
- Brave Calculator’s Liquid Volume Calculator: rectangular boxes only, centimeters only, with liters and US gallons out. Clean and correct, but a cylinder, a sphere or a weighed liquid sends you to a different site.
- Calculator Soup’s Tank Volume Calculator: the deepest shape library of the group, including horizontal cylinders and capsule tanks, but every shape is a separate tool, and none of them converts a weighed mass through density.
- Firgelli’s Tank Volume Calculator: strong on cylindrical tanks, with orientation, head types and a fill level in feet. It does nothing else: no rectangular tanks, no spheres, no mass mode, and feet are the only input unit.
- HeLovesMath’s Rectangular Tank Volume Calculator: a good conversion table and a partial-fill percentage for boxes, but rectangular is where it ends.
- Volume-Calculator.org: rectangular and cylindrical formulas with a separate unit converter bolted on, so the conversion is a second manual step rather than part of the result.
- The gap this page fills: four modes in one tool, including the mass-and-density mode none of the shape tools offer, one unit selector for centimeters, inches and meters, and four outputs (liters, US gallons, cm³ and in³) shown together on every run. The honest limits are stated too: the cylinder mode is upright only, and the sphere mode is always a full sphere.
Frequently asked questions
Multiply interior length by width by height, all in the same unit. With centimeters, divide the product by 1,000 to get liters. The rectangular mode of the tool above does exactly this, and also converts to US gallons.
One cubic foot equals 7.48052 US gallons. That comes from 1,728 cubic inches per cubic foot divided by 231 cubic inches per gallon, the legal definition of the US liquid gallon.
Yes. Choose Inches in the unit selector and the tool converts every input to centimeters internally (1 cubic inch = 16.387064 cubic centimeters) before applying the same formulas, so the answer is identical to measuring in centimeters.
Divide the mass by the liquid’s density: volume = mass divided by density. The Mass to Volume mode takes kilograms and kg per cubic meter and returns liters and gallons. For example, 1,500 kg of water at 1,000 kg per cubic meter is 1.5 cubic meters, which is 1,500 liters or about 396.26 US gallons.
The formulas assume a perfect geometric solid with zero wall thickness. Real tanks lose capacity to wall thickness, rounded corners, internal fittings, and the headspace left at the top. Treat the calculated number as the theoretical maximum and derate it by 5 to 10 percent for practical planning.
A liter is 1,000 cubic centimeters. A US liquid gallon is 231 cubic inches, which is 3.78541 liters. Note that the imperial gallon used in the UK is larger at 4.54609 liters; this calculator reports US gallons.
No. Mass to Volume always takes mass in kilograms and density in kilograms per cubic meter, whatever the unit selector is set to. The selector only applies to the rectangular, cylinder and sphere dimension fields.
No. The cylinder mode is for upright cylinders, where entering the liquid depth as the height gives the partial fill exactly. A cylinder lying on its side, or a sphere filled to a given depth, needs a circular segment calculation that this tool does not perform, and the sphere mode always returns the full sphere.
Add This Calculator to Your Website
Embed this calculator on your own site with the code below. Pick a size to preview it live, then copy the code.
Powered by Calculator Zilo
References
- National Institute of Standards and Technology. SI Units: Volume. Accessed October 22, 2026.
- National Institute of Standards and Technology. NIST Guide to the SI, Appendix B: Conversion Factors. Accessed October 22, 2026.
- Bureau International des Poids et Mesures. The International System of Units (SI Brochure). Accessed October 22, 2026.
- Merck Veterinary Manual. Formulae to Calculate Tank Volumes. Accessed October 22, 2026.
- National Institute of Standards and Technology. Liquid Volume Calibration Facility. Accessed October 22, 2026.
- The Engineering ToolBox. Liquids: Densities. Accessed October 22, 2026.
