Conic section classifier
The conic section classifier takes the six coefficients of the general second-degree equation in two variables, Ax² + Bxy + Cy² + Dx + Ey + F = 0, and tells you exactly which curve it describes: a circle, an ellipse, a parabola or a hyperbola.
Run — free
Along with the type you get the discriminant B² − 4AC, whether the conic is rotated (a non-zero cross term), and — for central conics — the coordinates of the center. It is the classification step of analytic geometry done in one call, with the same code running free in your browser and through the paid API.
One equation, four possible curves
Every conic section — the curves you get by slicing a cone with a plane — can be written in the same general form: Ax² + Bxy + Cy² + Dx + Ey + F = 0. Which of the four families a given equation describes is decided entirely by the quadratic part, the coefficients A, B and C. The classical test computes the discriminant B² − 4AC. When it is negative the curve is an ellipse, with the special case of a circle when A equals C and there is no cross term. When it is exactly zero the curve is a parabola, the borderline case where the slicing plane is parallel to the side of the cone. When it is positive the curve is a hyperbola, the two-branched case. The conic section classifier applies this test for you: you send the six coefficients and receive the family, the discriminant that proves it, and the extra parameters that describe the curve.
How the classification is computed
The computation is the standard one from analytic geometry, with no approximations and no external calls. First every coefficient is checked to be a finite number, and the two inputs that cannot define a conic are rejected: all six coefficients equal to zero, which is no equation at all, and a zero quadratic part, which is a straight line rather than a conic. Then the discriminant B² − 4AC decides the family as described above. Two more facts come out of the same arithmetic. The equation is reported as rotated whenever the cross coefficient B is non-zero, because a cross term means the axes of the curve are tilted relative to the coordinate axes and you would need a rotation to remove it. And when 4AC − B² is not zero — that is, for circles, ellipses and hyperbolas, the so-called central conics — the center of the curve is returned, found by solving the two linear equations 2Ax + By = −D and Bx + 2Cy = −E. Parabolas have no center, so the field is simply omitted there.
Where it fits in real work
Students use the classifier to check homework: work the discriminant by hand, then confirm the answer here before moving on to vertices, foci or asymptotes. Teachers use it to generate exercises with known answers, picking coefficients that land on each family. Developers use it anywhere a second-degree equation appears as data — computer graphics, orbit and antenna design, camera calibration, optimization problems — and the software needs to branch on what the curve actually is before it can draw it or reason about it. The endpoint runs on our global edge, keeps nothing you send, and costs $0.002 per request when you automate it. The identical code runs free in your browser on this page, so you can classify one equation by hand, study the discriminant and center it returns, and only pay when you integrate the same check into a pipeline that classifies thousands of equations a day.
What you can do with it
Check an analytic geometry exercise
Confirm that x² + 4xy + y² − 3 = 0 is a hyperbola and that its discriminant is positive before solving for its asymptotes.
Branch on curve type in graphics code
Classify a fitted second-degree equation before choosing the drawing routine for an ellipse, parabola or hyperbola.
Generate teaching material with known answers
Pick coefficients, classify them through the API, and build worksheets where every problem's family is guaranteed correct.
FAQ
What does it cost?
$0.002 per request via the API. It is also free to run in your browser on this page.
What form must the equation be in?
General form: Ax² + Bxy + Cy² + Dx + Ey + F = 0. You send the six coefficients a through f as numbers.
How is the conic type decided?
By the discriminant B² − 4AC: negative gives an ellipse (a circle when A = C and B = 0), zero gives a parabola, and positive gives a hyperbola.
What does the rotated flag mean?
It is true whenever the cross coefficient B is non-zero, which means the curve's axes are tilted relative to the coordinate axes.
Why does a parabola have no center in the output?
Parabolas are not central conics: the system that locates a center has no solution for them, so the field is omitted.
What input is rejected?
Any coefficient that is not a finite number, all six coefficients being zero, and a zero quadratic part (a, b and c all zero), which describes a line, not a conic.
For developers — API access
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.
API endpoint
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.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/math/conic-sections \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"a":1,"b":0,"c":1,"d":0,"e":0,"f":-25}'const res = await fetch("https://api.kit.forhosting.com/math/conic-sections", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"a": 1,
"b": 0,
"c": 1,
"d": 0,
"e": 0,
"f": -25
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/math/conic-sections",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"a": 1,
"b": 0,
"c": 1,
"d": 0,
"e": 0,
"f": -25
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/math/conic-sections", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"a":1,"b":0,"c":1,"d":0,"e":0,"f":-25}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"a":1,"b":0,"c":1,"d":0,"e":0,"f":-25}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/math/conic-sections", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"a": 1,
"b": 0,
"c": 1,
"d": 0,
"e": 0,
"f": -25
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "math.conic_sections",
"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.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |