Skip to content
LoveToCalc

Law — what does that mean?

Perimeter of an ellipse (Ramanujan)

An ellipse has no exact closed formula for its perimeter; Ramanujan’s approximation is within a fraction of a percent for ordinary shapes.

In Swedish: Ellipsens omkrets (Ramanujan)

Perimeter of an ellipse (Ramanujan)

The relation

P=π(3(a+b)−(3a+b)(a+3b))

An ellipse has no exact closed formula; Ramanujan's approximation is within a fraction of a percent for ordinary shapes.

P≈25.527cm

P equals π times ((3 times (5 plus 3)) minus the square root of (((3 times 5) plus 3) times (5 plus (3 times 3)))), equals π times ((3 times 8) minus the square root of ((15 plus 3) times (5 plus 9))), equals π times (24 minus the square root of (18 times 14)), equals π times (24 minus the square root of (252)), is approximately π times (24 minus 15.8745), is approximately π times 8.1255, is approximately 25.527 cm

Working7 steps

Practice questions

You are given

  • a=7cm
  • b=5cm

Round to 2 decimals.

Pick the unit your lengths are in. Areas are then labelled in square units and volumes in cubic units; nothing is converted.

Source: Ramanujan S (1914). Modular equations and approximations to π. Quarterly Journal of Pure and Applied Mathematics 45, 350–372. — checked October 21, 2026

The formula

a and b are the semi-axes, half the longest and half the shortest width. The formula is Ramanujan’s first approximation from 1914, cited under the formula; it is not exact, and no formula with finitely many roots and products is, because the exact perimeter is an elliptic integral.

Holds when the ellipse is not extremely flat. For b / a down to about 0.2 the error is below 0.1%; as b approaches 0 the formula underestimates, by 0.4% at the limit.

A worked example

Semi-axes of 5 and 3 cm: 3(5 + 3) = 24, (15 + 3)(5 + 9) = 18 · 14 = 252, √252 = 15.87, and P ≈ π · (24 − 15.87) = π · 8.13 ≈ 25.5 cm. The exact perimeter, from the integral, is 25.527 cm; the approximation is off by less than a hundredth of a per cent.

The circle as a check

With a = b = r the bracket is 6r − √(4r · 4r) = 6r − 4r = 2r, and P = 2πr: the circumference of a circle comes out exactly. Any proposed ellipse formula has to pass that test, and the common wrong one, π(a + b), passes it too and then drifts to 10% low for a flat ellipse, which is why Ramanujan’s is the one worth remembering.

Why there is no exact formula

The area is πab, exact and simple, because stretching a circle scales areas by a constant. The perimeter does not scale that way: a stretched circle’s edge is stretched more in some places than others, and summing it gives an integral with no closed form.

Common mistakes

Frequently asked questions

Is there a better approximation? Ramanujan’s second, with h = ((a − b) / (a + b))², is better still; this one is accurate enough for anything measured with a tape.

Where does the exact value come from? The complete elliptic integral of the second kind, 4a · E(e), evaluated numerically. A calculator with the function gives it; a formula does not.

What is a and what is b? a is the semi-major axis, the larger. The formula is symmetric, so swapping them changes nothing.

Looking for another letter? The formula solved for each one
Solved for each letter
Solve forRearrangedWith the numbersComes to
Pπ(3(a+b)−(3a+b)(a+3b))π(3(5+3)−(3·5+3)(5+3·3))25.5 cm

Last reviewed October 20, 2026 ·How pages are reviewed

GeometryAll formulas

Put this formula on your site

Copy the code into your page where the formula card should appear. It loads from lovetocalc.com, so it stays current on its own — all we ask is that the credit line comes with it.