Quadratic Equation Calculator

Solve ax² + bx + c = 0 — get roots, discriminant, step-by-step working, and an interactive parabola graph.

x² +
x +
= 0
Examples:

What Is a Quadratic Equation?

A quadratic equation is a second-degree polynomial of the form ax² + bx + c = 0, where a ≠ 0. The solutions (also called roots or zeros) are the x-values where the parabola crosses the x-axis.

Δ > 0
Two Real Roots
Parabola crosses the x-axis at two distinct points.
Δ = 0
One Repeated Root
Parabola touches the x-axis at exactly one point (vertex).
Δ < 0
Complex Roots
Parabola does not cross the x-axis. Roots are conjugate complex numbers.

The Quadratic Formula

x = (−b ± √(b²−4ac)) / (2a)
where Δ = b²−4ac is the discriminant

Key Properties

Vertex: (−b/2a, f(−b/2a)) — the minimum or maximum point.
Axis of Symmetry: the vertical line x = −b/2a.
Y-intercept: the point (0, c).
Sum of roots: x₁ + x₂ = −b/a (by Vieta's formulas).
Product of roots: x₁ × x₂ = c/a (by Vieta's formulas).
Direction: opens upward if a > 0, downward if a < 0.

Solved Examples — Quadratic Equations

Practice solving quadratic equations with these step-by-step worked examples covering all three cases: two distinct real roots, one repeated root, and complex (imaginary) roots. Click Try it on any example to load it into the calculator above and see the full solution, graph, and properties instantly.

Two Distinct Real Roots (Δ > 0)

x² − 5x + 6 = 0
a=1, b=−5, c=6
Factorable
Δ = (−5)² − 4(1)(6) = 25 − 24 = 1
Roots: x₁ = 3, x₂ = 2
Factors as (x−2)(x−3) = 0
x² − 4 = 0
a=1, b=0, c=−4
Difference of Squares
Δ = 0 − 4(1)(−4) = 16
Roots: x₁ = 2, x₂ = −2
Factors as (x−2)(x+2) = 0
2x² + 3x − 2 = 0
a=2, b=3, c=−2
Non-monic
Δ = 9 − 4(2)(−2) = 9 + 16 = 25
Roots: x₁ = 0.5, x₂ = −2
Factors as (2x−1)(x+2) = 0
3x² − 7x + 2 = 0
a=3, b=−7, c=2
Rational Roots
Δ = 49 − 4(3)(2) = 49 − 24 = 25
Roots: x₁ = 2, x₂ = 1/3
Factors as (x−2)(3x−1) = 0

One Repeated Root (Δ = 0)

x² − 2x + 1 = 0
a=1, b=−2, c=1
Perfect Square
Δ = 4 − 4(1)(1) = 0
Root: x = 1 (repeated)
Factors as (x−1)² = 0
x² + 4x + 4 = 0
a=1, b=4, c=4
Perfect Square
Δ = 16 − 4(1)(4) = 0
Root: x = −2 (repeated)
Factors as (x+2)² = 0; vertex at (−2, 0)

Complex (Imaginary) Roots (Δ < 0)

x² + x + 1 = 0
a=1, b=1, c=1
Complex Roots
Δ = 1 − 4(1)(1) = −3
Roots: −0.5 ± 0.866i
No real solutions; parabola doesn't cross x-axis
x² + 2x + 5 = 0
a=1, b=2, c=5
Conjugate Pair
Δ = 4 − 4(1)(5) = −16
Roots: −1 ± 2i
Complex conjugate roots; opens upward, min at (−1, 4)

Real-World Application

Projectile Motion Problem

A ball is thrown upward from ground level with an initial velocity of 20 m/s. Its height h (in metres) after t seconds is given by h(t) = −5t² + 20t. Setting h = 0 to find when the ball lands: −5t² + 20t = 0, i.e. 5t² − 20t = 0.

Equation: 5t² − 20t + 0 = 0 (a=5, b=−20, c=0)
Δ = 400 − 0 = 400
Roots: t = 0 s (launch) and t = 4 s (landing)
Max Height
20 m
at t = 2 s
Lands at
4 s

Frequently Asked Questions

What is the discriminant and why does it matter?

The discriminant (Δ = b²−4ac) tells you how many real solutions the equation has — without fully solving it. Δ > 0 means two distinct real roots, Δ = 0 means one repeated real root, and Δ < 0 means no real roots (two complex conjugate roots).

What if a = 0?

When a = 0, the equation becomes linear (bx + c = 0), which is solved differently. A quadratic equation specifically requires a ≠ 0.

How do Vieta's formulas help?

Vieta's formulas relate coefficients to roots without solving the equation. For ax² + bx + c = 0: the sum of roots x₁ + x₂ = −b/a and the product of roots x₁ × x₂ = c/a. These are useful for checking your answer and working backwards from known roots.

What are complex roots?

When Δ < 0, the square root of a negative number is involved. The roots are expressed as p ± qi where i = √(−1) is the imaginary unit. They always come in conjugate pairs and have no real-number value on the number line.

Can I use decimals or fractions as coefficients?

Yes — this calculator accepts any real number as a coefficient, including decimals. For fractions, convert to decimal first (e.g. ½ = 0.5).

Related Calculators