Volume Calculator: Calculate the Volume of 3D Shapes
Volume measures how much three-dimensional space an object occupies. For a solid geometric shape, volume is expressed in cubic units such as cubic meters (m³), cubic centimeters (cm³), cubic feet (ft³), cubic inches (in³), or cubic yards (yd³). For liquid and storage applications, the same physical volume may also be expressed in liters, milliliters, US gallons or Imperial gallons.
This volume calculator brings several common geometry and capacity problems together in one tool. Depending on the shape you select, you can calculate the volume of cylinders, spheres, cones, cubes, rectangular prisms, spherical caps, ellipsoids, conical frustums, square pyramids, hollow tubes and capsules. The calculator also includes a rectangular tank mode that separates filled liquid volume from total tank capacity, which is important when a container is only partially filled.
The underlying geometry is straightforward: volume formulas generally combine a shape's base area with a relevant height or use a shape-specific three-dimensional formula. Standard references give V = lwh for a rectangular solid, V = πr²h for a cylinder, V = (4/3)πr³ for a sphere and V = (1/3)πr²h for a cone.
How to Use This Volume Calculator
Start by selecting the 3D shape that matches the object you are measuring. Enter the dimensions shown for that shape and select the desired unit system. The calculator then evaluates the corresponding geometric formula and displays the result at the selected decimal precision.
For example, a cylinder requires its radius and height. A rectangular prism requires length, width and height. A sphere requires its radius. A cone requires its base radius and perpendicular height. A tank additionally requires the liquid fill depth when you want the amount of liquid currently inside rather than the full container capacity.
The calculator keeps the mathematical result separate from its displayed formatting, so choosing two, four or six decimal places changes the presentation rather than changing the underlying calculation. This is particularly useful when working with engineering dimensions where small rounding differences can become significant.
Volume Formulas for Common 3D Shapes
Cylinder
For a right circular cylinder with radius r and height h:
The circular base has area πr², and multiplying that area by the cylinder height gives the volume. The total surface area is:
This model is useful for pipes, cans, tanks and cylindrical containers.
V = π × (5)² × (10) = 250π ≈ 785.3982 m³
SA = 2 × π × 5 × (5 + 10) = 150π ≈ 471.2389 m²
Rectangular Prism and Box Volume
For a rectangular solid:
where l = length, w = width, and h = height. This is one of the simplest and most frequently used volume formulas. It applies to boxes, rooms, rectangular containers and many construction measurements.
The important point is that all three dimensions must represent the same unit. For example, multiplying feet × feet × feet produces cubic feet, not square feet or gallons.
Cube Volume
A cube has six equal square faces, so a single edge length a determines its volume:
For a = 5 m: V = 5³ = 125 m³. The calculator preserves the requested display precision, so this can be shown as 125.0000 m³ when four decimal places are selected.
Sphere Volume
For a sphere with radius r:
The radius must run from the center of the sphere to its surface. If you are given a diameter instead, first use r = d / 2. The sphere formula is a standard result in elementary geometry.
Cone Volume
For a right circular cone:
The height h is the perpendicular distance from the base to the apex, not the slant height. The slant height is:
and can be used when calculating the cone's surface area. OpenStax likewise derives the cone volume as one-third of the volume of a cylinder with the same base and height.
How to Calculate Tank Capacity
For a rectangular tank, there are two different measurements that should never be confused:
- Total tank capacity is the volume the container can hold when filled to its full internal height:V_total = l · w · h
- Liquid volume is the amount actually present at a particular fill depth d:V_liquid = l · w · d
- The remaining empty or air volume is:V_air = V_total - V_liquid
Worked Tank Example
Suppose a rectangular tank measures: Length = 10 ft, Width = 6 ft, Total Height = 4 ft, Liquid Depth = 3 ft.
This distinction matters in water tanks, storage vessels and other partially filled containers. The calculator therefore reports Liquid Storage Capacity, Total Tank Capacity and Remaining Air Volume separately rather than combining them into one misleading number. The production implementation and regression audit specifically verify this distinction.
Spherical Caps, Ellipsoids, Frustums, Pyramids, Tubes & Capsules
Spherical Caps and Partial Spheres
A spherical cap is the portion of a sphere cut off by a plane. Its volume depends on sphere radius R and cap height h:
The cap height must be geometrically valid relative to the sphere diameter (h ≤ 2R). The calculator rejects impossible configurations instead of silently adjusting them. Useful for domes, tank ends, and lens geometry.
Ellipsoid Volume
An ellipsoid generalizes a sphere along three perpendicular semi-axes a, b, c:
A sphere is the special case where a = b = c = r. The three dimensions must be semi-axis lengths, not full diameters.
Conical Frustum Volume
A conical frustum is the portion of a cone remaining after its tip is cut off:
With slant height s = √(h² + (R - r)²). Useful for tapered containers, funnels, hoppers, and truncated conical components.
Square Pyramid Volume
For a square pyramid with base edge a and height h:
The factor of 1/3 appears because a pyramid occupies one-third the volume of its enclosing prism (V = (1/3)Ah).
Hollow Tube and Pipe Volume
If R is outer radius, r is inner radius, and h is length:
The volume represents the solid cylindrical wall, not the empty bore. The calculator validates that inner diameter cannot equal or exceed outer diameter.
Capsule Volume
A capsule consists of a cylindrical middle section and two hemispherical ends:
Combines cylindrical and full spherical volume into one solid. Useful for rounded containers, pharmaceutical capsules, and pressurized gas tanks.
Volume Units: m³, ft³, in³, yd³, Liters and Gallons
Volume units are cubic because volume describes three dimensions. A length conversion therefore changes differently when cubed. For example, 1 m = 3.28084 ft, but 1 m³ ≈ 35.3147 ft³.
The calculator can convert volume into several common units, including cubic meters, liters, milliliters, US gallons, US fluid ounces, US quarts, Imperial gallons, cubic feet, cubic inches and cubic yards:
The calculator keeps US liquid gallons separate from UK/Imperial gallons (1 Imp gal ≈ 4.54609 L) because these are distinct units. For unit standardization, the international SI framework is maintained by the Bureau International des Poids et Mesures (BIPM).
How to Convert Cubic Feet to Liters
To convert cubic feet to liters: L = ft³ × 28.316846592. For example, 25 ft³ × 28.316846592 = 707.9212 L. Conversely, ft³ = L / 28.316846592. This is particularly useful when a tank specification is given in cubic feet but the required capacity is needed in liters.
How to Check a Volume Calculation
A good volume calculation should pass three basic checks:
Check 1: Units
All dimensions in a formula must be expressed in compatible units. For example, do not multiply 5 ft × 2 m × 3 ft directly; convert all to feet or meters first.
Check 2: Shape
Use the formula associated with the actual geometry. A cylinder, sphere, and cone do not use the same equation.
Check 3: Magnitude
Consider whether the final number is physically reasonable. A small object should not suddenly produce a massive volume unless the dimensions justify it.
Why Volume and Surface Area Are Different
Volume and surface area describe different geometric properties. Volume measures the amount of three-dimensional space inside a solid and is expressed in cubic units. Surface area measures the total area covering the object's exterior and is expressed in square units.
For example, a cylinder has V = πr²h but SA = 2πr² + 2πrh. Increasing the radius affects volume more strongly than it affects a simple linear measurement because radius is squared in the volume formula. For projects where both quantities are needed, use the Surface Area Calculator & 3D Solids Net Suite alongside this tool.
Practical & Professional Applications
Construction & Civil
Calculate concrete pour volumes, gravel requirements, rectangular spaces, pipes, and earthwork holdbacks.
Storage & Tanks
Calculate full tank capacity, actual liquid volume at a specified fill depth, and remaining air volume.
Manufacturing & Packaging
Estimate volume and surface area of cylindrical, spherical, hollow, or capsule-shaped products and shipping containers.
Accuracy, Floating-Point Precision & Rounding
The calculator performs the geometric calculation using the underlying numeric values and only applies the selected decimal precision to the displayed result. For example, a result can be displayed as 785.40 m³ at two decimal places, or 785.3982 m³ at four decimal places.
The distinction is important because formatting precision and mathematical precision are not the same thing. For engineering, scientific and construction work, use input measurements that are themselves sufficiently accurate. Reporting many decimal places does not make an imprecise physical measurement more accurate.
Worked Step-by-Step Example: Cylinder
Frequently Asked Questions
Important: Volume Is Not the Same as Capacity in Every Context
In geometry, volume describes the three-dimensional space occupied by a solid. In tanks and containers, the word capacity often refers to how much liquid the container can hold. For partially filled containers, distinguish:
- Total tank capacity: maximum available internal volume (V_total = l·w·h)
- Liquid volume: volume currently occupied by liquid (V_liquid = l·w·d)
- Remaining air volume: unused internal space (V_air = V_total - V_liquid)
Keeping these measurements separate avoids one of the most common errors in tank-capacity calculations.