Quadratic Formula Calculator with Steps
Solve ax² + bx + c = 0 with the quadratic formula. Get the discriminant, real or complex roots, the exact radical form, the vertex, the axis of symmetry and every step, free and private in your browser.
Roots
Two real roots
- Discriminant D = b² − 4ac
- 1
- x₁
- 3
- x₂
- 2
- Exact roots
- x = 3 or x = 2
Parabola
- Vertex (−b/2a, c − b²/4a)
- (2.5, -0.25)
- Axis of symmetry
- x = 2.5
- Shape
- Opens upward
- y-intercept
- (0, 6)
Steps
- x = (−b ± √(b² − 4ac)) / 2a
- x = (−(-5) ± √((-5)² − 4 × 1 × 6)) / (2 × 1)
- D = b² − 4ac = 1
- √D = √1 = 1
- x = 3 or x = 2
Quadratic Formula Calculator
Enter the coefficients a, b and c of a quadratic equation ax² + bx + c = 0 and this calculator solves it with the quadratic formula. It shows the discriminant and what it means, the roots as decimals, the exact roots in simplified radical form when the coefficients are whole numbers, the vertex, the axis of symmetry, which way the parabola opens, the y-intercept and each step of the working. The page opens with the example x² − 5x + 6 = 0, whose roots are 3 and 2.
The quadratic formula
The part under the square root is the discriminant D. It decides what kind of roots the equation has.
Discriminant
- D > 0: two real roots. x² − 5x + 6 has D = 1 and roots 3 and 2.
- D = 0: one repeated real root. x² − 4x + 4 has D = 0 and the root 2.
- D < 0: two complex roots, p ± qi. x² + 2x + 5 has D = −16 and roots −1 ± 2i.
How to use it
Steps
- Type a (x² term), b (x term) and c (constant). Use a minus sign for negative values and include zero terms, so x² − 9 = 0 has b = 0.
- Read the roots, the discriminant and the exact form.
- Check the parabola panel for the vertex, the axis of symmetry and the y-intercept.
- Follow the steps to see the values substituted into the formula.
Exact radical form
For whole-number coefficients the calculator writes √D as k√m, where m has no square factor, and divides the whole fraction by the greatest common divisor. For x² + 2x − 1 = 0, D = 8 = 2² × 2, so x = (−2 ± 2√2) / 2 = −1 ± √2, which is 0.414213562373 and −2.41421356237. For x² + x − 1 = 0, D = 5 and x = (−1 ± √5) / 2, the golden ratio pair 0.61803398875 and −1.61803398875.
The vertex and the graph
The graph of y = ax² + bx + c is a parabola. Its turning point, the vertex, sits at x = −b/2a, and the vertical line through it is the axis of symmetry. The parabola opens upward when a is positive and downward when a is negative, and it crosses the y-axis at (0, c). For x² − 5x + 6 the vertex is (2.5, −0.25).
Accuracy
Results show 12 significant digits. The calculator avoids the loss of digits that the textbook formula suffers when b is much larger than a and c. It computes q = −(b + sign(b)√D) / 2 and takes x₁ = q / a and x₂ = c / q, so x² + 100000000x + 1 = 0 gives −1e-8 and −100,000,000. Coefficients must lie between −1e100 and 1e100, and a must not be 0, because then the equation is linear.
Privacy
Nothing is uploaded; every calculation runs in your browser and never leaves your device.
Related tools
Use the Scientific Calculator to check a root by substituting it back, the Exponent Calculator for powers and roots, and the Fraction Calculator to work with rational roots such as 1/2.
Frequently asked questions
What is the quadratic formula?
For ax² + bx + c = 0 with a ≠ 0, the roots are x = (−b ± √(b² − 4ac)) / 2a. The calculator substitutes your a, b and c, shows each step and gives the roots as decimals and, for whole-number coefficients, in exact form.
What does the discriminant tell me?
D = b² − 4ac. If D is positive there are two real roots, if it is 0 there is one repeated real root, and if it is negative there are two complex roots. For x² − 5x + 6 = 0, D = 1, so there are two real roots, 3 and 2.
How are complex roots shown?
As p + qi and p − qi, where p = −b/2a and q = √−D / 2a. For x² + 2x + 5 = 0, D = −16 and the roots are −1 + 2i and −1 − 2i.
What is the exact radical form?
When a, b and c are whole numbers, the calculator writes √D as k√m with m square-free and reduces the fraction. For x² + 2x − 1 = 0 that gives x = −1 ± √2, and for x² + x − 1 = 0 it gives x = (−1 ± √5) / 2.
Why do I get an error when a is 0?
With a = 0 the equation is linear, not quadratic, so the formula would divide by zero. The message gives the linear solution instead, for example x = 2 for 2x − 4 = 0.
Why are some roots more accurate than other calculators?
Subtracting two nearly equal numbers loses digits. The calculator uses the stable form q = −(b + sign(b)√D) / 2 with x₁ = q/a and x₂ = c/q, so x² + 100000000x + 1 = 0 gives the small root −1e-8 correctly.