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.

Half the width and half the height of the ellipse. Either may be the longer one.
Leave 0 and 0 for an ellipse centred at the origin.
Perimeter (circumference)25.52699886
Area πab47.1238898
Semi-major and semi-minor axis
a = 5, b = 3
Focal distance c = √(a² − b²)
4
Foci
(−4, 0), (4, 0)
Vertices (ends of the major axis)
(−5, 0), (5, 0)
Co-vertices (ends of the minor axis)
(0, −3), (0, 3)
Eccentricity e = c / a
0.8
Perimeter by Ramanujan's second formula
25.52699886
Latus rectum length 2b² / a
3.6
Directrices
x = −6.25, x = 6.25
Equation
(x)² / 25 + (y)² / 9 = 1

Runs in your browser: nothing you enter is sent anywhere.

How to use it

  1. Enter the horizontal and vertical semi-axes (half the width and half the height).
  2. Optionally move the centre with h and k.
  3. Read the perimeter and area, then the foci, vertices and the rest.

Formulas

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.

More in Math

All tools in this category: Math ·Updated November 4, 2026

Privacy choices

Google Analytics shows us which tools are used and whether they work. It may set cookies. Your choice is kept in this browser.