Quadratic Equation Solver (ax² + bx + c = 0)
Solve ax² + bx + c = 0: discriminant, real or complex roots, the vertex of the parabola and the sum and product of the roots.
Things to keep in mind:
- A root field showing 0 can also mean that there is no real root; read it together with "Number of real roots".
- Coefficients can have up to 6 decimals within ±1,000,000. Fractions entered as decimals (0.333333 for 1/3) add rounding error; multiply the equation by the denominator if needed.
- Cubic and higher-degree equations and inequalities are not solved.
Calculator
Result
Enter the values and press Calculate to see the result here.
About this tool
The quadratic equation solver solves ax² + bx + c = 0 with the discriminant method and returns the vertex of the parabola.
Formulas
- Discriminant: Δ = b² − 4ac
- Δ > 0: two distinct real roots, x₁,₂ = (−b ∓ √Δ) / 2a
- Δ = 0: one double root, x = −b / 2a
- Δ < 0: no real roots; complex roots x = −b / 2a ± (√(−Δ) / 2|a|) · i
- Vertex: V(−b / 2a, −Δ / 4a)
- Vieta's formulas: x₁ + x₂ = −b / a, x₁ · x₂ = c / a
The roots are sorted (x₁ ≤ x₂). With a = 0 the equation becomes linear, bx + c = 0; for b ≠ 0 its single root x = −c / b is shown in both root fields and the vertex and Vieta values are 0.
Example: for x² − 5x + 6 = 0, Δ = 25 − 24 = 1, so x₁ = (5 − 1) / 2 = 2 and x₂ = (5 + 1) / 2 = 3. The vertex is (2.5, −0.25), the sum of the roots 5 and the product 6.
Complex example: x² + 2x + 5 = 0 has Δ = −16 and the roots −1 ± 2i.
How to use
- Bring your equation to the form ax² + bx + c = 0.
- Enter a, b and c with their signs; use 0 for a missing term.
- Press Calculate.
Notes
Arithmetic uses 64 significant digits and every result is rounded to 8 decimals (HALF_UP). Roots are sorted ascending. Without real roots the root fields show 0 and the complex roots are given as real and imaginary parts. With a = 0 the linear solution is shown; with a = 0 and b = 0 the number of real roots is 0 (if c = 0 every x is a solution).
Frequently asked questions
Δ = b² − 4ac decides the number of roots: Δ > 0 two distinct real roots, Δ = 0 one double root, Δ < 0 no real roots (two complex conjugate roots).
As x = −b / 2a ± (√(−Δ) / 2|a|) · i. For x² + 2x + 5 = 0 the real part is −1 and the imaginary part 2, so the roots are −1 + 2i and −1 − 2i.
The vertex of the parabola is (−b / 2a, −Δ / 4a). It is the minimum of the function when a > 0 and the maximum when a < 0.
The equation becomes linear, bx + c = 0. For b ≠ 0 the tool shows the single root x = −c / b; if b is 0 too, the number of real roots is shown as 0.
Next step
Related tools to continue your calculation.
- Calculate
Exponent and Root Calculator (Power, Square Root, Cube Root, n-th Root)
Raise a number to any power (including fractional and negative exponents) and take its square root, cube root and n-th root.
- Calculate
Logarithm Calculator (log, ln, log2 and Antilog)
Calculate the logarithm of a number in any base, its natural (ln), common (log10) and binary (log2) logarithm, and the antilogarithm.
- Calculate
Area and Perimeter Calculator (Geometric Shapes)
Calculate the area and perimeter of a square, rectangle, triangle, circle, trapezoid, parallelogram, rhombus or ellipse, with the area in square metres.