Conic Section Calculator

The general mode classifies any second-degree equation, rotates away the xy term when there is one, completes the square, and reports the centre, vertices, foci, eccentricity and more, with a graph.

Disclaimer: This calculator gives estimates for general information only. It is not financial, medical or other professional advice. Results come from the exact geometry of the conic you enter; near-degenerate inputs are decided with the numerical tolerance stated in the limitations.

What this calculator does

Every second-degree equation in x and y draws one of a small family of curves: the conic sections, so called because each one is the shape a plane makes when it slices a cone. This page works in both directions. Give it the general equation A x² + B xy + C y² + D x + E y + F = 0 and it classifies the curve, removes the xy term by rotating the axes when there is one, completes the square, and reports the standard form with the centre or vertex, the vertices, foci, eccentricity, directrices, latus rectum and, for an ellipse, its area and perimeter, all with a graph. Or start from the geometry instead: an ellipse from its centre and semi-axes (with an arc-length measurement between two angles), a parabola from its vertex and focal length, or a hyperbola from its centre and semi-axes. Degenerate cases are named honestly: a single point, two intersecting or parallel lines, one line, or no real points at all.

How to use it

  • General equation mode takes the six coefficients exactly as your equation is written, including zeros. 9x² + 4y² − 36 = 0, the loaded example, is A = 9, B = 0, C = 4, D = 0, E = 0, F = −36.
  • The xy coefficient B is allowed. A nonzero B means the conic’s axes are tilted; the page reports the rotation angle and gives the features in ordinary x, y coordinates, so you never have to rotate anything by hand.
  • Parameter modes take the semi-axis a as the major (ellipse) or transverse (hyperbola) semi-axis, the one the vertices and foci sit on. For the ellipse you also get the length of the arc between two parameter angles, measured numerically.
  • Read the eccentricity first. It is one number that states the type and the shape at a glance: 0 is a circle, between 0 and 1 an ellipse, exactly 1 a parabola, above 1 a hyperbola.

The method

Classifying by the discriminant

The quantity B² − 4AC sorts the family before any algebra: negative means the ellipse family (ellipse, circle, a point, or no real points), zero means the parabola family, and positive means the hyperbola family (hyperbola, or two intersecting lines). It works because B² − 4AC does not change when the axes are rotated, so it can be read straight from the equation as written.

Removing the xy term

When B is not zero, the axes are rotated through the angle θ with tan 2θ = B / (A − C). In the rotated coordinates (x′, y′) the cross term vanishes and the equation becomes A′x′² + C′y′² + D′x′ + E′y′ + F = 0, ready for completing the square. Every feature is then computed in the rotated frame and carried back to x, y by the inverse rotation, which is why the foci and vertices printed are the ones on your graph.

Completing the square and reading the features

For a central conic the completed square gives (x′ − h′)² / a² ± (y′ − k′)² / b² = 1, with the plus sign for an ellipse and the minus for a hyperbola. The focal distance follows from c² = |a² − b²| (minus for the ellipse, plus for the hyperbola), the eccentricity is e = c / a, the vertices sit a units from the centre along the major or transverse axis, the foci c units along the same axis, the directrices are the lines at distance a / e from the centre perpendicular to that axis, and the latus rectum, the chord through a focus parallel to the directrix, has length 2b² / a. A parabola completes to (x′ − h′)² = 4p (y′ − k′), with the focus p units from the vertex along the axis and the directrix the line p units behind it, and its eccentricity is exactly 1 by definition.

Ellipse perimeter and arc length

An ellipse’s perimeter has no elementary closed form, so the page uses Ramanujan’s second approximation, π [3(a + b) − √((3a + b)(a + 3b))], whose error is tiny for ordinary eccentricities (far below the displayed precision unless the ellipse is extremely flat). Arc length between two parameter angles is an elliptic integral, so it is measured numerically by Simpson’s rule on the exact parametric speed √ (a² sin² t + b² cos² t), with 2,000 slices; the stated values are accurate to about a millionth for ordinary inputs.

Worked examples

An ellipse from its equation (the loaded defaults). 9x² + 4y² − 36 = 0 divides by 36 into x² / 4 + y² / 9 = 1: centre (0, 0), semi-major a = 3 along y, semi-minor b = 2, c = √5 ≈ 2.23607, eccentricity ≈ 0.745356, vertices (0, ±3), co-vertices (±2, 0), foci (0, ±2.23607), area 6π ≈ 18.8496, perimeter ≈ 15.865.

A parabola. x² − 4y = 0 is A = 1, E = −4, the rest zero: y = x² / 4, vertex (0, 0), 4p = 4 so p = 1, focus (0, 1), directrix y = −1, latus rectum 4.

A hyperbola. 9x² − 16y² − 144 = 0 becomes x² / 16 − y² / 9 = 1: a = 4, b = 3, c = 5, eccentricity 1.25, vertices (±4, 0), foci (±5, 0), asymptotes y = ± (3/4) x, latus rectum 4.5, directrices x = ±3.2.

A rotated conic. xy − 1 = 0 (A = 0, B = 1, C = 0, F = −1) has discriminant 1, a hyperbola, tilted at 45 degrees. Rotating gives x′² − y′² = 2, so a = b = √2: a rectangular hyperbola with eccentricity √2 ≈ 1.41421, vertices (1, 1) and (−1, −1), foci (√2, √2) and (−√2, −√2), and the coordinate axes themselves as asymptotes.

From the geometry. The ellipse with centre (1, 2), a = 5, b = 3, major axis horizontal (the ellipse mode’s defaults) has c = 4 and eccentricity 0.8, foci (5, 2) and (−3, 2), vertices (6, 2) and (−4, 2), area 15π ≈ 47.1239, perimeter ≈ 25.527, and a quarter arc (0 to 90 degrees) of ≈ 6.38175.

Reading your result

The standard form is the result to quote: it shows the type, the centre or vertex, and both semi-axes in one line. Vertices are where the curve meets its major or transverse axis, the extreme points of an ellipse and the nearest points of a hyperbola’s two branches; foci are the working points of the conic, the ones that define it (every point of a parabola is the same distance from its focus as from its directrix; for an ellipse the two focal distances add to 2a, and for a hyperbola they differ by 2a). Eccentricity compresses the shape into one number: near 0 a conic is nearly circular, near 1 (from below) an ellipse is long and thin, and a hyperbola’s eccentricity measures how wide its branches open, with √2 the rectangular case whose asymptotes are perpendicular. When the axes are rotated, read the rotation angle together with the standard form: the form is written in the tilted coordinates, while every point listed (centre, vertices, foci) is given in plain x, y.

Limitations

  • Coefficients are read as decimals, with a tolerance. Classification near a boundary (a discriminant within about a billionth of zero, relative to the coefficients’ size) is genuinely undecidable in decimal arithmetic; the page decides with a stated relative tolerance and names degenerate outcomes rather than forcing a type.
  • Degenerate inputs get degenerate answers. A point, an empty set, or lines are correct results for equations like x² + y² = 0 or x² − y² = 0, and the page says which, instead of inventing a centre and foci.
  • Perimeter and arc length are approximations by design. No exact elementary formula exists for either; the methods used (Ramanujan’s second approximation, Simpson’s rule with 2,000 slices) are stated with the result, and their error is far below display precision for ordinary shapes, growing only for extremely flat ellipses.
  • The graph is a sketch to scale, not a survey. It is drawn from the same computed features and is meant for reading shape, orientation and relative position; the numbers in the table are the precise result.

Frequently asked questions

How can I tell which conic an equation is before calculating?

Compute B² − 4AC in your head: negative, ellipse family; zero, parabola family; positive, hyperbola family. Then check the special cases: A = C with B = 0 points to a circle, and equal x² and y² coefficients of opposite sign (after rotation, a = b) point to a rectangular hyperbola. The discriminant cannot see degeneracy, though: x² + y² = 0 passes the ellipse test and is a single point, which is why this page completes the square as well instead of stopping at the discriminant.

What does the xy term actually do?

It tilts the conic. Without it, every ellipse and hyperbola has its axes parallel to the coordinate axes and every parabola opens straight up, down, left or right. With it, the whole figure is rotated through the angle the page reports, while its size, shape and eccentricity stay exactly the same. A circle is the exception: it looks identical from any angle, so its xy coefficient is always zero in any honest equation for one.

Why is there no exact formula for the ellipse perimeter?

Because the arc length integral of an ellipse is an elliptic integral, a class of integrals proved not to be expressible in elementary functions. That is a theorem, not a gap in effort: every calculator either approximates (as this one does, with the method and accuracy stated) or quietly uses the same approximations without saying so. For circles the problem vanishes, since the speed is constant and the perimeter is exactly 2πr.

What is the latus rectum for?

It is the chord through a focus parallel to the directrix (perpendicular to the axis), and its length, 2b² / a for central conics and 4p for a parabola, measures the width of the conic at its focus. It shows up wherever the focus does the work: the width of a parabolic reflector at its focal plane, or of a hyperbolic mirror, is set by it.

Related calculators

Method: classification by the discriminant B² − 4AC with a stated relative tolerance; rotation of axes by θ with tan 2θ = B / (A − C) when B is nonzero; completing the square in the rotated frame; focal distance c² = |a² − b²|; eccentricity e = c / a; ellipse perimeter by Ramanujan’s second approximation; ellipse arc length by Simpson’s rule with 2,000 slices on the exact parametric speed. All fixtures verified against independently computed values. Last reviewed: 23 October 2026.