Understanding the ellipsoid and capsule volume calculator — concept and principle
An ellipsoid is a stretched or squashed sphere with three perpendicular semi-axes a, b and c, the distances from the centre to the surface along each axis. Eggs, rugby balls, fruits and organs are often approximated this way. A capsule (spherocylinder) is a cylinder capped by two hemispheres, like a pill or a gas cylinder. Both volumes come from the same three inputs.
How it is calculated
- Ellipsoid: V = (4/3)π × a × b × c.
- Capsule: V = πa² × c + (4/3)πa³ = πa²((4/3)a + c), where a is the radius and c the length of the straight cylindrical part only.
For the capsule, the input b is ignored. The total length of the capsule is c + 2a. Use one length unit; volumes are in cubic units.
The principle
A sphere of radius 1 has volume 4π/3. Stretching it by a factor a along x, b along y and c along z turns it into the ellipsoid x²/a² + y²/b² + z²/c² = 1. Stretching a solid along one direction multiplies its volume by that factor, so the three stretches multiply the volume by abc. When a = b = c = r, the formula returns to the sphere, 4πr³/3.
The capsule is simply the sum of two familiar parts: a cylinder of volume πa²c and two hemispheres that together form one full sphere of radius a.
Unlike the volume, the surface area of a general ellipsoid has no formula in elementary functions; it needs elliptic integrals or a numerical approximation, which is why only volume is shown.
Worked example
- Inputs: a = 3, b = 2, c = 4.
- Ellipsoid: (4/3)π × 3 × 2 × 4 = 32π ≈ 100.5309649.
- Capsule cylinder part: π × 3² × 4 = 36π ≈ 113.097.
- Capsule end caps (one full sphere): (4/3)π × 3³ = 36π ≈ 113.097.
- Capsule total: 72π ≈ 226.1946711, for a capsule 4 + 2 × 3 = 10 long and 6 wide.
| Semi-axis a / capsule radius | Ellipsoid volume |
|---|---|
| 0.75 | 25.13274123 |
| 1.5 | 50.26548246 |
| 2.25 | 75.39822369 |
| 3 | 100.5309649 |
| 3.75 | 125.6637061 |
| 4.5 | 150.7964474 |
| 6 | 201.0619298 |
How to read the result
An ellipsoid fills π/6 ≈ 52.4% of the box 2a × 2b × 2c that encloses it, the same share as a sphere in a cube. The example box is 6 × 4 × 8 = 192, and 100.53 ÷ 192 ≈ 0.524. For a capsule, the rounded ends hold a large share of the volume when the straight section is short. If the units are centimetres, divide cm³ by 1,000 to get litres.
Common mistakes
- Entering full axis lengths (diameters) instead of semi-axes, which makes the ellipsoid volume eight times too large.
- Entering the total capsule length as c. Subtract the two end radii first: c = total length − 2a.
Frequently asked questions
How do I estimate the volume of an egg or a fruit?
Measure length, width and depth, halve each to get a, b and c, and apply (4/3)πabc. Treat it as an approximation.
What is a spheroid?
An ellipsoid with two equal semi-axes. With a = b it is a spheroid of revolution, flattened (oblate) when c is smaller and elongated (prolate) when c is larger.
Why is there no surface area output for the ellipsoid?
Except for spheroids, its surface area requires elliptic integrals. Approximations exist, but they are not exact.
Sources: D. Zwillinger (ed.), CRC Standard Mathematical Tables and Formulae, CRC Press · NIST Digital Library of Mathematical Functions, chapter 19 (elliptic integrals)