ForHosting KIT · Math

Ellipse standard form

4x² + 9y² − 8x − 18y − 23 = 0 is an ellipse centered at (1, 1) with semi-axes 3 and 2 and no rotation. Enter the six coefficients of a general equation and get its center, semi-axes and tilt. Free in your browser.

  • Free
  • Runs in your browser
  • No sign-up
  • Your data stays on your device
Use it from WebAPIEmailTelegramApp soon
If you enter
A
4
B
0
C
9
D
-8
E
-18
F
-23
You get
Semi major
3
Semi minor
2
Rotation deg
0

The conversion is exact algebra: completing the square for the center, and an eigenvalue decomposition of the quadratic form for the axes. The same code runs free in your browser on this page.

From the general equation to the standard form

Getting from one to the other is two steps. First, find the center by solving the linear system 2A·h + B·k = −D and B·h + 2C·k = −E — this is the point where both partial derivatives vanish, and completing the square around it eliminates the linear terms. Second, eliminate the cross term B·x·y.

When B is zero the ellipse is already axis-aligned and the semi-axes follow directly from dividing the remaining constant; when B is not zero the quadratic part is a symmetric 2×2 matrix whose eigenvalues give the squared denominators and whose eigenvectors give the rotation angle.

How it checks the equation is really an ellipse

The same six-coefficient equation can describe any conic section, so validation comes before conversion. The key quantity is the discriminant B² − 4AC. A negative discriminant is necessary but not sufficient: after translating to the center, the constant term must be non-zero — otherwise the equation holds only at the center itself, a degenerate point ellipse — and it must have the opposite sign of the quadratic part, otherwise no real point satisfies the equation at all, the so-called imaginary ellipse.

Both cases are rejected with a message that names the failure. Only when all three checks pass does the response carry the center, the semi-major and semi-minor axes, and the rotation of the major axis in degrees, normalized to the half-open interval from 0 to 180 because an axis direction has no orientation. Equal semi-axes mean the ellipse is a circle, which the response notes explicitly.

Where it is used and what it costs

General-form conics appear wherever curves are fitted or intersected algebraically: least-squares ellipse fitting in computer vision returns exactly these six coefficients, as do collision shapes in physics engines, antenna footprints in satellite link budgets, and the confidence ellipses of a covariance matrix in statistics. In every case the standard form is what you actually need downstream — to draw the curve, to test point containment, to compute the area or the eccentricity — and doing the conversion by hand means redoing the eigenvalue computation carefully every time.

Prototype for free, and pay only when you automate — batch conversion of fitted conics, validation inside a graphics pipeline, or an app that needs the standard form on demand.

Read geometry from a fitted conic

Ellipse-fitting algorithms in vision and metrology return the six general coefficients; convert them to center, axes and rotation in one call.

Classify a conic safely

Feed any quadratic and learn whether it is a real ellipse, a hyperbola, a parabola or a degenerate case — from a clear error, not a NaN.

What does it cost?

The same computation is free in your browser on this page.

Which equation form does it accept?

Send the six coefficients as the fields a through f.

How is the rotation angle defined?

It is the angle in degrees of the major axis measured from the positive x-axis, normalized to [0, 180) because an axis direction is unoriented. For a circle the angle is arbitrary and the response says so.

How accurate is the result?

The conversion is closed-form algebra — completing the square plus a 2×2 eigen decomposition — exact up to floating-point, with output rounded to six decimals for byte-stable responses.

Is anything stored?

No. The coefficients are processed and discarded; only the result is returned.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/math/ellipse-standard-form

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.

curl -X POST https://api.kit.forhosting.com/math/ellipse-standard-form \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"a":4,"b":0,"c":9,"d":-8,"e":-18,"f":-23}'
{
  "a": 4,
  "b": 0,
  "c": 9,
  "d": -8,
  "e": -18,
  "f": -23
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "math.ellipse_standard_form",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

The ellipse standard form API takes the six coefficients of a general quadratic equation — A·x² plus B·x·y plus C·y² plus D·x plus E·y plus F equals zero — and returns the ellipse it describes in standard form: the center, the semi-major and semi-minor axes, and the rotation angle of the major axis. If the coefficients describe a hyperbola, a parabola, a single point, or no real curve at all, the request is rejected with a clear error instead of a meaningless answer.

From the general equation to the standard form

Every ellipse in the plane, however rotated or displaced, can be written as A·x² + B·x·y + C·y² + D·x + E·y + F = 0, and every ellipse textbook prefers the standard form (x−h)²/a² + (y−k)²/b² = 1 because the geometry is visible at a glance: the center (h, k), the semi-axes a and b. This endpoint performs both steps with closed-form arithmetic — no iteration, no numerical search — so the result is exact up to floating-point rounding, which is fixed at six decimals to keep responses byte-stable across machines and runs.

How the endpoint decides it is really an ellipse

A negative value means the quadratic form is definite and the curve belongs to the ellipse family; zero is a parabola, a positive value is a hyperbola, and both are rejected with an invalid_input error that states the discriminant so you can see why.

Where it is used and what it costs

Here it is one POST with six numbers. The call runs on our global edge, keeps nothing, and contains no randomness or clock dependence, so it is safe to cache and memoize.

Batch-convert conic catalogs

Loop over stored coefficient sets from a simulation or survey and attach center and semi-axes to each record at $0.002 per call.

What if the equation is not an ellipse?

It is rejected with an invalid_input error: a non-negative discriminant B²−4AC means hyperbola or parabola, and a degenerate or imaginary ellipse is also refused, with a message naming the cause.

Read the full KIT documentation →