Quadratic Equation Solver

Solve a quadratic equation with roots, substitution steps and a graph of the curve and vertex.

On-device No sign-up Free to use

Calculate controls

Showing an example. Edit to see your own.

?

The number in front of x². Enter 0 for a linear equation.

?

The number in front of x.

?

The term with no x in it.

More options

Processed in your browser. Your inputs stay on this device.

Result

Showing an example.

Solve x² - 3x + 2 = 0 and check both roots.

x² - 3x + 2 = 0 has two distinct real roots: x = 1 and x = 2.
Answer: x = 1 or x = 2
Formula: D = b² - 4ac = (-3)² - 4 × (1) × (2) = 9 - 8 = 1

https://usefreetools.net/quadratic-equation-solver · 20 November 2026

Was this helpful?

How to use Quadratic Equation Solver

  1. Rearrange the equation as ax² + bx + c = 0, then enter a, b and c with their signs. Use 0 for missing terms; 2x² = 8 becomes a = 2, b = 0, c = -8.
  2. Choose the number of displayed decimal places. Irrational roots and finite-precision calculations remain approximations even if the display is short.
  3. For a nonzero a, read the discriminant and real/complex root classification before the formula substitutions and vertex.
  4. Inspect the sampled curve or download quadratic-graph.svg when available. Complex roots have no location on that real curve.
  5. If a is 0, read the linear result instead. When a and b are both 0, c = 0 gives every real number and nonzero c gives no solution.

Example: Quadratic Equation Solver

Solve x² - 3x + 2 = 0 and check both roots.

You add
Coefficient a: 1 Coefficient b: -3 Constant c: 2 Decimal places: 4
You get
x² - 3x + 2 = 0 has two distinct real roots: x = 1 and x = 2. Answer: x = 1 or x = 2 Formula: D = b² - 4ac = (-3)² - 4 × (1) × (2) = 9 - 8 = 1

Options

Coefficient a
The number in front of x². Enter 0 and the page solves the linear equation instead, without a discriminant.
Coefficient b
The number in front of x. A sign in front of the term belongs to the coefficient, so -3x is entered as -3.
Constant c
The term with no x in it. Enter 0 when the equation has no constant term.
Decimal places
Choose 0, 2, 4, 6 or 8 decimal places for displayed roots. Tiny nonzero values use scientific notation. Computed values retain the decimal library’s working precision.

Supported inputs and limits

  • Each coefficient is limited to 1,000,000,000 in absolute value.
  • Decimal arithmetic uses the library’s finite precision; very long coefficients and irrational roots are approximate.
  • One equation is solved per run as ax² + bx + c = 0.
  • Display rounding follows your selected decimal places; tiny nonzero values use scientific notation.
  • The SVG samples the real curve at 201 points and marks real roots and the vertex.
More details

Complex roots have no point on that real graph.

If the graph range exceeds finite floating-point limits, the decimal result remains available without a graph.

Exact surd simplification and comparison with another solution method are unsupported.

Where your input is processed

This tool does not upload your inputs. See the limits for anything saved on your device.

Why the discriminant is worth reading first

The quadratic formula x = (-b ± √D) ÷ (2a) only produces a real number when the discriminant under the square root is zero or positive. A negative discriminant means that square root has no real value, so the two solutions are a complex conjugate pair and the parabola never meets the x axis. Reading D first tells you which of those three cases you are in before any division happens.

Decimal coefficients and exact arithmetic

Decimal arithmetic represents common written decimals such as 0.1 directly. Calculations still have finite working precision, and irrational roots are approximate. The result shows the entered coefficients, the discriminant and substitution steps so you can check the answer.

Questions about Quadratic Equation Solver

What does the discriminant tell me?

Its sign decides the roots. A positive discriminant gives two distinct real roots, zero gives one repeated real root, and a negative discriminant gives a complex conjugate pair because the square root has no real value.

What happens when coefficient a is 0?

The x² term disappears. If b is nonzero, the tool solves bx + c = 0 with one root and no discriminant. If b is also zero, c = 0 makes the equation true for every real number; otherwise there is no solution.

Why does it say the roots were rounded?

A root such as 2 ÷ 3 has no exact decimal form. The page shows it at your chosen precision and labels that as rounded, while an exact root such as 1 stays plain.

Is the equation rearranged for me?

No. Move every term to the left side first. The equation 2x² = 8 becomes 2x² - 8 = 0, and its coefficients are then a = 2, b = 0 and c = -8.

How do I check a root by hand?

Put the root back into the original equation. The substitution steps use the coefficients you entered, so x = 2 in x² - 3x + 2 gives 4 - 6 + 2, which is 0.

Page updated · Project managed by Tony Hines · Report a problem with Quadratic Equation Solver