Quadratic Formula Calculator

Enter a, b, and c to solve ax² + bx + c = 0 with the quadratic formula — every step shown: the substitution, the discriminant (b² − 4ac), the simplified radical, and the factored form when the roots are rational. Taught in most provincial secondary-school math curricula (e.g. Ontario MPM2D, BC Foundations of Math), the reference example x² − 5x + 6 = 0 solves to exactly 2 and 3. If a = 0, the calculator solves the resulting linear equation instead.

3, 2

Roots

Discriminant (b² − 4ac): 1 (two real roots)

Vertex: (2.5, -0.25)

Factored form: (x − 3)(x − 2) = 0

Show the formula, step by step
Step 1 — Write the quadratic formula: x = (−b ± √(b² − 4ac)) ÷ (2a).
Step 2 — Substitute a = 1, b = -5, c = 6: x = (−(-5) ± √((-5)² − 4(1)(6))) ÷ (2 × 1).
Step 3 — Discriminant: b² − 4ac = 25 − 24 = 1.
Step 4 — The discriminant is a perfect square: √1 = 1, so the roots will be rational.
Step 5 — Reduce each fraction: x₁ = (6) ÷ 2 = 3 (divide top and bottom by 2); x₂ = (4) ÷ 2 = 2 (divide top and bottom by 2).
Step 6 — Vertex of the parabola: h = −b ÷ (2a) = 2.5, k = c − b²÷(4a) = -0.25.
Step 7 — Factored form (from the rational roots): (x − 3)(x − 2) = 0.

For ax² + bx + c = 0 with a ≠ 0. If a = 0 the equation is linear, not quadratic. How we calculate →

The quadratic formula and where it comes from

Any equation of the form ax² + bx + c = 0 (with a ≠ 0) can be solved with the quadratic formula: x = (−b ± √(b² − 4ac)) ÷ (2a). It's derived by completing the square on the general form, which is why it works for every quadratic — no factoring insight required.

Worked example: for x² − 5x + 6 = 0 (a=1, b=−5, c=6), substitute directly: x = (−(−5) ± √((−5)² − 4·1·6)) ÷ (2·1) = (5 ± √1) ÷ 2 = (5 ± 1) ÷ 2, giving x = 3 and x = 2.

The discriminant: how many roots, before you even solve

The expression under the square root, b² − 4ac (the discriminant), tells you what kind of roots to expect before you finish the calculation: positive → two distinct real roots; zero → exactly one repeated real root (the parabola just touches the x-axis); negative → no real roots, only a pair of complex conjugates.

For x² + x + 1 = 0, the discriminant is 1² − 4(1)(1) = -3, which is negative — so this parabola never crosses the x-axis, and the two roots are complex: x = -0.5 + 0.866025i and x = -0.5 − 0.866025i.

Simplifying the radical (and reducing the fraction)

When the discriminant isn't a perfect square, the square root doesn't collapse to a whole number — but it often simplifies. Pull out the largest perfect-square factor: √48 = √(16 × 3) = 4√3, because 16 is the biggest perfect square that divides 48 evenly.

The same idea applies to the whole root expression: if the numerator (−b ± the simplified radical) and the denominator (2a) share a common factor, divide both by it before calling the answer final — e.g. (−4 ± 4√3) ÷ 6 reduces to (−2 ± 2√3) ÷ 3 by dividing top and bottom by 2.

What if a = 0? (it's not quadratic anymore)

The quadratic formula requires a ≠ 0 — dividing by 2a would be dividing by zero otherwise. If a = 0, the x² term vanishes and the equation collapses to the linear equation bx + c = 0, solved by x = −c ÷ b (or, if b is also 0, either every x works when c = 0, or no x works when c ≠ 0).

This calculator detects a = 0 automatically and switches to solving the linear equation instead of returning an error, since bx + c = 0 is still a valid (simpler) equation to solve.

From roots back to factored form

When the roots are rational numbers (which happens exactly when the discriminant is a perfect square), the quadratic factors cleanly over the integers: ax² + bx + c = a(x − r₁)(x − r₂), where r₁ and r₂ are the two roots. For x² − 5x + 6 = 0 with roots 2 and 3, that's (x − 2)(x − 3) = 0 — you can check it by expanding.

If the discriminant is positive but not a perfect square, or negative, the quadratic does not factor over the integers (or the reals, respectively) — the quadratic formula is the only route to the exact roots in that case.

Frequently asked questions

What is the quadratic formula?

For ax² + bx + c = 0 (a ≠ 0): x = (−b ± √(b² − 4ac)) ÷ (2a). It gives both roots at once, using only the three coefficients — no factoring or completing the square by hand needed.

What does the discriminant tell you?

The discriminant is b² − 4ac, the part under the square root. If it's positive, there are two distinct real roots; if it's zero, one repeated real root; if it's negative, two complex (non-real) roots.

How do you simplify a square root like √48?

Find the largest perfect square that divides the number evenly: 48 = 16 × 3, and 16 is a perfect square (4²), so √48 = √16 × √3 = 4√3. This calculator does this extraction automatically for any whole-number discriminant.

What happens if a = 0 in the quadratic formula?

The formula breaks down (you'd be dividing by 2a = 0). With a = 0 the equation is actually linear (bx + c = 0), solved by x = −c/b instead — this calculator detects that case and switches to the linear solution automatically.

Can the quadratic formula give complex or imaginary roots?

Yes — whenever the discriminant (b² − 4ac) is negative, the square root of a negative number is imaginary, and the two roots come out as a complex conjugate pair in the form p ± qi.

How do I find the vertex of a parabola from a, b, and c?

The vertex's x-coordinate is h = −b ÷ (2a) — the same denominator as in the quadratic formula, which is no coincidence, since the vertex sits exactly halfway between the two roots. The y-coordinate is k = c − b²÷(4a), or equivalently f(h).

How do I know if a quadratic factors over the integers?

Check the discriminant (b² − 4ac): if it's a perfect square (0, 1, 4, 9, 16, 25...) and a, b, c are integers, the roots are rational and the quadratic factors as a(x − r₁)(x − r₂) with clean integer or fraction coefficients. If it isn't a perfect square, the roots are irrational and it won't factor over the integers.

Researched & verified by the Calcuris Data & Research Team. How we build and check our tools →