Understanding the ellipse calculator — concept and principle
An ellipse is a stretched circle: the set of points whose distances to two fixed points, the foci, add up to the same constant. It is described by its semi-major axis a (half the longest width) and semi-minor axis b (half the shortest width). This calculator gives the area, the perimeter, the eccentricity and the focal distance. Ellipses appear in planetary orbits, oval tables, arches and the slanted cross-section of a cylinder.
How it is calculated
- Area: A = πab
- Perimeter (Ramanujan’s second approximation): with h = ((a − b)/(a + b))², P ≈ π(a + b)[1 + 3h / (10 + √(4 − 3h))]
- Focal distance: c = √(a² − b²), the distance from the centre to each focus
- Eccentricity: e = c / a = √(1 − b²/a²)
Lengths share one unit; the area is in that unit squared; e has no unit.
The principle
An ellipse is a circle of radius a squeezed in one direction by the factor b/a. Squeezing scales every area by the same factor, so πa² becomes πa² × (b/a) = πab. The perimeter is harder: it has no formula in elementary functions and equals the complete elliptic integral 4a·E(e). In 1914 Srinivasa Ramanujan published approximations that are remarkably close to this integral. His second one is exact for a circle and still within about 0.04% for an ellipse flattened to a line. The focal relation c² = a² − b² comes from the vertex at the end of the minor axis: its distance to each focus is a, giving a right triangle with legs b and c.
Worked example
- Inputs: a = 5, b = 3.
- Area: π × 5 × 3 = 15π ≈ 47.1238898.
- h = (2/8)² = 0.0625; √(4 − 0.1875) ≈ 1.952562; correction = 0.1875 ÷ 11.952562 ≈ 0.015687.
- Perimeter ≈ π × 8 × 1.015687 ≈ 25.52699886 (the exact integral agrees to about 9 significant digits).
- c = √(25 − 9) = 4, and e = 4 ÷ 5 = 0.8.
| Semi-major axis a | Area |
|---|---|
| 1.25 | 11.78097245 |
| 2.5 | 23.5619449 |
| 3.75 | 35.34291735 |
| 5 | 47.1238898 |
| 6.25 | 58.90486225 |
| 7.5 | 70.68583471 |
| 10 | 94.24777961 |
How to read the result
Eccentricity runs from 0 (a perfect circle) toward 1 (a very flat ellipse). Earth’s orbit has e of about 0.017, almost circular, while many comets exceed 0.9. The perimeter always lies between that of a circle of radius b and one of radius a.
Common mistakes
- Entering full axis lengths (2a, 2b) instead of the semi-axes.
- Using P = 2π√((a² + b²)/2) as if it were exact; for a = 5, b = 3 it gives about 25.91, an error near 1.5%.
- Assuming the foci lie on the minor axis; they always lie on the major axis.
Frequently asked questions
Is there an exact formula for the perimeter of an ellipse?
Only as an infinite series or the elliptic integral 4a·E(e); there is no closed form with ordinary functions.
How do I draw an ellipse with string?
Fix two pins at the foci, 2c apart, tie a loop of string with total free length 2a, and trace with a pencil keeping it taut.
What happens if a = b?
Then c = 0 and e = 0, the ellipse is a circle, and all formulas reduce to the circle formulas.
Sources: S. Ramanujan, Modular equations and approximations to π, Quarterly Journal of Mathematics 45 (1914), 350–372 · NIST Digital Library of Mathematical Functions, §19.9 (elliptic integrals and the perimeter of an ellipse)