Discriminant and root type calculator
Know how many real solutions a quadratic has before solving it: for x² − 5x + 6 the discriminant is 25 − 24 = 1, which is positive, so there are two distinct real roots. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- A
- 1
- B
- -5
- C
- 6
- Equation
- x² - 5x + 6 = 0
- Discriminant
- 1
- Delta
- 1
- Root type
- two_distinct_real
A discriminant and root type calculator turns three quadratic coefficients into the single number that decides how many real solutions the equation has, plus a clear label you can show next to homework or pipeline logs. Enter a, b, and c for ax squared plus bx plus c equals zero; the tool returns Δ equals b squared minus four a c, a readable equation string, step-by-step substitution, the integer count of real roots, and a descriptive root-type label—two distinct real roots when Δ is positive, one repeated real root when Δ is zero, or no real roots when Δ is negative. Homework checks, exam prep, graphing intuition, and coding kata expected values all need that same sign-of-Δ decision without opening a computer-algebra system.
What the discriminant tells you about the roots
A quadratic equation in standard form is a times x squared plus b times x plus c equals zero, where a is nonzero and b and c are known real numbers. The discriminant is defined by the closed formula delta equals b squared minus four a c. That single real number completely determines the nature of the roots of a real-coefficient quadratic without computing the roots themselves.
When delta is strictly positive the graph of y equals ax squared plus bx plus c crosses the x-axis twice, so there are two distinct real solutions given by the quadratic formula with a nonzero square-root term. When delta is exactly zero the parabola is tangent to the x-axis at its vertex, and there is exactly one real solution of multiplicity two—often called a repeated or double root.
When delta is negative the graph never meets the x-axis over the reals; the two roots form a complex conjugate pair whose imaginary parts come from the square root of a negative number. Teachers and automated graders care about the zero-a rejection as much as the three sign cases: a student who plugs a equals zero into the quadratic formula has left the domain of this tool, and a silent fallback to linear solving would hide that mistake.
The check path recomputes b squared and four a c with the same fixed rounding used for published fields, so a successful response always ships with steps you can assert in tests or worksheets. The descriptive label field restates the classification in plain English so UI clients can display root type without mapping machine tokens themselves.
Practical tips, limits, and related searches
Keep coefficients inside the published absolute range so b squared and four a c cannot overflow into a non-finite discriminant that the solver must reject. Prefer sending numbers rather than pre-formatted strings when you control the client; string numbers are accepted only when they match a strict finite numeric pattern. Near-zero discriminants after floating cancellation are classified as a repeated real root so noise does not flip a double-root problem into two nearly equal real roots.
Prefer this capability when you already have a, b, and c and only need the sign classification and a label for display; if your source is a word problem, extract the three coefficients first.
What you can do with it
Homework checks for root classification
Students enter a, b, and c from textbook quadratics and compare hand-written Δ, root type label, and real-root count against a deterministic result before submitting.
Pre-flight before calling a root finder
Pipelines classify root type from Δ first, then branch to real or complex root extraction only when the discriminant class matches the downstream algorithm.
FAQ
What is the discriminant of a quadratic?
Its sign tells you whether the roots are two distinct reals, one repeated real, or a complex conjugate pair with no real roots.
Does a zero discriminant mean no solution?
No. Δ = 0 means exactly one real root of multiplicity two (a double root at the vertex).
Does this return the actual roots?
Use a quadratic-formula solver if you need the root values.
Is the discriminant and root type calculator free?
The browser tool is free and runs locally.
What does a negative discriminant tell me about the graph?
The parabola never touches the x-axis, so the equation has no real roots; its two roots are complex conjugates. A positive discriminant means the graph crosses the axis twice, and zero means it just touches it at the vertex.
Related tools
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/algebra/quadratic-discriminant-type \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"a":1,"b":-5,"c":6}'const res = await fetch("https://api.kit.forhosting.com/algebra/quadratic-discriminant-type", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"a": 1,
"b": -5,
"c": 6
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/algebra/quadratic-discriminant-type",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"a": 1,
"b": -5,
"c": 6
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/algebra/quadratic-discriminant-type", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"a":1,"b":-5,"c":6}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"a":1,"b":-5,"c":6}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/algebra/quadratic-discriminant-type", 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": -5,
"c": 6
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "algebra.quadratic_discriminant_type",
"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. |
Technical notes
When the leading coefficient a is zero the expression is not a quadratic, so the API returns a clear invalid_input error instead of pretending a linear equation is a parabola.
How to call the API and what comes back
The leading coefficient a must be nonzero; values whose absolute value is at or below one times ten to the minus fifteen are treated as zero and rejected. Pin those rounded numbers in your client tests so a future coefficient scale change cannot silently flip sign classification without breaking goldens. Send a JSON body with three required finite numbers: a (aliases coeff_a and leading), b (aliases coeff_b and linear), and c (aliases coeff_c and constant). Absolute values must stay within the published limit of one trillion so intermediate products remain finite in IEEE double precision on the Worker and in the browser. On success the response echoes rounded a, b, and c, sets equation to a human-readable left equals zero string, discriminant and delta to the same rounded Δ value, formula to the string Δ equals b squared minus four a c, root_type to one of two_distinct_real, one_repeated_real, or no_real_roots, real_roots and complex_roots to the integer counts that match that class, label to a short English phrase such as two distinct real roots, message to a slightly longer summary, and steps to an ordered array of substitution lines. Failed validation—missing fields, non-finite numbers, values outside absolute limits, a non-finite discriminant, or a equals zero—returns invalid_input and is never charged. Pricing is a flat $0.002 per successful request with unit item and zero marginal unit price.
Practical tips, limits, and related searches
When teaching, pair examples: one x squared minus five x plus six yields delta equals one and two distinct real roots; x squared minus two x plus one yields delta zero and a double root; x squared plus one yields delta negative and no real roots; and a equals zero with any b and c demonstrates the hard invalid_input path. This landing targets people searching for a discriminant and root type calculator, b squared minus four a c with real-root count, or quadratic root classification online; it is not a full quadratic formula solver that prints the root values, not a cubic discriminant tool, and not a graphing calculator. Failed tasks that return invalid_input do not consume prepaid balance, which keeps exploratory scripts cheap when learners deliberately set a to zero. Round-trip checks are easy: recompute b times b minus four times a times c by hand and confirm it equals the published discriminant within the same twelve-decimal rounding, and confirm that changing only the sign of delta flips root_type and label between the three documented classes.
Integration use cases
Unit tests for student quadratic solvers
Generate known-good positive, zero, and negative discriminant cases plus deliberate a-equals-zero rejections for coding kata expected values.
Technical questions
What happens when a is zero?
The expression is no longer quadratic. This tool returns invalid_input instead of treating it as a linear equation.