Home › Math & Science › Ellipse Calculator
Ellipse Calculator
Use this free ellipse calculator to work out everything about an ellipse from its two semi-axes. Enter the semi-major axis a and the semi-minor axis b, and the calculator gives you the area, the perimeter, the eccentricity, and the positions of the foci — with a labelled diagram that redraws itself as you change the numbers.
a is the distance from the centre to the far end (half the major axis). b is the distance from the centre to the top (half the minor axis). If you measured the full axes, halve them first. If b is bigger than a, the calculator swaps them — a is always the longer one.
How the ellipse formulas work
An ellipse is the stretched-out cousin of a circle. Where a circle has one radius, an ellipse has two: the semi-major axis a, the distance from the centre to the far end along the longest direction, and the semi-minor axis b, the distance from the centre to the top along the shortest direction. Everything about the ellipse follows from those two numbers, which is why this calculator only asks for them.
Eccentricity e = √(1 − b² ÷ a²)
Focal distance c = √(a² − b²)
Perimeter ≈ π × [3(a + b) − √((3a + b)(a + 3b))] — Ramanujan's approximation
The area is the easiest of the four results. A circle of radius r has area πr², and an ellipse is a circle stretched by a factor of a in one direction and b in the other, so its area is π × a × b. With a = 5 and b = 3, the area is π × 5 × 3 = 47.12 square units. If a and b are equal, the formula becomes πa² — the circle formula — exactly as it should, since an ellipse with equal axes is a circle.
The perimeter is the one result that has no exact short formula. The true perimeter needs an elliptic integral, which cannot be written with ordinary arithmetic, so calculators use an approximation. This page uses Ramanujan's approximation, published by the mathematician Srinivasa Ramanujan: perimeter ≈ π × [3(a + b) − √((3a + b)(a + 3b))]. It is exact for a circle, and for most ellipses it is accurate to within a tiny fraction of a percent — far closer than any ruler measurement. It is labelled approximate on this page because it is an approximation.
Eccentricity, written e, measures how stretched the ellipse is, on a scale from 0 to just under 1. It is calculated as e = √(1 − b²/a²). An eccentricity of 0 means a perfect circle, values near 0 are nearly round, and values near 1 are long and thin. Earth's orbit around the Sun is an ellipse with an eccentricity of about 0.017 — nearly circular — while a comet's orbit can have an eccentricity of 0.9 or more. For a = 5 and b = 3, the eccentricity is √(1 − 9/25) = √0.64 = 0.80, a clearly stretched ellipse.
The foci are two points on the major axis, one on each side of the centre, at a distance c = √(a² − b²) from the centre. They define the ellipse: for any point on the curve, the sum of its distances to the two foci is always the same, equal to 2a. That is the property behind elliptical rooms where a whisper at one focus can be heard clearly at the other, and behind elliptical mirrors and reflectors that gather light or sound at a single point. For a = 5 and b = 3, c = √(25 − 9) = √16 = 4, so the foci sit 4 units either side of the centre and 8 units apart.
Two details keep the calculator honest. First, a is always the longer semi-axis by definition, so if you enter b bigger than a, the calculator swaps them and tells you — the shape is the same ellipse, just described with the axes named correctly. Second, the unit you pick is only a label: the maths is identical in centimetres, metres, inches, or feet, and the area is always in square units while the perimeter and focal distances are in the same units as a and b.
Worked example
An ellipse has semi-major axis a = 5 cm and semi-minor axis b = 3 cm. Find its area, perimeter, eccentricity, and foci.
Step 1: Area — π × a × b = π × 5 × 3 = 15π = 47.12 cm².
Step 2: Perimeter (Ramanujan) — 3(a + b) = 24, and √((3a + b)(a + 3b)) = √(18 × 14) = √252 = 15.87, so the perimeter is π × (24 − 15.87) = π × 8.13 = 25.53 cm (approximate).
Step 3: Eccentricity — √(1 − b²/a²) = √(1 − 9/25) = √0.64 = 0.80.
Step 4: Foci — c = √(a² − b²) = √(25 − 9) = √16 = 4, so the foci are at ±4 cm from the centre, 8 cm apart.
So the answer is: area 47.12 cm², perimeter about 25.53 cm, eccentricity 0.80, and foci at ±4 cm. Try the same numbers in the calculator above, then try a = 5 and b = 5 to watch the ellipse become a circle with eccentricity 0 and the foci merging into the centre.
FAQ
What is the difference between the major axis and the semi-major axis?
The major axis is the full length across the widest part of the ellipse, from one end to the other through the centre. The semi-major axis, usually written a, is half of that — the distance from the centre to the far end. Likewise, the semi-minor axis b is half the minor axis, the distance from the centre to the top or bottom. This calculator asks for the semi-axes a and b, so if you measured the full axes, halve them first.
Why is the ellipse perimeter only approximate?
Unlike the area, which has a simple exact formula, the perimeter of an ellipse has no exact formula using only basic arithmetic — it needs an elliptic integral. This calculator uses Ramanujan's approximation, which is accurate to within a tiny fraction of a percent for most ellipses and exact for a circle. For everyday work, the difference from the true perimeter is far too small to matter.
What is eccentricity, and what does it tell me?
Eccentricity, written e, measures how stretched an ellipse is. It runs from 0 to just under 1. An eccentricity of 0 means a perfect circle, values near 0 are nearly round, and values near 1 are long and thin. It is calculated as e = √(1 − b²/a²), where a is the semi-major axis and b is the semi-minor axis. Planetary orbits are ellipses with small eccentricities — Earth's is about 0.017, nearly circular.
What are the foci of an ellipse?
The foci are two points on the major axis, one on each side of the centre, at a distance c = √(a² − b²) from the centre. They define the ellipse: for any point on the curve, the sum of its distances to the two foci is always the same, equal to 2a. That property is why a whisper at one focus of an elliptical room can be heard clearly at the other focus, and why elliptical mirrors and reflectors focus light and sound.
What happens if a and b are equal?
If a and b are equal, the ellipse is a circle. The area formula πab becomes πa², the Ramanujan perimeter becomes 2πa, the eccentricity becomes 0, and the two foci merge into the centre. Try it in the calculator: enter a = 5 and b = 5 and you will get the area and circumference of a circle with radius 5.