Quadratic equation solver
Enter the coefficients a, b and c of ax² + bx + c = 0 to see the roots, vertex, worked steps and a graph instantly.
Solving 1x² − 3x + 2 = 0
Roots
x₁ = 2, x₂ = 1
- Discriminant D
- 1
- Vertex
- (1.5, -0.25)
- Axis of symmetry
- x = 1.5
- Factored form
- (x − 2)(x − 1) = 0
Positive — two distinct real roots.
Steps
- Formula: x = (−b ± √(b² − 4ac)) / (2a)
- Substitute a = 1, b = -3, c = 2: x = (−(-3) ± √((-3)² − 4·(1)·(2))) / (2·(1))
- Discriminant: D = b² − 4ac = 9 − 8 = 1
- √D = √1 = 1
- x = (3 ± 1) / 2
- x₁ = (3 + 1) / 2 = 2
- x₂ = (3 − 1) / 2 = 1
Parabola y = ax² + bx + c with roots and vertex marked. Values rounded to 6 significant digits.
How it works
- Type the coefficients a, b and c of your equation ax² + bx + c = 0 into the three fields — decimals and negative numbers both work.
- Read the results as you type: the discriminant with its interpretation, both roots (real or written as p ± qi), the vertex, the axis of symmetry and the factored form when the roots are rational.
- Follow the worked steps to see the quadratic formula applied to your numbers, and check the graph to see where the parabola crosses the x-axis.
Frequently asked questions
- How does the solver find the roots?
- It applies the quadratic formula x = (−b ± √(b² − 4ac)) / (2a), the standard method that works for every quadratic. The discriminant b² − 4ac is computed first because its sign decides everything: positive means two distinct real roots, zero means one repeated root, negative means a complex conjugate pair.
- What happens when the discriminant is negative?
- The parabola never touches the x-axis, so there are no real solutions. The solver still gives you the two complex conjugate roots in the form p ± qi, where p = −b/(2a) and q = √(−D)/(2|a|). These are exactly the answers expected in algebra courses that cover complex numbers.
- Why is no factored form shown for my equation?
- A quadratic factors neatly over the rational numbers only when its roots are rational — for example x² − x − 6 = (x − 3)(x + 2). If the roots are irrational (like 1 ± √2) or complex, no such factorization exists, so the solver omits it rather than show a misleading approximation.
- Is anything I type sent to a server?
- No. The formula, the steps and the graph are all computed locally in your browser with plain JavaScript — there is no network request at any point. You can load the page once and keep solving equations offline.
- How accurate are the results?
- Calculations use double-precision floating point, accurate to roughly 15 significant digits internally; displayed values are rounded to 6 significant digits for readability. For classroom integer coefficients the roots, vertex and factored form are exact. Note that a must be non-zero — with a = 0 the equation is linear, not quadratic.
About this tool
A quadratic equation has the form ax² + bx + c = 0, where a is not zero, and it appears everywhere from algebra homework to projectile motion and profit optimization. This solver takes the three coefficients and returns the complete picture at once: the discriminant with a plain-language interpretation, both roots, the vertex, the axis of symmetry and — when the roots are rational — the factored form. Because it shows every step of the quadratic formula with your numbers substituted in, it works as a checking tool for homework rather than a black box that only prints answers.
Everything is computed in your browser the moment you type. The solver first evaluates the discriminant D = b² − 4ac, since its sign determines the nature of the solutions: two distinct real roots when D is positive, one repeated root when it is zero, and a pair of complex conjugates written as p ± qi when it is negative. The vertex comes from x = −b/(2a), which is also the axis of symmetry, and the graph plots the parabola with the roots and vertex marked so you can connect the algebra to the geometry. No data leaves your device at any point.
The step-by-step section mirrors how the method is taught: the general formula, the substitution of your coefficients, the discriminant calculation, and the final simplification to both roots. Comparing these lines against your own written work is the fastest way to find a sign error or a dropped factor of 2 — the two mistakes that account for most wrong answers on quadratic problems.
A few practical tips: enter coefficients exactly as they appear after moving every term to one side of the equation, so 3x² = 5 − 2x becomes a = 3, b = 2, c = −5. Decimals and negatives are fine. If your equation has no x² term, it is linear and a different (simpler) method applies — the solver will remind you when a is zero.