Home › Geometry › Ellipse Calculator
Ellipse Calculator
Computes the area, approximate perimeter (Ramanujan's second approximation), eccentricity and focal distances of an ellipse from its semi-major and semi-minor axes.
When to use
You need the area or circumference of an ellipse or oval, or the position of its foci, from the two half-axes.
Do not use when: Both axes are equal (use circle for exact results) or you need the arc length of part of an ellipse, which requires elliptic integrals.
Formula
area = π·a·b; h = ((a − b) / (a + b))²; perimeter ≈ π·(a + b)·(1 + 3h / (10 + √(4 − 3h))) (Ramanujan 1914, second approximation); eccentricity = √(1 − b²/a²); c = √(a² − b²)
The exact perimeter is a complete elliptic integral of the second kind with no closed form; Ramanujan's second approximation is used because its error is negligible for practical axis ratios.
Inputs
| Parameter | Type | Unit | Required | Description |
|---|---|---|---|---|
semi_major_a | number | units | yes | Half of the longest diameter (centre to the farthest point). Range: > 0 |
semi_minor_b | number | units | yes | Half of the shortest diameter. If larger than a, the two are swapped. Range: > 0 |
Outputs
| Output | Type | Unit | Description |
|---|---|---|---|
area | number | units² | π × a × b. |
perimeter | number | units | Ramanujan's second approximation; relative error below 4·10⁻⁵ % for a/b ≤ 5 and about 0.04 % as b → 0. |
eccentricity | number | e = √(1 − b² / a²); 0 for a circle, approaching 1 for a very flat ellipse. | |
linear_eccentricity | number | units | c = √(a² − b²), distance from the centre to each focus. |
distance_between_foci | number | units | 2 × c. |
Example
a = 5, b = 3: {"semi_major_a":5,"semi_minor_b":3} → {"area":47.1239,"perimeter":25.527,"eccentricity":0.8,"linear_eccentricity":4,"distance_between_foci":8}
a = 7, b = 4: {"semi_major_a":7,"semi_minor_b":4} → {"area":87.9646,"perimeter":35.2032,"eccentricity":0.8207,"linear_eccentricity":5.7446}
GET https://tttkmbb.com/api/v1/calculate/ellipse?semi_major_a=5&semi_minor_b=3
Machine access
- API:
GET https://tttkmbb.com/api/v1/calculate/ellipse(query parameters) orPOSTwith a JSON body{"inputs": {...}} - Schema: https://tttkmbb.com/api/v1/calculators/ellipse · Markdown: https://tttkmbb.com/geometry/ellipse.md · JSON definition: https://tttkmbb.com/geometry/ellipse.json
- MCP: server
https://tttkmbb.com/mcp, toolrun_calculator with calculator_id="ellipse" - OpenAPI operationId:
calculate_ellipse_properties - Freshness:
static. Authentication: none. Rate limit: fair use (see rate limits).
Sources
- Wikipedia – Ellipse – circumference (reference)
- Wolfram MathWorld – Ellipse (reference)
FAQ
Do I enter the full axes or the half-axes?
The half-axes (semi-axes), measured from the centre. If you know the full width and height of the oval, halve them first.
How accurate is the perimeter?
Ramanujan's second formula is exact for a circle and within 0.00004 % up to an axis ratio of 5:1; the worst case (a degenerate ellipse with b = 0) is about 0.04 % low.
Related calculators
- Circle Calculator — Exact results when both axes are equal.
- Area Converter — Convert the area to another unit.