Capsule Volume Calculator (Pill Shape)

Compute the volume of a capsule: a cylinder with hemispherical end caps.
For pills, propane tanks, and pressure vessel design.

Capsule Volume

A capsule (also called a stadium of revolution, or a spherocylinder) is a cylinder with a hemispherical cap on each end. Picture a pharmaceutical pill or a propane tank.

V = π × r² × h + (4/3) × π × r³

Where r is the radius of the cylindrical section (also the radius of each hemispherical cap), and h is the length of the straight cylindrical section only, NOT counting the rounded ends.

The first term is the cylinder volume; the second term is the volume of one full sphere (two hemispheres = one sphere).

Worked example: a 100 lb propane tank A typical 100 lb propane tank has dimensions: r = 6 in, total height ≈ 48 in including the hemispherical end caps. Cylinder height h = 48 − 2 × 6 = 36 in (subtracting the two cap heights). V = π × 36 × 36 + (4/3) × π × 216 = 4,072 + 905 ≈ 4,977 in³ ≈ 21.5 US gallons.

Propane is sold by weight (lbs), but the tank has an 80% fill rule for safety. 100 lb propane at 0.51 g/cm³ liquid density occupies about 88 L = 23.3 gallons. The tank’s geometric capacity is ~21.5 gallons, holds ~17.2 gallons at 80% fill, which is 75 lb of liquid propane, and another 25 lb of vapor in the headspace and lines totals to the marketed “100 lb.”

Where capsule shapes matter:

  • Pharmaceutical pills, the “hard capsule” shape that most tablets come in.
  • Pressure vessels. Hemispherical end caps handle internal pressure with less wall stress than flat ones, so most LPG tanks, oxygen tanks, and chemical storage vessels use this geometry.
  • Submarine and torpedo hull shapes. Hemispherical ends reduce drag.
  • Vitamin and supplement capsules. Size 0, the most common adult vitamin, is about r = 3.4 mm with a total length of 21.7 mm, so the cylinder length is ≈ 14.9 mm. Run those through the formula and the geometry gives ≈ 0.71 mL. The published fill capacity for a size 0 shell is 0.68 mL, slightly less, because the two halves of a real capsule telescope into each other rather than meeting edge to edge. Worth remembering whenever you compare a calculated volume against a manufacturer’s spec: they are measuring slightly different things.

The headspace trap for tanks

When calculating capsule tank capacity for liquids, remember that you should fill to about 80-90% to leave thermal expansion space. A 100% geometric fill leaves no room for the liquid to expand on a hot day, and pressure then rises frighteningly fast.

Sanity check:

  • h = 0: capsule becomes a full sphere. V = (4/3)πr³. ✓
  • r = 0: capsule is a line segment of length h. V = 0. ✓
  • For r = h = 1: V = π + 4π/3 = 7π/3 ≈ 7.33 cubic units.

Comparing to a cylinder of the same total length V_cylinder = π × r² × h_total. For h_total = h + 2r (the cylinder same total length as the capsule): V_cylinder = π × r² × (h + 2r) = πr²h + 2πr³. V_capsule = πr²h + (4/3)πr³. Difference = 2πr³ − (4/3)πr³ = (2/3)πr³, the volume lost to rounding the ends.

That (2/3)πr³ is exactly the volume between the cylinder corners and the hemisphere caps, the pieces a rounded end leaves behind. So a cylinder of the same length holds (2/3)πr³ more than the capsule, that being the two corner regions the hemispheres cut away.

The capsule trades that volume for vastly better structural integrity under pressure.


How we build and check this calculator

This calculator runs entirely in your browser, so the numbers you enter stay on your device. The math behind it is written by hand and tested against worked examples and standard references before the page goes live.

SuperGlobalCalculator is independently built and maintained. See how we build and verify our calculators.


Embed This Calculator

Copy the code below and paste it into your website or blog.
The calculator will work directly on your page.