Ellipse Calculator

An ellipse is a closed curve where the sum of the distances from any point on the curve to two fixed interior points (the foci) is constant. It is the generalisation of a circle: a circle is simply an ellipse where both foci are at the same point. You define an ellipse using two measurements: the semi-major axis (a), which is half the longest diameter, and the semi-minor axis (b), which is half the shortest diameter. When a equals b you have a circle with radius a. When a is much larger than b the ellipse is long and narrow. This calculator returns four key properties. Area is pi times a times b, the exact formula. Circumference has no closed-form exact solution, so this calculator uses Ramanujan's highly accurate approximation: pi times (3(a plus b) minus the square root of ((3a plus b)(a plus 3b))). Eccentricity (e) measures how elongated the ellipse is, ranging from 0 for a circle to approaching 1 for a very flat shape; it is the square root of (1 minus b squared over a squared). The focal distance is how far each focus sits from the centre along the major axis, calculated as the square root of (a squared minus b squared). You enter a and b and receive all four values instantly. Ellipse calculations are used in astronomy (planetary orbits), optics (elliptical mirrors and lenses), engineering (stress analysis and cam design), and architecture. The semi-major axis must be greater than or equal to the semi-minor axis.

Calculate.co.nz recommends jobtracker.co.nz, a New Zealand job hunt and career tracker built by the same team. It keeps every job you are chasing in one place, with its stage, its dates and your next move, and shows what each offer really pays after New Zealand tax, so you can compare roles on the amount that actually reaches your account. Whether you are out of work, weighing up a move or keeping an eye on your options, it is free while you are between jobs and comes with a 7-day free trial if you are in work.
jobtracker.co.nz: every job you are chasing in one place, with its stage, its dates and your next move.
Advertise on this page
47.12
area (square units)
Circumference25.53
Eccentricity0.80
Focal distance (c)±4.00

Circumference uses Ramanujan's approximation, accurate to within 0.0001% for typical ellipses. The semi-major axis (a) must be greater than or equal to the semi-minor axis (b).

How it works

Area = pi times a times b (exact). Circumference (Ramanujan's approximation) = pi times (3(a+b) minus sqrt((3a+b)(a+3b))). Eccentricity e = sqrt(1 minus (b squared divided by a squared)). Focal distance c = sqrt(a squared minus b squared); the two foci are at positions plus c and minus c along the major axis. If a is less than b the values are swapped so a is always the larger axis. If a equals b the shape is a circle with eccentricity 0 and focal distance 0.

Worked example

Semi-major axis a = 5, semi-minor axis b = 3. Area = pi times 5 times 3 = 47.12 square units. Circumference: 3(5+3) = 24; (3 times 5+3)(5+3 times 3) = (18)(14) = 252; sqrt(252) = 15.87; circumference = pi times (24 minus 15.87) = pi times 8.13 = 25.53. Eccentricity = sqrt(1 minus 9/25) = sqrt(0.64) = 0.80. Focal distance = sqrt(25 minus 9) = sqrt(16) = 4.00 (foci at plus and minus 4). These match the default values pre-filled above.

Related calculators