What is a capsule in geometry?
A capsule is a three-dimensional shape made of a cylinder with a hemisphere on each end, like a medicine capsule or a pill. It is also called a spherocylinder, and it is the shape of many pressure vessels, storage tanks and airship bodies, because the rounded ends spread stress evenly and avoid the weak corners of a plain cylinder. The shape is defined by two numbers: the radius of the cylinder, which is also the radius of the hemispheres, and the length of the straight cylindrical section.
This calculator finds the volume and surface area of a capsule from its radius and cylinder length, and it also shows the volume of the cylindrical part alone. For the flat shapes that make up the cross-section, a triangle area calculator covers the triangle, while this page handles the solid built from a circle.
No data leaves your device: the maths runs entirely in your browser, with no sign-up and no server round-trip. You can change a number, see the answer move, and change it back, all instantly. It is a private way to check a figure before you talk to a professional about it. The page has no tracking of the numbers you enter, and closing the tab leaves nothing behind.
How the volume of a capsule is calculated
The volume is the volume of the cylinder plus the volume of the two hemispheres, which together make one whole sphere. The cylinder contributes pi times the radius squared times the cylinder length, and the sphere contributes four thirds of pi times the radius cubed. Adding them gives pi times the radius squared times the sum of four thirds of the radius and the cylinder length, which is the formula this calculator uses.
The radius is the radius of the cylinder and of the hemispheres, and it is the same for both, because the hemispheres must match the cylinder exactly. The cylinder length is the length of the straight section only, not the total length of the capsule. The total length is the cylinder length plus twice the radius, because each hemisphere adds one radius to the length.
The volume is the headline number, in cubic units, and it is the capacity of the capsule. The surface area is the total area of the outside, which matters for painting, coating or heat loss. The cylinder part volume shows how much of the total comes from the straight section, which is useful when the hemispheres are small compared with the cylinder.
A dash in a result row means the value does not apply to the inputs you entered, not that the calculation failed. Some rows only make sense for certain methods or certain inputs, and the calculator leaves them blank rather than inventing a number. If every row shows a dash, check the inputs: a missing or zero value in a required field is the usual cause, and the field labels say which values are needed.
The cylinder length, explained
The cylinder length is the input that most often causes a wrong answer, because it is easy to confuse with the total length. The total length of a capsule is the cylinder length plus two radii, one for each hemisphere. A capsule with a radius of 3 cm and a total length of 14 cm has a cylinder length of 8 cm, not 14 cm. Entering 14 cm as the cylinder length overstates the volume by a large amount.
When the cylinder length is zero, the capsule becomes a sphere, because the two hemispheres meet directly with no straight section between them. The formula gives exactly the sphere volume in that case, which is a useful check: set the cylinder length to zero in this calculator, and the volume should be four thirds of pi times the radius cubed.
The volume grows linearly with the cylinder length, because the cylinder part is pi times the radius squared times the length. Doubling the cylinder length adds the same volume again, while the sphere part stays fixed. That makes it easy to design a capsule for a target volume: pick the radius, work out the sphere volume, and then choose the cylinder length that makes up the difference.
A worked example: radius 3 cm, cylinder length 8 cm
Take a capsule with a radius of 3 cm and a cylinder length of 8 cm. The total length is 8 plus twice 3, which is 14 cm, and the shape is like a large medicine capsule.
The cylinder part is pi times 9 times 8, which is 226.19 cubic centimetres. The sphere part is four thirds of pi times 27, which is about 113.10 cubic centimetres. Add them together, and the total volume is 339.29 cubic centimetres. The surface area is 2 times pi times 3 times 14, which is 263.89 square centimetres.
A volume of 339.29 cubic centimetres is about 0.34 litres, so this capsule holds about a third of a litre. The cylinder part contributes about two thirds of the volume and the sphere part about one third, which is typical when the cylinder is longer than the radius. The surface area of 263.89 square centimetres is the area that would need coating or painting.
Who uses the capsule volume formula
Pharmacists and drug manufacturers use it for capsules, because the volume decides how much powder or liquid a capsule holds. A capsule of a given size number has a fixed volume, and the dose must fit inside it, so the volume formula is part of the design of every medicine capsule.
Engineers use it for pressure vessels and storage tanks, which are often built as capsules because the hemispherical ends handle pressure better than flat ends. The volume decides the capacity, and the surface area decides the amount of steel and the heat loss.
Students meet the capsule as an example of volume by addition: the volume of a composite solid is the sum of the volumes of its parts. It is a good exercise because the parts are a cylinder and a sphere, both of which have familiar formulas. A Pythagorean theorem calculator is the tool for the circle that is the cross-section of the whole shape.
No calculator replaces professional advice where money, safety or a legal obligation is involved. The figures here are computed correctly from the inputs and the formula shown, but the choice of formula, the choice of inputs and the decision that follows are yours. When the stakes are high, take the calculated figure to someone qualified and ask them to confirm it before you commit. For a related calculation, the distance calculator covers the next number most people need after this one.
Capsule vs cylinder
A capsule is a cylinder with hemispherical ends, while a plain cylinder has flat ends. The capsule holds more than a cylinder of the same length and radius, because the hemispheres add volume, and it has no sharp corners, which makes it stronger under pressure. A plain cylinder is simpler to build and to stack, which is why most cans and pipes are cylinders.
The volume difference is exactly the sphere volume: a capsule holds a cylinder's volume plus four thirds of pi times the radius cubed. When the cylinder is long, the difference is a small share of the total, and when the cylinder is short, the difference dominates. At zero cylinder length, the capsule is a sphere and the cylinder volume is zero.
Keep both tools in mind. The right choice is the one whose inputs match the numbers you actually have, not the one with the fancier name. When in doubt, run both and compare: the pair of answers is usually more useful than either one alone.
Common mistakes with capsule volume
The first is entering the total length as the cylinder length, which overstates the volume by the sphere part twice over. The second is using the diameter instead of the radius, which makes the volume eight times too large.
The third is forgetting the sphere part entirely and calculating only the cylinder, which understates the volume. The fourth is mixing units, such as a radius in centimetres and a length in millimetres.
Check your answer against the sphere with the same radius: the capsule volume must be larger than the sphere volume, and the difference must equal the cylinder volume shown on this page. If the total is smaller than the sphere, one of the inputs is wrong.
How to use this capsule volume calculator
To use it, enter radius (r); enter cylinder length (a), then read the results box at the top. The main result is highlighted, and the other rows give the supporting figures. If an answer looks wrong, check the inputs first: a misplaced decimal or a wrong unit is the usual cause, not the formula.
Enter the radius and the length of the straight cylindrical section only, not the total length. Read the volume first, then the surface area. If you measured the total length, subtract twice the radius to get the cylinder length before you enter it.
Everything on this page runs in your browser, so the numbers you type never leave your device. There is no sign-up, no upload and no waiting for a server. Change any input and the results update straight away, which makes it easy to test a few values side by side before you decide anything. You can also use it offline once the page has loaded, because the calculation needs no connection at all.