Quadratic Formula Calculator
Solve any quadratic equation ax² + bx + c = 0, including complex roots.
Results update as you type.
About this calculator
This calculator solves a quadratic equation ax² + bx + c = 0 using the quadratic formula x = (−b ± √(b² − 4ac)) / 2a. Enter the coefficients a, b and c and it returns both roots, the discriminant, the nature of the roots, the parabola's vertex and axis of symmetry, and the factored form, along with a plot of the curve.
The discriminant b² − 4ac decides everything: a positive value gives two distinct real roots, zero gives one repeated real root, and a negative value gives a pair of complex conjugate roots written with i. Take x² − 5x + 6 = 0 (the defaults, a = 1, b = −5, c = 6): the discriminant is 25 − 24 = 1, so there are two real roots, x = 3 and x = 2, the vertex is at (2.5, −0.25) with axis of symmetry x = 2.5, and the factored form is (x − 3)(x − 2). If a is 0 the equation is linear, not quadratic, and the formula does not apply.
Quadratics model projectile paths, areas, profit-maximizing prices and many optimization problems. The vertex gives the maximum or minimum point of the parabola, while the roots are where it crosses the x-axis.
Frequently asked questions
What does the discriminant tell me?
The discriminant b² − 4ac decides the roots: positive means two real solutions, zero means one repeated solution, and negative means two complex solutions.
What if a is zero?
Then the equation is linear, not quadratic, and the quadratic formula does not apply. Enter a non-zero value for a.
What is the vertex of the parabola?
It is the turning point (h, k) where the curve reaches its maximum or minimum. This tool reports it along with the axis of symmetry, the line x = h.
What does the factored form show?
When the roots are real, the equation is rewritten as a(x − r₁)(x − r₂). For x² − 5x + 6 = 0 that is (x − 3)(x − 2).
What are complex roots?
When the discriminant is negative the roots are a conjugate pair a ± bi involving the imaginary unit i, and the tool writes them out in that form.
Solve x² − 5x + 6 = 0.
The discriminant is 1, giving two real roots, x = 3 and x = 2 — the default example shown by this calculator.
API — use this calculator from code
Call this calculator as a free JSON endpoint — no key required. Send the field values below as query parameters or JSON. Read the full API docs →
Endpoint
GET https://calculator.free/api/v1/quadratic-formula/
curl
curl "https://calculator.free/api/v1/quadratic-formula/?a=1&b=-5&c=6"
JavaScript fetch()
const r = await fetch(
"https://calculator.free/api/v1/quadratic-formula/?" + new URLSearchParams({
"a": "1",
"b": "-5",
"c": "6"
}));
const data = await r.json();
console.log(data.results);
Results are estimates for general guidance only, not financial, medical or tax advice.