A capsule, also called a spherocylinder, is a cylinder closed at each end by a hemisphere of the same radius. It is the shape of many pills and gel caps, of horizontal propane tanks and compressed-air receivers, and of storage vessels with rounded heads. The domed ends spread internal pressure evenly, which is why pressure vessels favor them. This calculator works from a radius or diameter plus a length, or from a radius and a target volume when you need to find the length.
How to use the capsule calculator
- In I know the, choose Radius and cylinder length, Radius and overall length, Diameter and overall length or Radius and volume (find the length).
- Enter the Radius (r) or Diameter (d). The Cylinder length (a) is the straight middle section only; the Overall length (L) runs tip to tip, including both rounded ends.
- In volume mode, enter the Volume (V) in cubic units of the chosen unit, for example 1,000 for 1,000 cm³ (1 liter).
- Pick the Units. The results list the radius, diameter, cylinder length, overall length, volume, capacity in liters and US gallons, total surface area (S), the cylinder side area and the area of the two end caps.
Capsule formulas
Why the two caps make one sphere
The two hemispherical ends have the same radius, so together they form one whole sphere. A capsule is really a sphere with a cylinder spliced in at its equator, and that leads to two handy shortcuts:
- Surface area. Because 2r + a is the overall length, S = 2πrL, exactly the curved side of a plain cylinder of the same length. This is Archimedes’ discovery that a sphere’s area, 4πr2, equals the side of the cylinder that just encloses it, 2πr × 2r.
- Volume. A capsule holds ⅔πr3 less than a flat-ended cylinder of the same overall length, since a sphere fills two thirds of its enclosing cylinder.
Worked example: a horizontal propane tank
A horizontal tank is 37.5 in in diameter and 120 in from end to end, about the size of a residential 500-gallon propane tank. Choose Diameter and overall length, enter d = 37.5 and L = 120, and pick inches.
- Straight section: a = 120 − 37.5 = 82.5 in
- Volume: the cylinder's 91,118.46 in³ plus a sphere of radius 18.75 in, 27,611.65 in³, gives 118,730.11 in³
- Capacity: about 513.98 US gal (1,945.64 L), because a US gallon is exactly 231 in³
- Surface area: 14,137.17 in², about 98.17 ft² of steel to paint, and the same as 2π × 18.75 × 120
Propane tanks are normally filled to only about 80% to leave room for the liquid to expand, so the usable amount is closer to 411 gal. Real tank heads are often a little flatter than hemispheres, so treat the capsule figure as an upper estimate.
Finding the length for a target volume
Say you are designing a 1-liter bottle with rounded ends and a radius of 4 cm. Choose Radius and volume (find the length), enter r = 4 and V = 1,000 in centimeters. The straight section needs to be 14.56 cm, for an overall length of 22.56 cm. The volume can never be smaller than the sphere of that radius (268.08 cm³ here); below that, no capsule fits and the calculator says so.
Measuring a real capsule
- Diameter. Use calipers across the widest point of a pill. For a tank, wrap a tape around it and divide the circumference by π; that is more accurate than measuring across.
- Length. Measure tip to tip and use an overall-length option. It is far easier than judging where the dome meets the straight wall.
- Small objects. Work in millimeters for pills. A caplet 8 mm wide and 20 mm long has a volume of about 871.27 mm³, which the calculator also shows as 0.00087127 L, or 0.87 mL.
- Inside versus outside. Capacity depends on inside dimensions, so subtract twice the wall thickness from the outside diameter and length.
The capsule’s side view is a stadium shape. For a partly filled horizontal tank, use the tank volume calculator, and for the pieces on their own, see the cylinder and sphere calculators.
Frequently asked questions
What is the volume formula for a capsule?
V = πr²a + ⁴⁄₃πr³, which can be written πr²(⁴⁄₃r + a), where r is the radius and a is the length of the straight middle section. A capsule with r = 2 cm and a = 6 cm holds about 108.91 cm³.
What is the difference between the cylinder length and the overall length?
The cylinder length a covers only the straight middle section. The overall length L runs tip to tip and includes both rounded ends, so L = a + 2r. Mixing the two up is the most common error, which is why the calculator offers a separate option for each.
Why do the two ends count as one sphere?
Each end is a hemisphere with the same radius as the body. Put the two halves together and they make one complete sphere, so the ends always add ⁴⁄₃πr³ of volume and 4πr² of surface, however long the middle section is.
Is a propane tank a capsule?
Close, but not exactly. Many horizontal tanks have dished or elliptical heads that are flatter than a hemisphere, so a capsule model slightly overstates their volume. It is a good first estimate; rely on the capacity stamped on the tank for anything that matters.
What happens if the overall length equals the diameter?
The straight section shrinks to zero and the capsule becomes a sphere. If the overall length is shorter than the diameter, no capsule fits those numbers and the calculator shows an error instead of a result.