About the ellipse calculator
An ellipse is the set of points whose distances to two fixed points (the foci) add up to a constant. Visually it is a stretched circle defined by two radii: the semi-major axis a (the longer half-width) and the semi-minor axis b (the shorter half-width). This calculator takes a and b and returns the area, an accurate circumference, the eccentricity, and the focus distance in one pass.
Ellipses are everywhere in the real world. Planetary orbits are ellipses with the Sun at one focus (Kepler's first law). Architectural domes, whispering galleries, elliptical machine gears, running tracks, and the cross-section of a tilted cylinder are all ellipses. Earth's orbit has an eccentricity of just 0.0167, which is why it looks almost circular, while a comet's orbit can have an eccentricity above 0.9.
How it works
The area uses the exact closed-form formula. The circumference has no elementary exact form, so the calculator uses Ramanujan's second approximation, which is accurate to a few parts per billion for ordinary ellipses:
Area A = pi x a x b Circumference C ~= pi x [ 3(a+b) - sqrt((3a+b)(a+3b)) ] Eccentricity e = sqrt(1 - b^2 / a^2) Focus distance c = a x e = sqrt(a^2 - b^2)
When a equals b the shape is a circle: the area becomes pi x r squared, the eccentricity becomes 0, and the foci collapse onto the centre. As b shrinks toward 0 the ellipse flattens, the eccentricity climbs toward 1, and the foci slide out toward the ends of the major axis. The sum of distances from any point on the curve to the two foci is always 2a.
Worked example
Take an ellipse with semi-major axis a = 5 units and semi-minor axis b = 3 units.
- Area: pi x 5 x 3 = 15 pi = 47.124 square units.
- Circumference: pi x [3(5+3) - sqrt((15+3)(5+9))] = pi x [24 - sqrt(252)] = pi x 8.124 = 25.527 units.
- Eccentricity: sqrt(1 - 9/25) = sqrt(0.64) = 0.8.
- Focus distance: 5 x 0.8 = 4 units from the centre, so the foci sit at plus and minus 4 along the major axis.
Reference: area and eccentricity by shape
Area scales with the product a x b, so doubling either radius doubles the area. Eccentricity depends only on the ratio b/a.
| a | b | Area (pi x a x b) | Eccentricity | Shape |
|---|---|---|---|---|
| 5 | 5 | 78.54 | 0.000 | Circle |
| 5 | 4 | 62.83 | 0.600 | Slightly oval |
| 5 | 3 | 47.12 | 0.800 | Standard ellipse |
| 5 | 2 | 31.42 | 0.917 | Elongated |
| 5 | 1 | 15.71 | 0.980 | Cigar shaped |
Common pitfalls
- Using diameters instead of radii. a and b are semi-axes (half the full width and height). If you measured the full length and width of an ellipse, halve each before entering them.
- Swapping a and b. The major axis a must be the larger value. The eccentricity formula needs b less than or equal to a, otherwise the square root goes imaginary.
- Expecting an exact circumference. No finite formula gives the exact perimeter. Ramanujan's approximation is excellent but still an approximation, so treat the last decimal as uncertain for very elongated ellipses.
- Confusing area units. Area comes out in square units of whatever you entered. Feet in gives square feet out, not feet.
- Treating eccentricity as a percentage. Eccentricity is a pure number between 0 and 1, not a percent. An e of 0.8 does not mean 80 percent of anything physical.
- Mixing up foci and vertices. The foci lie inside the ellipse at distance c from centre; the vertices are the four endpoints of the axes at distances a and b.
Frequently asked questions
What is the area of an ellipse?
The area of an ellipse is pi times the semi-major axis times the semi-minor axis: A = pi x a x b. When a and b are equal the ellipse is a circle and the formula collapses to the familiar A = pi x r squared. Area is always in square units.
Why is there no exact formula for ellipse circumference?
The exact perimeter of an ellipse is a complete elliptic integral of the second kind, which has no elementary closed form. In practice we use approximations. Ramanujan's second approximation, used by this calculator, is accurate to within a few parts per billion for moderately elongated ellipses.
What does eccentricity mean for an ellipse?
Eccentricity e measures how stretched an ellipse is, from 0 for a perfect circle toward 1 for an extremely elongated shape. It is calculated as e = the square root of (1 minus b squared over a squared). Earth's orbit has an eccentricity of about 0.0167, which is nearly circular.
How do I find the foci of an ellipse?
The two foci sit on the major axis at a distance c from the centre, where c = a times the eccentricity, or equivalently c = the square root of (a squared minus b squared). Every point on the ellipse has the property that the sum of its distances to the two foci is constant and equal to 2a.
Does the calculator require a to be larger than b?
Yes. By convention a is the semi-major axis and b is the semi-minor axis, so a must be greater than or equal to b. The eccentricity and focus formulas assume this ordering. If you enter a smaller a, swap your two values so the larger one is a.
