Capsule Volume Calculator

Calculate capsule volume — or solve for radius or cylinder height from a known volume.

Ad placeholder (leaderboard)
Enjoying the tools? Go Pro for £4.99 (one-time) and remove all ads — forever, on this device. Remove ads — £4.99

A capsule volume calculator that works in three directions: give it the radius and cylinder-section height to get the volume, or supply the volume and one dimension to recover the missing one. A capsule — sometimes called an oblong sphere or stadium solid — appears constantly in engineering and pharmaceutical work, yet the formula is rarely taught alongside the simpler cone and cylinder formulas.

What is a capsule?

A capsule is a cylinder capped at both ends by identical hemispheres. The radius r is shared by both the cylinder and the two end caps. The variable h in this calculator is the length of the straight cylindrical section only — it does not include the hemispherical ends. If you measure the total end-to-end length L, then h = L minus 2r.

The formula

Because the two hemispheres together form one complete sphere, the total volume splits cleanly into two parts:

V = pi * r^2 * h + (4/3) * pi * r^3

where the first term is the cylinder and the second term is a full sphere of radius r. Setting h = 0 gives the sphere formula; making r approach 0 gives a degenerate line. Both limits are geometrically correct.

The three solve-for rearrangements are:

GoalFormula
Volume from r and hV = pi * r^2 * h + (4/3) * pi * r^3
Cylinder height from V and rh = (V - (4/3) * pi * r^3) / (pi * r^2)
Radius from V and hCubic equation — solved numerically

How the radius is solved numerically

Rearranging for r produces a depressed cubic in r:

(4/3) * pi * r^3  +  pi * h * r^2  -  V  =  0

This cubic has exactly one positive real root. The calculator finds it with Newton-Raphson iteration, using the sphere-only approximation r0 = cbrt(3V / (4 * pi)) as a starting point and iterating:

r_next = r - f(r) / f'(r)
f(r)  = pi * r^2 * h + (4/3) * pi * r^3 - V
f'(r) = 2 * pi * r * h + 4 * pi * r^2

Convergence is quadratic — each step roughly doubles the number of correct digits — so the result is accurate to at least 10 significant figures within 60 iterations regardless of the input magnitude.

Worked example

A pharmaceutical capsule (size 0) has a radius of 3.7 mm and a cylindrical body length of 13.5 mm. What is its volume?

  1. Cylinder part: pi times 3.7 squared times 13.5 = pi times 13.69 times 13.5 = pi times 184.815 ≈ 580.6 mm³
  2. Sphere part: (4/3) times pi times 3.7 cubed = (4/3) times pi times 50.653 ≈ 212.2 mm³
  3. Total: 580.6 + 212.2 ≈ 792.8 mm³ (about 0.793 mL)

Now suppose a pressurised tank must hold 10 000 cm³ and its cylindrical section is 40 cm long. What radius is required?

Solve (4/3) * pi * r^3 + pi * 40 * r^2 = 10000 numerically → r ≈ 8.17 cm

The SVG diagram highlights in amber whichever dimension you are solving for, so the geometry stays clear at a glance.

Practical applications

  • Pharmaceutical capsules: standard gelatin capsules (sizes 000 down to 5) are oblong capsule shapes; knowing the fill volume is essential for formulation.
  • Pressure vessels and dive cylinders: the hemispherical ends minimise stress concentrations; total internal volume is the cylinder plus two half-spheres.
  • Fuel tanks in aerospace: many auxiliary tanks are capsule-shaped for structural efficiency; total propellant mass = volume times density.
  • Sausages, hot dogs, and cylindrical foods: portion control and nutritional labelling by weight requires an accurate volume estimate.
  • 3-D printing and CNC machining: estimating material volume for costing and weight calculations on capsule-shaped parts or cavities.
  • Architecture and sculpture: columns, balusters, and decorative elements with rounded ends are modelled as capsules in BIM software.

Keep all inputs in the same unit and the result will be in the matching cubic unit automatically.

Ad placeholder (rectangle)