Calculate volume for cube, rectangular prism, sphere, cylinder, cone, or pyramid.
Volume measures the total 3-dimensional space an object occupies. Whether you are calculating how much water fits in a swimming pool, how much soil fills a planter, how much concrete you need for a foundation, or solving a geometry homework problem, the underlying math is the same: multiply the appropriate dimensions using the formula for that specific shape. This calculator handles the six most common 3D shapes with their exact formulas: cube, rectangular prism, sphere, cylinder, cone, and pyramid. Each shape has its own formula because they occupy space differently, but all volume results are measured in cubic units — cubic inches, cubic feet, cubic centimeters, cubic meters, or converted to functional units like gallons.
Every 3D shape has a specific formula that captures how it occupies space. The cube is simplest: side cubed, or side times itself three times. For a 5 inch cube: 5 x 5 x 5 = 125 cubic inches. The rectangular prism (also called a box or cuboid) extends this: length times width times height. For a 10 x 5 x 3 box: 150 cubic units. The sphere uses (4/3) times pi times radius cubed — a sphere with 5 unit radius has volume (4/3) x 3.14159 x 125 = 523.6 cubic units. The cylinder uses pi times radius squared times height — a cylinder with 3 radius and 10 height has volume 3.14159 x 9 x 10 = 282.7 cubic units. The cone is exactly one-third of a cylinder with the same base and height: (1/3) x pi x radius squared x height. The pyramid follows the same one-third rule: (1/3) x base length x base width x height for a rectangular pyramid. All these formulas assume "right" versions (perpendicular axis) with regular bases. Our area calculator handles the 2D versions of these shapes, and our triangle calculator works with the triangular faces of pyramids.
| Shape | Formula | Example (5 unit dimensions) |
|---|---|---|
| Cube | V = s³ | 5³ = 125 cubic units |
| Rectangular Prism | V = l x w x h | 5 x 5 x 5 = 125 cubic units |
| Sphere | V = (4/3) x π x r³ | (4/3) x 3.14 x 125 = 523.6 cubic units |
| Cylinder | V = π x r² x h | 3.14 x 25 x 5 = 392.7 cubic units |
| Cone | V = (1/3) x π x r² x h | (1/3) x 3.14 x 25 x 5 = 130.9 cubic units |
| Rectangular Pyramid | V = (1/3) x l x w x h | (1/3) x 5 x 5 x 5 = 41.7 cubic units |
One of the most elegant facts in geometry is that a cone is always exactly one-third the volume of a cylinder with the same base and height. This is not a coincidence but a fundamental result from calculus (specifically, from integrating the cross-sectional area). The same relationship holds between a rectangular pyramid and a rectangular prism: the pyramid is one-third the prism if they share the same base and height. This means you can pour three cones of ice cream to fill a cylindrical container of the same base and height, or three pyramids of sand to fill a box of the same base and height. This "one-third rule" makes volume calculations easier to remember and lets you quickly estimate one shape's volume from another's. It also explains why waffle cones with the same base as a scoop of ice cream can hold about three times as much melted ice cream if you flipped them into a cylindrical cup. The rule works because both the cone and pyramid taper to a single point (the apex) while cylinders and prisms have consistent cross-section throughout their height. Our scientific calculator handles the arithmetic when your dimensions involve decimals or fractions.
Volume unit conversions trip up more people than any other math conversion because the exponents are cubed rather than linear. Converting inches to feet in linear measurement means dividing by 12. Converting cubic inches to cubic feet means dividing by 1,728 (which is 12 cubed). Common conversions to memorize: 1 cubic foot equals 1,728 cubic inches (12 x 12 x 12). 1 cubic yard equals 27 cubic feet (3 x 3 x 3). 1 cubic meter equals 1,000,000 cubic centimeters (100 x 100 x 100). 1 cubic meter equals 1,000 liters. 1 US gallon equals 231 cubic inches. 1 cubic foot equals 7.48 US gallons. 1 liter equals 61.02 cubic inches. 1 US gallon equals 3.785 liters. These conversions matter especially for practical projects: concrete is priced per cubic yard so you must convert cubic feet to cubic yards for cost estimates. Water containers are priced per gallon so you must convert cubic feet to gallons for pool or aquarium calculations. Always convert all your input dimensions to the same unit BEFORE calculating volume — mixing 3 feet and 6 inches gives 3 feet x 0.5 feet, not 3 x 6.
| Conversion | Value | Common Use |
|---|---|---|
| 1 cubic foot to cubic inches | 1,728 in³ | Small container capacity |
| 1 cubic yard to cubic feet | 27 ft³ | Concrete, mulch, gravel |
| 1 cubic foot to US gallons | 7.48 gal | Pools, aquariums, water storage |
| 1 US gallon to cubic inches | 231 in³ | Fuel tanks, containers |
| 1 cubic meter to liters | 1,000 L | Metric water and gas volumes |
| 1 cubic meter to cubic feet | 35.31 ft³ | Metric to imperial conversion |
| 1 liter to US gallons | 0.264 gal | International product sizes |
Volume calculations appear constantly in daily life and professional work. Swimming pool water volume determines how much chlorine to add — a 20 x 10 ft rectangular pool at 5 ft average depth holds 1,000 cubic feet or 7,480 gallons. Aquarium volume determines fish stocking capacity — a rule of thumb is 1 gallon of water per inch of fish, so a 55 gallon tank supports about 55 inches of fish combined. Concrete for a foundation slab uses rectangular prism calculation — a 20 x 10 ft slab at 4 inch thickness is 20 x 10 x 0.333 = 66.7 cubic feet or 2.47 cubic yards. Refrigerator capacity is measured in cubic feet using rectangular prism math — a fridge marketed as "20 cubic feet" is the internal storage volume. Gas tanks in vehicles use cylinder volume for design and gallon capacity for usage. Balloons approximate spherical volume for gas capacity. Building HVAC systems calculate room volume in cubic feet to size heaters and air conditioners — a 15 x 12 ft room with 8 ft ceilings has 1,440 cubic feet of air. Storage unit sizes are quoted in square feet but the useful metric is cubic feet since stacking matters. Shipping containers are priced by cubic foot or cubic meter. Our concrete calculator specializes in construction volume calculations, and our mulch calculator handles landscape volume in cubic yards.
Several mistakes produce wildly wrong volumes. Mixing units is the most common error — using length in feet, width in feet, and height in inches produces a result with no meaningful unit and is off by a factor of 12. Always convert everything to the same unit first. Using diameter instead of radius in circular shape formulas (sphere, cylinder, cone) — the formulas use radius (half of diameter). If your measurement is 10 inch diameter, use 5 inch radius in the formula. Forgetting the (1/3) factor in cone and pyramid formulas — many students calculate a cone as if it were a cylinder, getting 3x the correct answer. Confusing slant height with vertical height in cones and pyramids — the height in volume formulas is the perpendicular distance from base to apex, not the sloped side length. For a cone where you know the slant length and base radius, use the Pythagorean theorem to find the perpendicular height first. Applying the wrong formula for irregular shapes — a hexagonal pyramid or elliptical cylinder has a different base area formula than what most simple volume calculators handle. Rounding pi too aggressively — using 3.14 introduces about 0.05 percent error, which matters for large volumes. Using 3.14159 is a better default. Not accounting for empty space — a tank holding 500 gallons of liquid does not literally use a 500 gallon volume container, because you need clearance above the fluid line, wall thickness, and safety margins. Our triangle calculator and square root calculator together handle the Pythagorean theorem calculations needed for slant height problems.
For real-world projects, small measurement errors compound quickly in volume calculations because you cube linear errors. Being off by 5 percent on each dimension of a cube gives you 15 percent error in volume — significant when ordering concrete at 150 dollars per cubic yard or aquarium water treatment for a fish tank. Always measure twice and add a 10 percent safety margin for material ordering. For irregular shapes, break them into standard geometric components (cube plus cylinder for a pill shape, or half sphere plus cylinder for a dome-topped tank), calculate each piece separately, then sum the volumes. Our unit converter handles metric-imperial swaps when specifications mix units, and our percentage calculator helps compute safety margins and waste allowances quickly.