What is a capsule?
A capsule is a three-dimensional shape made of a right circular cylinder of radius r and length (side length) a, with a hemisphere of the same radius r attached to each flat end. Because the two hemispheres together form one complete sphere, a capsule is simply a cylinder plus a sphere. When the side length a equals zero, the capsule reduces to a perfect sphere. This shape is common in pharmaceutical pills, pressure vessels, and storage tanks.
How to use this calculator
Pick a calculation mode that matches the two values you already know — for example "Given r, a" to find volume, surface area and circumference, or "Given r, V" to solve for the side length. Enter your two known values, optionally choose a unit label and number of significant figures, then read off all five properties: radius r, side length a, volume V, surface area S, and circumference C. The unit label is descriptive only — the tool computes in whatever units you type, tagging areas with the square and volumes with the cube of that unit.
The formulas explained
The volume adds the cylinder's volume to the sphere formed by the caps: $$V = \pi r^2 a + \tfrac{4}{3}\pi r^3$$. The surface area adds the cylinder's lateral surface to the full sphere's surface: $$S = 2\pi r a + 4\pi r^2$$. The circumference is that of the circular cross-section: $$C = 2\pi r$$. To solve for a from a known volume, rearrange to \(a = (V - \tfrac{4}{3}\pi r^3) / (\pi r^2)\); from a known surface area, \(a = (S - 4\pi r^2) / (2\pi r)\). To find r from circumference, \(r = C / (2\pi)\).
Worked example
For \(r = 2\) cm and \(a = 5\) cm with \(\pi = 3.14159265359\): $$C = 2\pi(2) = 12.5664 \text{ cm}$$ $$S = 2\pi(2)(5) + 4\pi(2^2) = 36\pi = 113.097 \text{ cm}^2$$ $$V = \pi(2^2)(5) + \tfrac{4}{3}\pi(2^3) = 30.6667\pi = 96.3424 \text{ cm}^3$$ (rounded to 6 significant figures).
Capsule Dimensions Compared: Sphere to Elongated Capsule
The table fixes the radius at r = 2 cm and varies only the cylindrical side length a. It uses \(V = \pi r^{2} a + \tfrac{4}{3}\pi r^{3}\) and \(S = 2\pi r a + 4\pi r^{2}\). With r = 2 cm these simplify to \(V = 4\pi a + \tfrac{32}{3}\pi\) and \(S = 4\pi a + 16\pi\). The circumference \(C = 2\pi r = 4\pi \approx 12.57\) cm is the same in every row, because it depends only on r.
| a (cm) | Total length a + 2r (cm) | C (cm) | S (cm²) | V (cm³) | Cylinder share of volume |
|---|---|---|---|---|---|
| 0 (sphere) | 4 | 12.57 | 50.27 | 33.51 | 0% |
| 2 | 6 | 12.57 | 75.40 | 58.64 | 42.9% |
| 5 | 9 | 12.57 | 113.10 | 96.34 | 65.2% |
| 10 | 14 | 12.57 | 175.93 | 159.17 | 78.9% |
| 20 | 24 | 12.57 | 301.59 | 284.84 | 88.2% |
Example for a = 5 cm: \(V = \pi (2)^{2}(5) + \tfrac{4}{3}\pi (2)^{3} = 20\pi + \tfrac{32}{3}\pi \approx 62.83 + 33.51 = 96.34\) cm³, and the cylinder share is \(62.83 / 96.34 \approx 65.2\%\).
Observations: when a = 0 the capsule is a sphere (V ≈ 33.51 cm³, S ≈ 50.27 cm²). Each extra centimetre of side length adds \(4\pi \approx 12.57\) cm³ of volume and \(4\pi \approx 12.57\) cm² of surface area. Both increase linearly with a. The cylinder's share of the volume grows toward 100% as the capsule gets longer.
Capsule Variables and Terms
- r: radius
- The radius of the cylindrical section. It is also the radius of each hemispherical cap, since the caps fit flush on the cylinder ends. Unit: length (cm, m, in, …).
- a: side length
- The length of the straight cylindrical section only. It does not include the caps. Unit: length.
- Total end-to-end length
- The overall length of the capsule, \(L = a + 2r\), because each cap adds one radius at each end. Unit: length.
- V: volume
- The space enclosed: cylinder \(\pi r^{2} a\) plus two hemispheres, which together make one sphere of volume \(\tfrac{4}{3}\pi r^{3}\). Unit: length³ (cm³, m³, in³, …).
- S: surface area
- The total outer area: the cylinder's lateral area \(2\pi r a\) plus the two caps, which together make a sphere's area \(4\pi r^{2}\). There are no flat end faces. Unit: length² (cm², m², in², …).
- C: circumference
- The perimeter of the circular cross-section, \(C = 2\pi r\). It is the same along the whole cylindrical part and at the widest point of the caps. Unit: length.
- Hemisphere cap
- Half a sphere of radius r. Its volume is \(\tfrac{2}{3}\pi r^{3}\) and its curved area is \(2\pi r^{2}\).
- Sphere limiting case
- When a = 0 the cylinder vanishes and the two caps join into a sphere: \(V = \tfrac{4}{3}\pi r^{3}\), \(S = 4\pi r^{2}\).
- π: pi
- A dimensionless constant, about 3.14159265, which can be changed in the calculator.
FAQ
What does "circumference" mean for a capsule? It is the circumference of the circular cross-section, \(C = 2\pi r\).
Why might I get an "invalid input" message? When solving for the side length from a volume or surface area, the given value must be at least the volume or surface area of a sphere of radius r; otherwise no real cylinder length exists.
Does changing the unit convert the numbers? No — the unit dropdown only labels the output. All inputs must already be in the same length unit.