🧰 ToolPicoAll Tools →

Volume Calculator

Pick a shape to instantly see its volume, surface area, and formula. Cube, rectangular box, cylinder, sphere, cone, triangular prism, square pyramid, frustum, spherical cap, pipe, capsule, ellipsoid, and hemisphere — plus a step-by-step solution, partial-fill / tank fill-level mode, inch/foot/cm/m units, and instant gallon-liter conversion.

13 shapes Volume + surface area + formula Partial-fill tank mode Step-by-step solution Inches, feet, cm & m Updated: Jul 28, 2026
Quick answer Volume is the amount of three-dimensional space a solid object occupies, measured in cubic units (in³, ft³, cm³, m³, liters, gallons). A cube uses , a rectangular box uses a·b·c, a cylinder uses π·r²·h, a sphere uses (4/3)·π·r³, and a cone uses (1/3)·π·r²·h. Pick a shape above to get the volume, surface area, and formula instantly, in inches, feet, centimeters, or meters.
231 in³= 1 US gallon
1,728 in³= 1 ft³
π ≈ 3.14159Cylinder / sphere / cone constant
(4/3)·π·r³Sphere volume formula
🧊 Calculation note: Every result is computed entirely in your browser (client-side) using the exact geometric formula for the shape you choose — no server or third-party service is involved. Volume is measured in cubic units (in³, ft³, cm³, m³) and surface area in square units (in², ft², cm², m²). Each result is also shown in cubic inches, cubic feet, cubic centimeters, cubic meters, liters, and US/UK gallons, plus an approximate water capacity (gallons + standard 8 fl oz cups). The cylinder and rectangular box shapes also offer a partial-fill mode for tank fill-level calculations — drag the slider or type a fill depth to see the liquid volume at that level. Use a period for decimals (e.g. 12.5).

What is volume, and how do you calculate it?

The full explanation — with formulas — for the volume and surface area of a cube, rectangular box, cylinder, sphere, cone, triangular prism, square pyramid, frustum, spherical cap, and pipe.

Volume is the amount of three-dimensional space a solid object occupies, and it's always measured in cubic units (cubic inches in³, cubic feet ft³, cubic centimeters cm³, cubic meters m³, liters). Surface area is the total area of all of an object's outer faces, measured in square units (in², ft², cm², m²). This calculator gives you both the volume and the surface area for the shape you pick, shows the formula used, and explains the result step by step.

How do you calculate the volume of a cube and a rectangular box?

Quick answerA cube's volume is (side × side × side); a rectangular box's volume is a·b·c (length × width × height). Surface area is 6·a² for a cube and 2·(ab+bc+ac) for a box. Example: a cube with a 4-inch side has a volume of 4³ = 64 cubic inches.
  • Cube: V = a³, S = 6a². Since every edge is equal, one measurement is enough.
  • Rectangular box (prism): V = a·b·c, S = 2(ab+bc+ac). Used for storage bins, boxes, and room volume calculations.

How do you find the volume of a cylinder and a cone?

Quick answerA cylinder's volume is π·r²·h (base area × height). A cone is one-third the volume of a cylinder with the same base and height: V = (1/3)·π·r²·h. A cylinder with a 3-inch radius and an 8-inch height has a volume of π×3²×8 ≈ 226.19 in³.

A cylinder's surface area is 2·π·r·(r+h); a cone's surface area first requires the slant height l = √(r²+h²), then applies S = π·r·(r+l). This tool also calculates the volume of a "frustum" — a cone with two different base radii (like a bucket or a lampshade).

The volume and surface area of a sphere

Quick answerA sphere's volume is (4/3)·π·r³, and its surface area is 4·π·r², where r is the radius. A sphere with a 5-inch radius has a volume of (4/3)×π×5³ ≈ 523.60 in³. The "Spherical cap" option calculates the volume of just a portion of a sphere, cut off by a flat plane.

The volume of a triangular prism and a square pyramid

Quick answerA triangular prism's volume is Base area × L (the triangular base's area, found with Heron's formula, times the prism's length). A square pyramid's volume is (1/3)·a²·h, where a is the base side and h is the vertical height. A pyramid with a 6-inch base side and a 9-inch height has a volume of (1/3)×36×9 = 108 in³.

How do you convert volume to gallons or liters?

Quick answer1 US gallon = 231 cubic inches ≈ 3.785 liters, and 1 cubic foot ≈ 7.48 US gallons. On the metric side, 1,000 cm³ = 1 liter and 1 m³ = 1,000 liters. This tool automatically shows every result in cubic inches, cubic feet, liters, milliliters, US/UK gallons, quarts, and oil barrels — plus roughly how many standard 8 fl oz cups of water it holds.

What are a frustum, a spherical cap, and a pipe used for?

Quick answerA frustum (truncated cone) is used for objects with two different base widths, like buckets, planters, and funnels; a spherical cap is used for domes and rounded tank tops — a portion of a sphere; and a pipe (hollow cylinder) is used for hollow objects like metal pipe, hose, and tubing. These three shapes are rarely found on standard calculators, which is why they're included here.

Volume and surface area formulas table

Volume and surface area formulas for 11 solid shapes in one table — a copy-ready reference.

Solid shapes · volume and surface area (r = radius, h = height, a/b/c = side, l = slant height, L = length)
ShapeVolumeSurface area
Cube6·a²
Rectangular boxa·b·c2·(ab+bc+ac)
Cylinderπ·r²·h2·π·r·(r+h)
Sphere(4/3)·π·r³4·π·r²
Cone(1/3)·π·r²·hπ·r·(r+l)
Triangular prismBase area · L2·Base area + Perimeter·L
Square pyramid(1/3)·a²·ha²+2·a·l
Frustum (truncated cone)(1/3)·π·h·(R²+Rr+r²)π·(R+r)·l + π·R² + π·r²
Spherical cap(π·h²/3)·(3r−h)2·π·r·h + π·a²
Pipe (hollow cylinder)π·h·(R²−r²)2·π·h·(R+r) + 2·π·(R²−r²)
Capsule (cylinder + two hemispheres)π·r²·h + (4/3)·π·r³2·π·r·h + 4·π·r²
Ellipsoid(4/3)·π·a·b·c≈ 4·π·((aᵖbᵖ+aᵖcᵖ+bᵖcᵖ)/3)^(1/p), p≈1.6075
Hemisphere(2/3)·π·r³3·π·r² (dome + base)

Popular calculations

Example volume and surface area values

Ready-made results for commonly used dimensions (unit: inches). Use the calculator above for an exact value.

Example solid shapes (unit: inches)
Shape / dimensionsVolumeSurface area
Cube · side 4 in64 in³96 in²
Box · 6×4×3 in72 in³108 in²
Cylinder · r 3, h 8 in226.19 in³207.35 in²
Sphere · r 5 in523.60 in³314.16 in²
Cone · r 3, h 6 in56.55 in³84.82 in²
Triangular prism · 3-4-5, L 10 in60 in³84 in²
Square pyramid · a 6, h 9 in108 in³79.25 in²
Frustum · R 6, r 3, h 8 in509.73 in³385.64 in²

Volume unit & conversion tables

Conversions between volume and surface area units — inches, feet, liters, gallons, and barrels included.

Volume unit conversions
UnitEquals
1 ft³ (cubic foot)1,728 in³ = 7.48 US gallons
1 US gallon (gal)231 in³ = 3.785 liters
1 UK gallon (gal)277.42 in³ = 4.546 liters
1 liter (L)1,000 cm³ = 61.024 in³
1 m³ (cubic meter)1,000,000 cm³ = 1,000,000,000 mm³
1 m³264.17 US gallons = 35.31 ft³
1 US quart (qt)57.75 in³ = 0.9464 liters
1 oil barrel (bbl)158.99 liters = 42 US gallons

Gallon values are based on the US liquid gallon (3.7854 L) and the UK (imperial) gallon (4.5461 L).

Surface area unit conversions
UnitEquals
1 ft² (square foot)144 in²
1 in² (square inch)0.00694 ft²
1 m² (square meter)10,000 cm² = 10.76 ft² = 1,550 in²
1 cm² (square centimeter)100 mm² = 0.0001 m²

Unlike volume, surface area is expressed in square units and should never be confused with cubic units (in³, gallons).

Volume terms glossary

Short definitions of the core terms used in volume and surface area calculations.

VolumeThe amount of three-dimensional space a solid object occupies. Measured in cubic units (in³, ft³, cm³, m³, liters).
Surface areaThe total area of all of an object's outer faces. Measured in square units (in², ft², cm², m²).
Radius (r)The distance from the center to the edge. Half the diameter; the basis for cylinder, cone, and sphere calculations.
Base areaThe area of the bottom face of a prism or pyramid; multiplied by height in the volume formula.
Slant height (l)The slanted distance from the apex of a cone or pyramid to the edge of its base; used in surface area calculations.
PrismA solid with two identical, parallel bases and flat side faces (e.g. a rectangular box or a triangular prism).
PyramidA solid made of a base and triangular faces that meet at a single apex above the base's edges.
FrustumA solid formed by slicing off the tip of a cone, leaving two different base radii.
Spherical capThe smaller solid formed by cutting a sphere with a flat plane.
Cubic inch / cubic footUS customary volume units; 1 ft³ = 1,728 in³ = about 7.48 US gallons.
Gallon (US)A US liquid volume unit equal to 231 in³, or about 3.785 liters. The UK (imperial) gallon is larger, at 4.546 liters.
Pi (π)The ratio of a circle's circumference to its diameter, approximately 3.14159. Used in cylinder, cone, and sphere volume formulas.
Pipe / tubeA hollow cylinder; its volume is found from the difference between the squares of the outer and inner radii.
CapsuleA cylindrical body capped with a hemisphere on each end. The shape of horizontal propane tanks and pill-shaped containers; the two hemispheres together form one full sphere.
EllipsoidA "stretched sphere" with three independent semi-axes (a, b, c) instead of one radius. The shape of a rugby ball or a football; when all three axes are equal it becomes a sphere.
HemisphereExactly half of a sphere, cut through its center — a dome shape. Volume is half a sphere's; surface area adds the flat circular base to the curved dome.
Partial fill / fill levelThe volume of liquid in a tank that is only partially full, measured by fill depth or fill percentage rather than a completely full container. Common for horizontal cylindrical and rectangular tanks.
Explore all ToolPico tools →

In-depth guides

Step-by-step answers to the most commonly asked volume questions.

How many cubic inches are in a container, and how does that convert to fluid ounces?

Once you have a volume in cubic inches, converting it to US fluid ounces is a single division: 1 US fluid ounce = 1.805 in³. For example, a cylindrical container with a 1.5-inch radius and a 5-inch height has a volume of π×1.5²×5 ≈ 35.34 in³, which is about 35.34 ÷ 1.805 ≈ 19.6 fl oz.

Use the "Cylinder" shape above, enter the radius and height in inches, and the tool shows the result in cubic inches, cubic feet, liters, and US/UK gallons automatically — no separate fluid-ounce conversion needed for gallons or liters.

How do you calculate the volume of a water tank or pool in gallons?

For a rectangular pool or tank, apply the rectangular box formula V = a·b·c (length × width × depth) in feet. For a cylindrical tank, use V = π·r²·h. Once you have the result in cubic feet, multiply by about 7.48 to get US gallons.

For example, a tank measuring 4 ft × 6 ft × 3 ft has a volume of 4×6×3 = 72 ft³, which holds about 72 × 7.48 ≈ 538.6 gallons of water. Select "Feet (ft)" as the unit above and the tool converts the result to gallons for you automatically.

How do you calculate the volume of a pipe (hollow cylinder)?

The volume of a pipe (hollow cylinder) is found by subtracting the volume of the inner hollow from the volume of the outer cylinder: V = π·h·(R²−r²); R is the outer radius, r is the inner radius, and h is the pipe's length. This gives the actual material volume of the pipe itself.

For example, a pipe with an outer radius of 2 in, an inner radius of 1.5 in, and a length of 12 in has a volume of π×12×(4−2.25) = π×12×1.75 ≈ 65.97 in³. Select the "Pipe" shape above and enter R, r, and h to get this instantly.

How do you calculate a partial fill / tank fill-level volume?

For a horizontal cylindrical tank filled to a depth d (measured from the bottom), the wetted cross-section is a circular segment, not a simple fraction of the circle: Area = r²·acos((r−d)/r) − (r−d)·√(2rd−d²), then multiply by the tank's length to get the partial volume. This is why a tank that's 50% full by depth is not always 50% full by volume for a horizontal cylinder — but it is exactly 50% by volume at exactly the half-depth mark, since the shape is symmetric.

For a rectangular box or tank, partial fill is much simpler — it's just length × width × fill depth, since every horizontal cross-section is identical.

Select the "Cylinder" or "Rectangular box" shape above, switch to "Partial fill" mode, and either drag the percentage slider or type an exact fill depth to see the liquid volume update instantly, along with the percentage full.

Frequently asked questions

How do you calculate the volume of a cube?
The volume of a cube is found by cubing the length of one side: Volume = a³ = a × a × a. For example, a cube with a 4-inch side has a volume of 4³ = 64 cubic inches. Since every edge of a cube is equal, a single measurement is enough; surface area is found with 6 × a².
What is the formula for the volume of a cylinder?
The volume of a cylinder equals the area of its circular base times its height: Volume = π × r² × h. For example, a cylinder with a 3-inch radius and an 8-inch height has a volume of π × 3² × 8 ≈ 226.19 cubic inches. Surface area is found with 2 × π × r × (r + h).
How do you find the volume of a sphere?
The volume of a sphere is found with Volume = (4/3) × π × r³, where r is the radius. For example, a sphere with a 5-inch radius has a volume of (4/3) × π × 5³ ≈ 523.60 cubic inches. Surface area is found with 4 × π × r².
What is the formula for the volume of a cone?
The volume of a cone is one-third the volume of a cylinder with the same base and height: Volume = (1/3) × π × r² × h. A cone with a 3-inch base radius and a 6-inch height has a volume of (1/3) × π × 3² × 6 ≈ 56.55 cubic inches. Surface area first requires the slant height l = √(r² + h²), then S = π × r × (r + l).
How do you convert volume to gallons or liters?
1 US gallon = 231 cubic inches ≈ 3.785 liters, and 1 cubic foot ≈ 7.48 US gallons. On the metric side, 1,000 cubic centimeters equal 1 liter, and 1 cubic meter equals 1,000 liters. This tool automatically converts every volume you calculate into cubic inches, cubic feet, cubic centimeters, cubic meters, liters, milliliters, US/UK gallons, quarts, and oil barrels.
How do you calculate the surface area of a prism?
The surface area of a prism is the sum of the two base areas plus the lateral surface (base perimeter × height). For a rectangular box, S = 2 × (ab + bc + ac); for a triangular prism, S = 2 × base area + base perimeter × prism length.
How do you calculate the volume of a triangular prism?
The volume of a triangular prism equals the area of its triangular base times the prism's length: Volume = Base area × L. When all three sides of the base are known, the base area is found with Heron's formula: s = (a+b+c)/2, Area = √(s(s−a)(s−b)(s−c)).
How do you find the volume of a square pyramid?
The volume of a square-based pyramid is found with Volume = (1/3) × a² × h, where a is the base side and h is the vertical height. For example, a pyramid with a 6-inch base side and a 9-inch height has a volume of (1/3) × 6² × 9 = 108 cubic inches.
How do you calculate the volume of a frustum (truncated cone)?
The volume of a frustum is found with V = (1/3) × π × h × (R² + R·r + r²), where R is the bottom radius, r is the top radius, and h is the height. It's used for objects with two different base widths, like buckets, planters, and funnels.
How do you calculate the volume of a pipe (hollow cylinder)?
The volume of a pipe is found by subtracting the volume of the inner hollow from the volume of the outer cylinder: V = π × h × (R² − r²); R is the outer radius, r is the inner radius, and h is the pipe's length. This gives the actual material volume of hollow objects like metal pipe, tubing, and hose.
How do you calculate the volume of a capsule (cylinder + two hemispheres)?
The volume of a capsule is the sum of the cylindrical body's volume and the two end hemispheres, which together form one full sphere: V = π × r² × h + (4/3) × π × r³; r is the radius and h is the length of the cylindrical body. For example, a capsule with r = 3 in and h = 8 in has a volume of π×3²×8 + (4/3)×π×3³ ≈ 339.29 cubic inches. Surface area is found with 2 × π × r × h + 4 × π × r². It's used for horizontal propane tanks, storage silos, and pill-shaped containers with rounded ends.
How do you calculate a partial fill volume in a tank or box?
For a horizontal cylindrical tank filled to a depth d, the wetted cross-section is a circular segment: Area = r² × acos((r−d)/r) − (r−d) × √(2rd−d²), then multiply by the tank's length. For a rectangular box or tank, the partial volume is simply length × width × fill depth. This calculator's Cylinder and Rectangular box shapes include a "Partial fill" mode that computes the exact liquid volume at any fill depth, along with the percentage full.
How do you find the volume of an ellipsoid?
The volume of an ellipsoid (a stretched sphere with three different semi-axes a, b, and c) is found with Volume = (4/3) × π × a × b × c. For example, an ellipsoid with semi-axes 5, 3, and 2 inches has a volume of (4/3) × π × 5×3×2 ≈ 125.66 cubic inches. When a = b = c it reduces to the sphere formula.
What is the formula for the volume of a hemisphere?
A hemisphere is exactly half of a sphere: Volume = (2/3) × π × r³, where r is the radius. For example, a hemisphere with a 5-inch radius has a volume of (2/3) × π × 5³ ≈ 261.80 cubic inches. Total surface area (curved dome plus the flat circular base) is found with 3 × π × r².

Methodology & accuracy

ToolPico's Volume Calculator is a free, independent geometry tool. Every calculation uses the standard mathematical formula for the shape you select (cube, rectangular box, cylinder, sphere, cone, triangular prism, square pyramid, frustum, spherical cap, pipe, capsule, ellipsoid, and hemisphere) and runs entirely in your browser; no data is sent to a server.

Accuracy: π uses JavaScript's full-precision Math.PI constant. The triangular prism's base uses Heron's formula, and invalid side combinations are flagged; the spherical cap checks that its height doesn't exceed the sphere's diameter. The ellipsoid's surface area uses the standard Knud Thomsen approximation (accurate to within about 1.06%). The cylinder and rectangular box also offer a partial-fill mode using the circular-segment formula for horizontal tanks. Gallon and barrel conversions use standard fixed US/UK ratios. Last updated: July 28, 2026. Results are for educational and informational purposes.

Add this calculator to your site (embed code)

Embed the volume calculator on your own website for free. Copy the code below into your HTML — the tool runs in a simplified view and links back to this page as its source.

The embedded tool has a fixed layout; you can adjust the height value to fit your site. No ads or personal data, runs entirely client-side.

🔗 Add this tool to your site

Copy the code below into your own site. The tool is free, always up to date, and runs entirely on your page. No sign-up required.

Preview →
⚡ Built with ToolPico · toolpico.com