Quadratic equation solver
Solve ax²+bx+c=0 with the discriminant, both roots (real, complex or repeated), exact fraction or radical forms, the vertex and axis of symmetry, the factorised form, a Vieta cross-check and a parabola plot.
Runs in your browserEvery computation happens in your browser — your data never leaves this device.
Coefficients
Enter the three coefficients of ax² + bx + c = 0; results update live and a = 0 degrades to a linear equation.
Solution
Two distinct real roots12 , 3(2.5, -0.25)x = 2.56(x - 2)(x - 3)What this tool does
- Work through homework or lesson prep in one pass: enter the coefficients and get the discriminant, both roots, the vertex and the factorised form.
- Check a hand calculation: the Vieta panel lists the sum and product of the roots next to −b/a and c/a, so any mismatch jumps out.
- Copy exact values straight into your write-up — perfect squares give fractions (1/2) and irrational roots give simplified radicals (± √2, (3 ± √5)/2).
- Explain the shape of a parabola with the plot: vertex, axis of symmetry and real roots are all marked, and changing a coefficient shows the opening direction flip.
Example
Input
a = 1, b = −5, c = 6
Output
Δ = 1, two distinct real roots x₁ = 2 and x₂ = 3, vertex (2.5, −0.25), axis of symmetry x = 2.5, factorised (x − 2)(x − 3), Vieta check passed (sum 5 = −b/a, product 6 = c/a)
When Δ > 0 the roots are listed from smallest to largest; exact values are integers or fractions, and a non-square Δ is given as a simplified radical.
Frequently asked questions
What happens when the discriminant is negative?
You get a pair of complex conjugate roots with real part −b/(2a) and imaginary part ±√(−Δ)/(2a), written with radicals where possible — x² + 2x + 5 = 0 gives −1 ± 2i. Since complex roots are off the x-axis, the plot shows no intersection dots.
What if a is 0?
The equation is no longer quadratic, so the tool says so and solves bx + c = 0 instead. If b is 0 as well it distinguishes an identity (every real number solves it) from a contradiction (no solution) rather than blindly applying the quadratic formula.
How are the exact radical forms simplified?
The discriminant is computed first, then √Δ is split into k√s with s square-free, and the whole fraction is reduced. That is why 2x² + 3x − 2 = 0 gives −2 and 1/2, and x² − 2 = 0 gives ± √2 instead of decimal noise.
How does the Vieta cross-check work?
The tool computes x₁ + x₂ and x₁ · x₂ from the roots it found (using complex multiplication for complex roots) and compares them with −b/a and c/a; agreement within 1e-8 counts as passed. It is a real cross-check, so a wrong input or formula shows up as a mismatch.
Can I enter decimals or fractions?
Decimals work, for example a = 0.5 and b = −1.5. Fractions are not accepted directly — convert them to decimals first. Coefficients must be finite numbers; leaving a field empty reports an error instead of returning NaN.
Keywords:quadratic equationquadratic solver一元二次方程求根公式discriminant判别式vieta韦达定理vertex抛物线顶点factorization因式分解complex roots虚根