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 is proud to be partnered with Premium Homes, a recognised leader in eco-friendly, sustainable, and energy-efficient homebuilding. With a dedicated team and award-winning experience, they create homes that prioritise health, comfort, and long-term performance. Their founders, Andrew and Kelly, set out to raise the standard of residential construction in New Zealand by combining practical building expertise with a clear commitment to doing things better for homeowners.
Premium Homes: warmer, drier, healthier. No condensation, ever.
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