DoesWhatAnswersSlangEmojisCalculatorsTriviaPlayBlog

Trivia Questions and Weird Facts

Math

Quadratic Equation Solver

Solve an equation written as ax squared plus bx plus c equals zero. Enter the three coefficients, including their signs, to see the real or complex roots. A zero leading coefficient switches the calculation to a linear equation.

Loading the calculator. It runs in your browser, so JavaScript needs to be on.

How to use the Quadratic Equation Solver

  1. Rearrange the equation so every term is on the left and zero is on the right.
  2. Enter Coefficient a for x squared, Coefficient b for x, and Coefficient c for the constant. Enter 0 for any missing term.
  3. Read the roots and discriminant sign. For real roots, the vertex x row locates the parabola horizontally.

The formula

Discriminant D = b2 - 4ac. Roots = (-b ± √D)/(2a). When D < 0, the roots are -b/(2a) ± i√(-D)/(2|a|). The vertex has x-coordinate -b/(2a).

Worked example

For x squared - 5x + 6 = 0, enter a = 1, b = -5 and c = 6. The roots are 2 and 3, and the vertex x-coordinate is 2.5. Factoring gives (x - 2)(x - 3), confirming both roots.

The discriminant tells you how many real roots exist

A positive discriminant gives two distinct real roots. Zero gives one repeated real root, as in x squared + 2x + 1 = 0, whose solution is -1. A negative discriminant gives a complex conjugate pair, as in x squared + 1 = 0, whose solutions are i and -i. The pair has matching real parts and opposite imaginary parts.

Move the constant before entering coefficients

For 2x squared + 3x = 5, enter 2, 3 and -5. Entering a positive 5 would solve a different equation. Multiplying every coefficient by the same nonzero number leaves the roots unchanged. The tool uses that fact to rescale coefficients internally, then uses a numerically stable root calculation to reduce cancellation.

A zero leading coefficient changes the problem

If a is zero but b is nonzero, solve bx + c = 0 using x = -c/b. If both a and b are zero, the equation either has no solution or is true for every x. Neither case has a single root to display, so the result explains the situation. Extreme coefficient ratios can exceed ordinary browser number precision.

Quadratic Equation Solver questions

What does a negative discriminant mean?

It means there are no real roots and two complex conjugate roots. For x squared + 1 = 0, those roots are i and -i.

What if the x term is missing?

Enter b = 0. For x squared - 9 = 0, use a = 1, b = 0 and c = -9 to get -3 and 3.

Can I check a root by substitution?

Yes. Replace x with the root in ax squared + bx + c. The result should be zero, allowing for rounding in displayed decimal roots.

Related calculators