You make math videos? Upload once at Tublish.com, and it goes to Instagram, Facebook, YouTube, TikTok, Threads, LinkedIn, Discord, Telegram, Bluesky, Mastodon and WordPress. You make math videos? Upload once at Tublish.com, and it goes to Instagram, Facebook, YouTube, TikTok, Threads, LinkedIn, Discord, Telegram, Bluesky, Mastodon and WordPress.

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 100 lb propane cylinder is about 14.5 in across and 48 in tall, so r = 7.25 in.
Cylinder height h = 48 − 2 × 7.25 = 33.5 in (subtracting the two cap heights).
V = π × 52.56 × 33.5 + (4/3) × π × 381.1 = 5,532 + 1,596 ≈ 7,128 in³ ≈ 30.9 US gallons.

Propane is sold by weight, and a tank may only be filled to 80% of its water capacity so the liquid has room to expand on a hot day. 80% of 30.9 gallons is 24.7 gallons, and liquid propane weighs about 4.23 lb a gallon, so that is roughly 104 lb. Real heads are a little flatter than true hemispheres and the steel wall takes some room, which is how it lands on the 100 lb stamped on the collar. The vapor in the headspace weighs well under a pound, so the rating is the liquid.

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.

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.


A FREE website for what you create, plus a link-in-bio page, at myname.tublish.com. No credit card needed. A FREE website for what you create, plus a link-in-bio page, at myname.tublish.com. No credit card needed.

Embed This Calculator

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