Ellipse calculator
Enter the horizontal and vertical semi-axes and, if you like, the centre. The calculator finds the foci, vertices, eccentricity, area and perimeter — exactly to rounding and with Ramanujan's approximation — and writes the equation.
Runs in your browser: nothing you enter is sent anywhere.
How to use it
- Enter the horizontal and vertical semi-axes (half the width and half the height).
- Optionally move the centre with h and k.
- Read the perimeter and area, then the foci, vertices and the rest.
With a ≥ b the semi-major and semi-minor axes:
- c = √(a² − b²), eccentricity e = c / a
- area = πab
- latus rectum = 2b² / a; directrices at a / e from the centre
- equation: (x − h)² / rx² + (y − k)² / ry² = 1
The perimeter uses the arithmetic–geometric mean: P = 2π / AGM(a, b) × (a² − Σ 2ⁿ⁻¹ cₙ²), with c₀² = a² − b² and cₙ₊₁ = (aₙ − bₙ) / 2.
Worked example
Semi-axes 5 and 3, centred at the origin: c = 4, foci (±4, 0), vertices (±5, 0), co-vertices (0, ±3), e = 0.8, area 15π ≈ 47.124 and perimeter ≈ 25.527. Ramanujan’s formula agrees to about ten significant digits.
Tips
- The sum of the distances from any point on the ellipse to the two foci is always 2a — the gardener’s string method for drawing one.
- For a circle enter the same value twice; the perimeter is then 2πr.
Frequently asked questions
How do you find the foci of an ellipse?
With a the semi-major and b the semi-minor axis, the foci are c = √(a² − b²) from the centre along the major axis. For a = 5 and b = 3, c = √16 = 4, so with the centre at the origin the foci are (−4, 0) and (4, 0).
Is there an exact formula for the perimeter of an ellipse?
Not in elementary functions: it is an elliptic integral. The calculator evaluates it with the arithmetic–geometric mean, which converges in a few steps to full double precision, and also shows Ramanujan's second approximation π(a + b)(1 + 3h / (10 + √(4 − 3h))), h = (a − b)² / (a + b)², which is extremely close for most shapes.
What is the eccentricity?
e = c / a, a number from 0 to just under 1 that says how stretched the ellipse is. A circle has e = 0; a very flat ellipse has e close to 1. For a = 5, b = 3, e = 4 / 5 = 0.8.
What is the area of an ellipse?
π × a × b. For semi-axes 5 and 3 it is 15π, about 47.124.
Which axis is the major axis?
The longer one. If the vertical semi-axis is longer, the foci and vertices lie on a vertical line through the centre, and the calculator reports them that way.