MathsGeometry

Ellipse
calculator.

An ellipse needs only two numbers, and those give its area, edge length and foci.

How it's worked out

Half the longest width of an oval is the semi-major axis, written a. Half the shortest width is the semi-minor axis, b. Multiply them by π to get the area.

A\displaystyle A=πab\displaystyle {}= \pi a b

That is a circle stretched in one direction, so a 5 by 3 ellipse covers 15π, about 47.12. Two special points called foci sit on the long axis, each a distance c from the center. For every point on the curve, the distances to the foci add up to the full long axis, 2a.

c\displaystyle c=a2−b2\displaystyle {}= \sqrt{a^2 - b^2}
e\displaystyle e=ca\displaystyle {}= \frac{c}{a}

Eccentricity, e, says how far out the foci sit. A value of 0 is a circle. Values close to 1 are long and thin.

The edge length has no simple formula. The perimeter is 4a times an elliptic integral, a value that no finite mix of roots and powers can write down. The perimeter here comes from that integral, using the arithmetic-geometric mean, so it is good to about 15 digits. Ramanujan's two estimates are given too, for reference.

P\displaystyle P=4aE(e)\displaystyle {}= 4 a \, E(e)
How his two estimates hold up with a = 1, as b shrinks
bExactFirstSecond
0.755.5258735.5258735.525873
0.54.8442244.8442114.844224
0.254.2892114.2887514.28921
0.14.0639744.0605534.063927

Worked examples

Marta edges an oval tabletop

Marta has a table 180 cm long and 100 cm wide, so a is 90 and b is 50. Its surface is 14,137 cm², which is about 1.41 m² of veneer. She needs 448.8 cm of edge banding, before any overlap at the join.

To mark the shape on the board she places two pins 74.8 cm either side of the center. A loop of string around them, with a pencil pulling it tight, keeps the two distances adding up to 180 cm.

If her banding comes in a 500 cm roll, keeping the same 180 cm length, she could widen the table until b is 68.4 cm before the roll runs out.

Open this example in the tool

Theo checks how round Earth's orbit is

NASA lists Earth's closest point to the Sun as 147.095 million km and its farthest as 152.100 million km. Those two distances give a = 149.598 million km and e = 0.0167, which matches NASA's printed 0.0167.

The width comes out at 149.577 million km, only 0.014% shorter than the length. Drawn to scale, the orbit looks like a circle. The 2.503 million km offset of the Sun from the center is what changes the distance through the year.

Open this example in the tool

Ana traces the path of Halley's comet

NASA's comet sheet gives a = 17.94 AU and e = 0.967. An AU, or astronomical unit, is about Earth's average distance from the Sun. The width is 4.57 AU, so the path is more than three times as long as it is wide.

The comet swings in to about 0.59 AU and out to 35.3 AU. NASA prints a closest distance of 0.587 AU. That small gap is the size rounding e to three places can cause, since a tiny change in e moves that small number a lot.

Open this example in the tool

Reading your result

Area and perimeter do not move together. Halve b and the area halves too, but the perimeter does not. For a = 1, a b of 1 gives a perimeter of 6.28, while a b of 0.1 gives 4.06.

Eccentricity climbs fast near the end. With b at 0.1 of a, e is already 0.995. So an e of 0.5 is still a fairly round shape: b is about 87% of a.

A semi-latus rectum is the half-width of the ellipse measured straight up from a focus. It is the number orbit equations start from. Each directrix is a line outside the ellipse, and any point on the curve is always e times as far from a focus as from that line.

Common mistakes

  • Using full widths in the area formula. A 10 by 6 ellipse has a = 5 and b = 3, so its area is 15π, not 60π.
  • Averaging the axes for the perimeter. Treating the shape as a circle of radius (a + b) over 2 runs low, and the gap grows as the shape gets flatter.
  • Mixing units. The unit here is a label, so both lengths must already be in it. Area then comes out in that unit squared.
  • Calling any oval an ellipse. A stadium shape, two half circles joined by straight sides, is not one, and these formulas do not fit it.

Questions people ask

The length of the curve comes from an integral that cannot be written with roots, powers or other everyday functions. It can still be worked out to any accuracy you like. So "no formula" means no short one, not that the length is unknown.

Sources