Skip to content
CornerTools

Quadratic Equation Solver

Solve any quadratic equation with exact roots (surds and complex too), the discriminant, the vertex, a graph and every step.

Enter

ax² + bx + c = 0

Working by

Factoring needs rational roots.

(0.75, −5.13)(2.35, 0)(−0.85, 0)(0, −4)
Two irrational roots

x = (3 ± √41)/4

x₁
(3 + √41)/4 ≈ 2.35
x₂
(3 − √41)/4 ≈ −0.85
Discriminant
41
Vertex (minimum)
(0.75, −5.125)
Axis of symmetry
x = 0.75
Vertex form
2(x − 0.75)² − 5.125
Factored form
2(x − (3 + √41)/4)(x − (3 − √41)/4)
Sum of roots
3/2
Product of roots
−2

Enter the coefficients a, b and c, or type the equation as it stands, and the solver gives both roots exactly: reduced fractions, simplified surds such as (3 ± √41)/4, and complex pairs such as −1 ± 2i, each with its decimal. Beside the roots it gives the discriminant, the vertex and axis of symmetry, the vertex and factored forms, and the sum and product of the roots, with the parabola drawn to scale.

The working follows the method you choose: the quadratic formula, completing the square, or factoring by splitting the middle term, every step in your own numbers.

How to use it

a, b and c take whole numbers, decimals and fractions (3/4 or 1 1/2), worked exactly, so 0.1x² + 0.2x − 0.3 gives 1 and −3 with no rounding on the way. Enter 0 for a missing term. A parabola's link in the Graphing Calculator opens here with its a, b and c filled in.

Equation takes a quadratic in x with terms on either side, brackets and powers: 2x^2 − 3x = 5, x² = 4x or 3(x − 1)^2 = 12. The first step of the working brings every term to the left. An expression without “=” is taken as equal to 0.

Working by picks the method the steps follow. Factoring is offered only when the roots are rational, since only then does the quadratic split into brackets with whole numbers. Decimal places sets the decimals, from 0 to 10, or Auto for ten significant figures.

How it works

The discriminant D = b² − 4ac decides what the roots are. A positive D that is a perfect square gives two rational roots; any other positive D gives two irrational roots, a pair of surds; D = 0 gives one double root, where the parabola touches the x-axis at its vertex; and a negative D gives two complex roots, a conjugate pair a ± bi, where the parabola never meets the x-axis.

Completing the square divides by a, moves the constant across, and adds (b ÷ 2a)² to both sides, so the left side becomes a perfect square. Taking the square root of both sides is where the ± comes from, and the quadratic formula is this same working done once with letters.

The square root of D is simplified by taking out square factors: √48 = 4√3. A D larger than 10¹² that is not a perfect square is left as √D, as finding its square factors would take too long. Decimals are worked from the exact root to well past the places shown, so a small root beside a large one keeps its digits.

x = (−b ± √D) ÷ 2a, where D = b² − 4ac
D > 0: two real roots; D = 0: one double root; D < 0: two complex roots
Vertex: (−b ÷ 2a, −D ÷ 4a); axis of symmetry x = −b ÷ 2a
Vertex form: a(x − h)² + k; factored form: a(x − x₁)(x − x₂)
Sum of roots −b ÷ a; product of roots c ÷ a

Examples

Two rational roots, by factoring

With a = 2, b = −3 and c = −5, and Working by Factoring, the two numbers that multiply to ac and add to b split the middle term:

  1. Find two numbers that multiply to ac = −10 and add to b = −3 −5 × 2 = −10 and −5 + 2 = −3
  2. Split the middle term 2x² − 5x + 2x − 5 = 0
  3. Factor each pair x(2x − 5) + 1(2x − 5) = 0
  4. Take out the common bracket (2x − 5)(x + 1) = 0
  5. Set each factor to 0 x = 5/2 or x = −1

Surd roots

With a = 2, b = −3 and c = −4, the discriminant is 41, which is not a perfect square, so x = (3 ± √41)/4: x ≈ 2.35 or x ≈ −0.85 to the default two places. The vertex is (0.75, −5.125), and the factored form is 2(x − (3 + √41)/4)(x − (3 − √41)/4).

Complex roots

With a = 2, b = 1 and c = 1, the discriminant is −7, so the roots are a complex pair: x = (−1 ± i√7)/4, or x ≈ −0.25 + 0.66i or x ≈ −0.25 − 0.66i. The parabola's vertex, (−0.25, 0.875), sits above the x-axis and the parabola opens upward, so it never crosses it.

A typed equation

Equation
3(x − 1)^2 = 12

The brackets are expanded and 12 brought across, giving 3x² − 6x − 9 = 0, so x = 3 or x = −1.

  1. Bring every term to the left side and collect like terms 3x² − 6x − 9 = 0
  2. Read the coefficients a = 3, b = −6, c = −9
  3. Work out the discriminant D = b² − 4ac = (−6)² − 4 × 3 × (−9) = 36 + 108 = 144
  4. D is a perfect square, so the roots are rational
  5. Put them into the formula x = (−b ± √D) ÷ 2a x = (6 ± √144) ÷ 6
  6. Simplify the root √144 = 12
  7. Take + and − in turn x = (6 + 12) ÷ 6 = 3 or x = (6 − 12) ÷ 6 = −1

Frequently asked questions

Every positive number has two square roots, one positive and one negative: both 7 and −7 square to 49. When completing the square reaches (x − h)² = d, x − h can be either root of d, so x = h + √d or x = h − √d. The two roots lie the same distance either side of the axis of symmetry.
Nowhere on it: the graph plots only real x, and a parabola with complex roots does not reach the x-axis. The real part of the pair is still the axis of symmetry, x = −b ÷ 2a, and for the same a, the further the vertex sits from the x-axis, the larger the imaginary parts.
With no x² term the equation is linear, bx + c = 0, with the single root x = −c ÷ b, and the solver says so. If b is 0 too, there is no solution unless c is also 0, when every x is one.

See also