Volume Calculator

Volume of a sphere, cylinder, cone, prism, pyramid or rectangular box online: the formula, a step-by-step calculation and liters. Cylinder volume, sphere volume — solved.

Everything runs in your browser — your data is never sent to any server.

Why you need a volume calculator

Volume is one of the few quantities people actually need day to day: how much water fits the pool, how much paint the wall needs, how much concrete goes into the foundation, whether the box fits in the trunk, whether the jar of jam lasts until winter. The formulas are simple, but it is easy to mix up radius with diameter and forget the third — the volume of a sphere or a cone differs from a cylinder by exactly that share. Doing volume by hand means working out every time which formula belongs to which shape, and then wondering which units the answer came out in. The calculator below handles each shape, shows the formula and breaks the calculation into steps, and converts the result into cubic centimeters and liters — because volume is sold in liters in the shop, while drawings quote it in cubic meters. There is one subtlety that trips people up more than any other: for a prism or a pyramid you do not enter a radius or a side length, but the already-computed area of the base. If the base is a 12 × 4 cm rectangle, work out the area first (four multiplications, no drama) and feed that number into the "Base area" field along with the height. A rectangular box is simpler still: the three edges multiply directly. And about units. The calculator accepts dimensions in centimeters, meters or millimeters and converts the result into cubic centimeters and liters on its own. That is convenient, but remember how the conversions relate: cubic centimeters and liters differ by a factor of 1000, and cubic meters by a factor of a million. A slip in the exponent is expensive, so type the dimensions exactly as the drawing states them and do not do the arithmetic in your head. If you need the base area along the way, reach for the area calculator, and for switching between centimeters and meters there is the unit converter.

What the volume calculator does

  • Sphere, cylinder, cone, prism, pyramid and rectangular box — six shapes. Each has its own formula, and the right one is picked with a single button, with no page reload.
  • A step-by-step calculation from the formula: you see what gets multiplied by what. For a sphere the substitution of the cubed radius is spelled out, for a cylinder r² and the height are listed separately, so a mismatch with your own arithmetic shows up immediately.
  • The result straight in cubic centimeters, cubic meters and liters. Liters come from dividing by 1000, so a cylinder of 942.48 cm³ honestly reports 0.94 L.
  • Input units: centimeters, meters or millimeters — the conversion to centimeters and liters is automatic. You never have to convert the dimensions to meters by hand.
  • For prisms and pyramids you enter the finished base area, for a box its three edges. All dimensions must be positive; zero and negative values are rejected.
  • Below the result block there is a separate reference card listing all six volume formulas — handy to keep in view while you check the result against a textbook or redo the arithmetic by hand. No signup and nothing is uploaded: the calculation runs entirely in the browser and the dimensions you type never leave the page.

How to calculate a volume

  1. Pick the shape with the buttons at the top of the block — the formula follows automatically. A sphere needs one radius, a cylinder and a cone need a radius and a height, a box needs all three edges.
  2. Enter the dimensions. For a cylinder, cone, prism and pyramid there are two fields: a radius and a height for the first two, a base area and a height for the last two. Values can be typed with a point or with a comma.
  3. Choose the units — centimeters, meters or millimeters — and read the result: the volume in your chosen units, the conversion into cubic centimeters and into liters, plus the formula broken down into steps.
  4. Sanity-check the order of magnitude. A sphere of radius 10 cm is 4188.79 cm³, that is about 4.19 L — four one-liter bottles. If your result is far smaller or larger, check whether a diameter went in where a radius belonged.
  5. Compare the result against a rounded reference point: a sphere of radius 10 cm is about 4.19 L, a cylinder of radius 5 and height 12 is just under a liter, and a cone with the same parameters is about 0.31 L. If your volume is off by a factor, check whether a diameter went in where a radius belonged.

Technical details

The school formulas are used: V = 4/3·π·r³ for a sphere, V = π·r²·h for a cylinder, V = 1/3·π·r²·h for a cone, V = S·h for a prism, V = 1/3·S·h for a pyramid and V = a·b·c for a box. Note the factor 1/3 on the cone and the pyramid — that is not an approximation or a rounding, but an exact ratio: a cone occupies precisely one third of the volume of a cylinder with the same base and height. On precision. π is taken from mathematics at full precision and rounding happens only at output: in the worked steps π is shown as 3.1416 and intermediate products (a squared radius, say) to hundredths, while the final figure is never longer than two decimal places. Converting to cubic centimeters multiplies by 10⁶ for meters and divides by 1000 for millimeters; dividing by 1000 gives liters, since one liter is exactly 1000 cubic centimeters. On number format. The final figure is printed with two decimal places, and whole values appear without a fractional part: 30,000 rather than 30,000.00. The intermediate steps are broken out separately, so you can re-do the multiplication by hand if you want to. On the limits. Every dimension must be strictly greater than zero — with a zero or a negative value no result is produced. A sphere needs only the radius, a cylinder, cone, prism and pyramid need a radius or base area plus a height, a box needs all three edges. An incomplete set of data never yields a "zero" result that could be mistaken for an answer. All computation runs in the browser, on your own device: the dimensions you type are never uploaded and never stored. At the bottom of the block all six formulas are collected in one list — handy for checking at a glance which of them applies to your shape.

Volume formulas and conversion to liters

ShapeVolume formulaExample and result
SphereV = 4/3 · π · r³r = 5 cm → 523.6 cm³ (0.52 L)
CylinderV = π · r² · hr = 5, h = 12 → 942.48 cm³ (0.94 L)
ConeV = 1/3 · π · r² · hr = 5, h = 12 → 314.16 cm³ (0.31 L)
PrismV = S · hS = 12, h = 4 → 48 cm³ (0.05 L)
PyramidV = 1/3 · S · hS = 12, h = 4 → 16 cm³ (0.02 L)
Rectangular boxV = a · b · c40 × 30 × 25 → 30,000 cm³ (30 L)
Cone versus cylinderV(cone) = V(cylinder) ÷ 3942.48 ÷ 3 = 314.16 cm³
Pyramid versus prismV(pyramid) = V(prism) ÷ 348 ÷ 3 = 16 cm³
Into cubic centimetersm³ × 1,000,0000.5 m³ → 500,000 cm³
Into cubic meterscm³ ÷ 1,000,00030,000 cm³ → 0.03 m³
Into literscm³ ÷ 1000942.48 cm³ → 0.94 L
From millimetersmm³ ÷ 10001000 mm³ → 1 cm³
Sphere in litersV = 4/3 · π · r³r = 10 cm → 4188.79 cm³ (4.19 L)
Cylinder in litersV = π · r² · hr = 3, h = 20 → 565.49 cm³ (0.57 L)
Box in litersV = a · b · c60 × 40 × 35 → 84,000 cm³ (84 L)

The volumes in the table are computed from the same formulas the calculator uses: π ≈ 3.1416, and the 1/3 factor on the cone and the pyramid is exact rather than approximate. Liters come from dividing cubic centimeters by 1000, cubic meters by dividing by a million.

Frequently asked questions

How do I find the volume of a sphere?

Use V = 4/3 · π · r³, where r is the radius. For a sphere with a 5 cm radius: 4/3 × 3.1416 × 125 ≈ 523.6 cm³, which is roughly half a liter. You can sanity-check the result by eye: a sphere of radius 10 cm is 4188.79 cm³, about 4.19 L, that is four one-liter bottles.

How do I calculate the volume of a cylinder?

V = π · r² · h — the base area times the height. For a cylinder with a 5 cm radius and a 12 cm height: 3.1416 × 25 × 12 ≈ 942.48 cm³, just under a liter. This is exactly where people slip by using the diameter instead of the radius: at r = 10 cm the same cylinder already gives 3769.91 cm³, exactly four times as much, since the radius is squared.

How is the volume of a cone different from a cylinder?

Exactly three times smaller: a cone has the same base area and the same height, but the factor 1/3 instead of 1. So the volume of a cone is one third of a cylinder with the same radius and height. In numbers: a cylinder at r = 5, h = 12 gives 942.48 cm³, a cone with the same parameters gives 314.16 cm³, and those 314.16 are exactly a third of 942.48.

How many liters are in a cubic meter?

Exactly 1000: one cubic meter is 1000 liters, and one liter is 1000 cubic centimeters. The calculator shows the result in liters automatically, so there is nothing to convert separately. If you entered the dimensions in meters, the volume comes out in cubic meters, and right next to it you see the same volume in cubic centimeters and in liters.

What is the volume of a rectangular box?

The product of its three dimensions: V = a · b · c. A 40 × 30 × 25 cm box holds 30,000 cm³, which is 30 liters. This is the simplest case of all: the volume of a box is literally length times width times height, with no squares and no cubes involved.

How do I calculate the volume of a prism and a pyramid?

Both take the base area S and the height h: a prism is V = S · h, a pyramid is V = 1/3 · S · h — the same factor as the cone. The calculator takes the finished base area, so for a triangular prism with a base of 12 cm² and a height of 4 cm you get 48 cm³, and for a pyramid with the same numbers 16 cm³.

How do I convert a volume into liters?

Divide the cubic centimeters by 1000: one liter is exactly 1000 cubic centimeters. For example, 942.48 cm³ is 0.94 L, and a 30,000 cm³ box is exactly 30 L. The calculator already does this conversion for you: the "In liters" line appears under the main result next to the conversion into cubic centimeters, no matter which unit you entered your dimensions in.

What happens if I enter zero or a negative number?

No result appears — and that is the correct behavior. The volume of a body of zero size is zero, and a negative volume is physically impossible, so the calculator simply does not compute these cases. The same applies to incomplete data: a cylinder needs both a radius and a height, a box needs all three edges, so until every field is filled in there is no volume to report.

Related articles

Related tools