Perimeter of an Ellipse

On the Ellipse page we looked at the definition and some of the simple properties of the ellipse, but here we look at how to more accurately calculate its perimeter.

Perimeter

Rather strangely, the perimeter of an ellipse is very difficult to calculate!

There are many formulas, here are some interesting ones. (Also see Calculation Tool below.)

First Measure Your Ellipse!

ellipse major and minor axes

a and b are measured from the center, so they are like "radius" measures.

 

Approximation 1

This approximation is within about 5% of the true value, so long as a is not more than 3 times longer than b (in other words, the ellipse is not too "squashed"):

p ≈ 2π a2+b22

Approximation 2

The famous Indian mathematician Ramanujan came up with this better approximation:

ellipse perimeter approx pi [ 3(a+b) - sqrt((3a+b)(a+3b))]

Approximation 3

Ramanujan also came up with this one. First we calculate "h":

h = (a − b)2(a + b)2

Then use it here:

p ≈ π(a+b) ( 1 + 3h10 + (4−3h) )

Infinite Series 1

This is an exact formula, but it needs an "infinite series" of calculations to be exact, so in practice we still only get an approximation.

First we calculate e (the "eccentricity", not Euler's number "e"):

e = a2 − b2a

Then use this "infinite sum" formula:

ellipse perimeter approx 2a pi [ 1 - sigma i=1 to infinity of ( (2i)!^2/(i!2^i)^4 times e^21/(2i-1))]

Which may look complicated, but expands like this:

ellipse perimeter approx 2a pi [ 1 - (1/2)^2 e^2 - (1x3/2x4)^2 e^4 /3 - (1x3x5/2x4x6)^2 e^6 /5 - ... ]

The terms continue on infinitely, and unfortunately we must calculate a lot of terms to get a reasonably close answer.

Infinite Series 2

But my favorite exact formula (because it gives a very close answer after only a few terms) is as follows:

First we calculate "h":

h = (a − b)2(a + b)2

Then use this "infinite sum" formula:

ellipse perimeter approx pi(a+b) sigma n=0 to infinity of (0.5 choose n)^2 h^n

(Note: the combinations-half-n is the Binomial Coefficient with half-integer factorials ... wow!)

It may look a bit scary, but it expands to this series of calculations:

ellipse perimeter approx pi(a+b) (1 + (1/4)h + (1/64)h^2 + (1/256)h^3 + ...)

The more terms we calculate, the more accurate it becomes (the next term is 25h4/16384, which is getting quite small, and the next is 49h5/65536, then 441h6/1048576, then 1089h7/4194304)

The Perfect Formula

There is a perfect formula using an integral:

p = 4a
π/2
0
√(1 − e2 sin2 θ) dθ

(Note: e is the eccentricity from above)

But calculating it needs an infinite amount of terms ("Infinite Series 1" above).

Comparing

Just for fun, I calculate the perimeter using the three approximation formulas, and the two exact formulas (but only the first four terms, including the "1", so it is still just an approximation) for selected values of a and b:


  Circle


Lines
    ellipse 10 10 ellipse 10 5 ellipse 10 3 ellipse 10 1 ellipse 10 0
a:   10 10 10 10 10
b:   10 5 3 1 0
Approx 1:   62.832 49.673 46.385 44.65 44.429
Approx 2:   62.832 48.442 43.857 40.606 39.834
Approx 3:   62.832 48.442 43.859 40.639 39.984
Series 1:   62.832 48.876 45.174 43.204 42.951
Series 2:   62.832 48.442 43.859 40.623 39.884
Exact*:   20π


40


* Exact:

They all get the perimeter of the circle correct, but only Approx 2 and 3 and Series 2 get close to the value of 40 for the extreme case of b=0.

Ellipse Perimeter Calculations Tool

This tool does the calculations from above, but with more terms for the Series.

images/ellipse-perim.js