InfiniteCalc

Volume Calculator - Cylinder, Cone, Sphere, Prism & Box

Find the volume and surface area of cubes, cylinders, spheres, cones, and more.

Cube: side. Box: length. Cylinder, sphere & cone: radius. Pyramid: base side.

Only used for a rectangular prism (its width). Ignored for other shapes.

Height for box, cylinder, cone, and pyramid. Ignored for cube and sphere.

Embed this calculator on your website — free

This volume calculator finds the volume of six common solids — cube, rectangular prism (box), cylinder, sphere, cone, and square pyramid — along with the surface area of each. Pick a shape, enter its dimensions, and both values are computed instantly in cubic and square units.

Volume measures the three-dimensional space a solid occupies, so the answer is always in cubic units: enter centimeters and you get cm³, enter feet and you get ft³. Only the dimensions your chosen shape actually needs are used — a sphere needs just its radius, while a box needs length, width, and height.

Volume Formulas for Every Shape

Each solid has its own volume formula:

  • Cube: V = s³ (side cubed)
  • Rectangular prism (box): V = l × w × h
  • Cylinder: V = πr²h (base circle area × height)
  • Sphere: V = (4/3)πr³
  • Cone: V = (1/3)πr²h
  • Square pyramid: V = (1/3)a²h (a = base side)

Notice the pattern: prisms and cylinders are "base area × height," while cones and pyramids hold exactly one third of the matching prism or cylinder with the same base and height. The cylinder volume formula πr²h is the one people search for most — square the radius, multiply by pi, then multiply by the height.

Surface Area Formulas

Surface area is the total area of every face or curved surface, measured in square units:

  • Cube: SA = 6s²
  • Rectangular prism: SA = 2(lw + lh + wh)
  • Cylinder: SA = 2πr(r + h) — two circular ends plus the wrapped side
  • Sphere: SA = 4πr²
  • Cone: SA = πr(r + l), where the slant height l = √(r² + h²)
  • Square pyramid: SA = a² + 2a√(h² + (a/2)²)

Surface area matters when you are painting, wrapping, or insulating an object, while volume matters when you are filling it. A tank with r = 1 m and h = 2 m holds πr²h ≈ 6.28 m³ of water but needs 2π(1)(3) ≈ 18.85 m² of paint.

Worked Examples: Cylinder, Cone, and Sphere

Cylinder with radius 3 and height 8:

  • V = πr²h = π × 3² × 8 = π × 9 × 8 = 72π ≈ 226.19 cubic units.

Cone with the same radius 3 and height 8:

  • V = (1/3)πr²h = 72π ÷ 3 = 24π ≈ 75.40 cubic units — exactly one third of the cylinder.

Sphere with radius 6:

  • V = (4/3)πr³ = (4/3) × π × 216 = 288π ≈ 904.78 cubic units.

And a quick box check: a 5 × 4 × 10 rectangular prism has V = 5 × 4 × 10 = 200 cubic units and surface area 2(20 + 50 + 40) = 220 square units.

Volume Formulas for Every Common Shape

Two relationships tie most of these formulas together and are worth knowing rather than memorising each one separately.

The volume of a cone is exactly one third of the cylinder that contains it. Same radius, same height, one third the volume — which is why ⅓ appears in the cone formula. The same is true of a pyramid against its box.

A hemisphere is half a sphere, so ⁴⁄₃πr³ becomes ⅔πr³.

The calculation for volume of a cylinder, and every prism whatever its cross-section, follows the same rule: cross-sectional area × length. A cylinder is a prism with a circular cross-section (πr² × h). A triangular prism uses ½ × base × height for the triangle, then multiplies by the length. A box uses l × w for the rectangle.

So there are really only three ideas: prisms (area × length), the one-third family (cones and pyramids), and spheres.

Volume formulas reference
ShapeFormulaExampleVolume
Cubes = 464
Rectangular prism (box)l × w × h10 × 4 × 5200
Cylinderπr²hr = 3, h = 5141.37
Cone⅓πr²hr = 3, h = 547.12
Sphere⁴⁄₃πr³r = 3113.10
Hemisphere⅔πr³r = 356.55
Triangular prism½ × b × h × Lb = 4, h = 5, L = 10100
Square pyramid⅓ × b² × hb = 4, h = 526.67

Units are cubic — measure every dimension in the same unit and the answer is in that unit cubed. Feet in, cubic feet out.

Volume of a Triangular Prism

A triangular prism has two identical triangular ends joined by three rectangles. Its volume follows the general prism rule:

Volume = (½ × base × height) × length

The two "heights" here are the trap. The triangle’s height is measured perpendicular to its base, inside the triangular face. The length is the distance between the two triangular ends. Mixing them up is the most common error.

Worked example. A triangle with a 4 cm base and 5 cm height, on a prism 10 cm long:

  • Triangular area: ½ × 4 × 5 = 10 cm²
  • Volume: 10 × 10 = 100 cm³

If the prism stands upright, "length" becomes its vertical height — the formula is unchanged, only the orientation differs. Identify the triangular face first, work out its area, then multiply by the distance to the matching face.

Pool Volume Calculator, Tank and Pipe Volume

Real containers are just the shapes above, and the useful trick is converting the result to gallons: one cubic foot holds 7.48 US gallons.

Round pool. Used as a pool volume calculator, treat it as a cylinder: πr² × average depth. An 18 ft diameter pool (r = 9 ft) at 4 ft deep is π × 81 × 4 = 1,017.9 cu ft, which is about 7,614 gallons.

Rectangular pool. Length × width × average depth. For a sloping floor, average the shallow and deep ends rather than using either one.

Cylindrical tank. Same as the round pool. For a tank lying on its side and only partly full, the exposed surface is a circular segment and the maths is considerably harder — use a dedicated tank chart.

Pipe. πr² × length, with the radius in the same unit as the length. A 4-inch pipe has a 2-inch radius, which is 0.1667 ft, so 100 ft of it holds π × 0.1667² × 100 = 8.73 cu ft, or about 65 gallons. Note that pipe is sold by nominal size, which is not the true internal diameter — measure the bore for anything precise.

Frequently Asked Questions

What is the volume of a cone?

V = ⅓πr²h — exactly one third of the cylinder with the same radius and height. With r = 3 and h = 5 that is ⅓ × π × 9 × 5 = 47.12 cubic units, against 141.37 for the matching cylinder.

How do I find the volume of a triangular prism?

Work out the triangular face area with ½ × base × height, then multiply by the prism length. A 4 by 5 triangle on a 10-long prism gives ½ × 4 × 5 = 10, then 10 × 10 = 100 cubic units. Keep the triangle height and the prism length distinct.

How do I calculate pool volume in gallons?

Find the volume in cubic feet, then multiply by 7.48. A round 18 ft pool 4 ft deep is π × 9² × 4 = 1,017.9 cu ft, so about 7,614 gallons. Use the average depth if the floor slopes.

What is the volume of a hemisphere?

V = ⅔πr³, exactly half a sphere. With r = 3 that is 56.55 cubic units against the full sphere’s 113.10.

What is the formula for the volume of a cylinder?

V = πr²h — the circular cross-sectional area times the height. With r = 3 and h = 5 that is π × 9 × 5 = 141.37 cubic units. Remember r is the radius, half the diameter.

How many gallons are in a cubic foot?

7.48052 US gallons. So multiply cubic feet by 7.48 for gallons, or divide gallons by 7.48 to get cubic feet. A cubic yard, at 27 cubic feet, holds about 202 gallons.

What is the formula for the volume of a cylinder?

The cylinder volume formula is V = πr²h: square the radius, multiply by π (about 3.14159), then multiply by the height. It works because a cylinder is a circle (area πr²) extended straight upward through height h. A can with radius 4 cm and height 10 cm holds π × 16 × 10 ≈ 502.65 cm³.

How do you find the volume of a sphere?

Use V = (4/3)πr³. Cube the radius, multiply by π, then multiply by 4/3. A sphere with radius 3 has volume (4/3) × π × 27 = 36π ≈ 113.10 cubic units. If you are given the diameter, halve it first to get the radius before cubing.

Why is a cone one third the volume of a cylinder?

A cone with the same base radius and height as a cylinder holds exactly one third of its volume — that is why the formulas are πr²h and (1/3)πr²h. You can demonstrate it physically: filling a cone with water and pouring it into the matching cylinder takes exactly three pours. The same 1/3 relationship holds between pyramids and prisms.

What units is volume measured in?

Volume is always in cubic units: cubic centimeters (cm³), cubic meters (m³), cubic inches, or cubic feet, depending on what unit you measured the dimensions in. For liquids, 1,000 cm³ equals 1 liter, and 1 m³ equals 1,000 liters. Always use the same unit for every dimension before multiplying.

What is the difference between volume and surface area?

Volume measures the space inside a solid (cubic units) — how much it can hold. Surface area measures the total area of its outside faces (square units) — how much material covers it. A cube with 2 cm sides has a volume of 8 cm³ but a surface area of 24 cm², and the two quantities are not interchangeable.

Embed this calculator on your website — free

Copy this code into your website or blog — no sign-up, no API key, and no cost, ever. It works on WordPress, Squarespace, Wix, Webflow, and any page that accepts HTML: paste it where you want the volume calculator to appear.

  • ✓ Mobile responsive — fills its container
  • ✓ Lazy-loaded, so it never slows your page
  • ✓ Always up to date — nothing to maintain
  • ✓ Private: nothing visitors type is stored

Want a different tool? Every calculator on InfiniteCalc can be embedded the same way — browse all free calculator widgets.

Related Calculators