An ellipse is the set of points whose distances to two fixed points, the foci, always add up to the same total. Loop a string around two pins, pull it tight with a pencil and trace, and you get one. A circle is the special case where the two foci coincide. This calculator works from the semi-axes, the full axis lengths, the semi-major axis with the eccentricity, or the semi-major axis with the area.
How to use the ellipse calculator
- Choose from the I know the menu: Semi-axes a and b, Full axes (major and minor axis lengths), Semi-major axis a and eccentricity e, or Semi-major axis a and area.
- Enter the values. The semi-major axis (a) is half the longest diameter and the semi-minor axis (b) is half the shortest. Eccentricity must be at least 0 and less than 1.
- Pick the units. You get the area, the perimeter by Ramanujan’s formula and by an exact series (with the percent difference), the focal distance, eccentricity, semi-latus rectum, flattening and both full axes.
Ellipse formulas
The area formula has a neat explanation: an ellipse is a unit circle stretched by a factor a in one direction and b in the other, so its area π × 1² is multiplied by a × b. The semi-latus rectum, b² ÷ a, is the half-width of the ellipse measured through a focus, and the flattening 1 − b ÷ a is the measure geodesists use for the shape of the Earth.
Worked example: an oval rug
An oval rug measures 8 ft by 5 ft. Choose Full axes and enter a major axis of 8 and a minor axis of 5, in feet.
- Semi-axes: a = 4 ft and b = 2.5 ft
- Area: π × 4 × 2.5 = 31.42 ft²
- Perimeter: 20.69 ft of binding tape; Ramanujan and the exact series agree to six decimals
- Focal distance: √(16 − 6.25) = 3.12 ft, eccentricity 0.78
To mark the outline on a sheet of backing, drive two nails 6.24 ft apart (2c) on the center line, tie an 8 ft string (2a) between them and trace around with a pencil, keeping the string taut.
Why the perimeter has no simple formula
Measuring the boundary means adding up tiny pieces of curve, which leads to the integral P = 4a ∫ √(1 − e² sin² t) dt from 0 to π/2. For a circle (e = 0) it collapses to 2πa, but for any other ellipse it is a complete elliptic integral of the second kind, and mathematicians proved in the 1800s that such integrals cannot be expressed with elementary functions. The perimeter can still be computed as precisely as you like. The calculator’s exact value uses Gauss’s arithmetic–geometric mean, an iteration that roughly doubles the number of correct digits at every step, so full precision arrives after a handful of rounds.
In 1914 Srinivasa Ramanujan published the approximation shown above. The table compares it with the popular shortcut π(a + b) for an ellipse with a = 1:
| b | Exact perimeter | Ramanujan error | π(a + b) error |
|---|---|---|---|
| 1 (circle) | 6.283185 | 0 | 0 |
| 0.75 | 5.525873 | under 0.0000001% | −0.51% |
| 0.5 | 4.844224 | under 0.0000001% | −2.72% |
| 0.25 | 4.289211 | −0.000025% | −8.44% |
| 0.1 | 4.063974 | −0.0012% | −14.97% |
| 0.01 | 4.001098 | −0.024% | −20.70% |
The shortcut is fine for nearly round shapes but badly underestimates flat ones. Ramanujan’s formula is good enough for any practical job, from cutting trim to sizing a race course.
Foci, orbits and whispering galleries
Kepler’s first law says each planet moves on an ellipse with the Sun at one focus. Earth’s orbit has a semi-major axis of about 149.6 million km and an eccentricity of about 0.0167. Choose Semi-major axis a and eccentricity e, enter 149.6 with millions of kilometers as your mental unit, and the semi-minor axis comes out at 149.579, only about 21,000 km shorter. The orbit looks like a circle, yet the Sun sits c ≈ 2.5 million km from its center, so Earth’s distance from the Sun ranges from about 147.1 to 152.1 million km over a year.
The foci also have a reflective property: sound or light leaving one focus bounces off the ellipse and passes through the other. Elliptical “whispering galleries” use this, and so do some medical lithotripters, which focus shock waves on a kidney stone.
For a circle use the circle calculator; for an oval with straight sides, the stadium calculator.
Frequently asked questions
What is the formula for the area of an ellipse?
A = πab, where a and b are the semi-major and semi-minor axes, half the longest and half the shortest diameter. An oval rug 8 ft by 5 ft has a = 4 ft and b = 2.5 ft, so its area is π × 4 × 2.5 ≈ 31.42 ft².
Why is there no simple exact formula for the perimeter of an ellipse?
The perimeter is a complete elliptic integral of the second kind, and that integral cannot be written as a finite combination of roots, powers, logarithms or trig functions. It can be computed to any precision, but only with an infinite series or an iterative method. Everyday formulas, such as Ramanujan's, are therefore approximations.
How accurate is Ramanujan's perimeter approximation?
Extremely accurate for normal shapes. When one axis is twice the other, it agrees with the exact value to better than one part in a billion. Even for a needle-thin ellipse the error stays at about 0.04% or less. The calculator shows both values and the percent difference between them.
What is eccentricity?
Eccentricity e = c ÷ a measures how stretched an ellipse is, where c is the distance from the center to each focus. A circle has e = 0, and e approaches 1 as the ellipse flattens. Earth's orbit has e ≈ 0.0167, so it is very nearly circular.
What happens if I enter a shorter value for a than for b?
The calculator always calls the longer semi-axis a, so it swaps the two values and adds a note. The area, perimeter and eccentricity come out the same either way.