School
Quadratic Formula Calculator
Solve any quadratic equation ax² + bx + c = 0 with the quadratic formula: the discriminant, each substitution, and exact roots in simplest radical form.
Enter a, b and c to solve the quadratic equation.
How this calculator works
Any equation of the form ax² + bx + c = 0, with a not zero, is solved by the quadratic formula: x = (−b ± √(b² − 4ac)) ÷ 2a. The ± gives the two solutions, one adding the square root and one subtracting it.
The part under the square root, b² − 4ac, is the discriminant, and it tells you what kind of answer to expect before you finish. Positive and a perfect square: two rational roots, and the equation factors. Positive but not a perfect square: two irrational roots. Zero: one repeated root. Negative: no real roots, and two complex roots.
The calculator works in exact fractions, so the discriminant is never thrown off by rounding. Roots are given exactly, simplified the way a teacher would want, such as (3 ± √17)/4 or 1 ± √2, along with their decimal values. Complex roots are written with i, such as (−1 ± i√3)/2.
It also gives the vertex of the parabola y = ax² + bx + c, its axis of symmetry, and whether it opens up or down. The roots are where that parabola crosses the x-axis.
The formula
Exactly what happens to your numbers, step by step.
Quadratic formula
x = (−b ± √(b² − 4ac)) ÷ 2aDiscriminant
D = b² − 4ac D > 0: two real roots D = 0: one repeated root D < 0: no real roots (two complex)Vertex
x = −b ÷ 2a, y = c − b² ÷ 4a
A worked example
Solve 2x² − 3x − 1 = 0.
What you enter
- a
- 2
- b
- −3
- c
- −1
Step by step
- Discriminant
- (−3)² − 4 × 2 × (−1) = 9 − (−8) = 17
- Substitute
- x = (3 ± √17) ÷ 4
- Simplify
- √17 does not simplify, so x = (3 ± √17)/4
- Decimals
- x ≈ 1.780776 and x ≈ −0.280776
x = (3 ± √17)/4, about 1.780776 and −0.280776
Because 17 is positive but not a perfect square, the roots are irrational. The equation does not factor over whole numbers, which is exactly when the quadratic formula earns its keep.
Quadratic equations, worked out
Each solved with the quadratic formula, every substitution shown.
1.Solve x² − 5x + 6 = 0.
- Discriminant: b² − 4ac = (−5)² − 4 × 1 × 6 = 25 − 24 = 1.
- 1 is positive and a perfect square, so there are two rational roots.
- Substitute into the formula: x = (−b ± √D) ÷ 2a = (5 ± √1) ÷ 2.
- √1 = 1, so x = (5 + 1) ÷ 2 = 3 or x = (5 − 1) ÷ 2 = 2.
x = 3 or x = 2.
2.Solve x² − 2x − 1 = 0.
- Discriminant: b² − 4ac = (−2)² − 4 × 1 × (−1) = 4 − (−4) = 8.
- 8 is positive but not a perfect square, so there are two irrational roots.
- Substitute into the formula: x = (−b ± √D) ÷ 2a = (2 ± √8) ÷ 2.
- Simplify the root: √8 = 2√2, so x = 1 ± √2.
x = 1 ± √2, about 2.414214 and −0.414214.
3.Solve x² + 2x + 1 = 0.
- Discriminant: b² − 4ac = 2² − 4 × 1 × 1 = 4 − 4 = 0.
- The discriminant is 0, so there is one repeated root: the parabola just touches the x-axis.
- x = −b ÷ 2a = −2 ÷ 2 = −1.
x = −1, a repeated root.
4.Solve x² + x + 1 = 0.
- Discriminant: b² − 4ac = 1² − 4 × 1 × 1 = 1 − 4 = −3.
- −3 is negative, so there are no real roots. The parabola never crosses the x-axis, and the two roots are complex.
- Substitute into the formula: x = (−b ± √D) ÷ 2a = (−1 ± √(−3)) ÷ 2.
- √(−3) = i√3, so x = (−1 ± i√3)/2.
No real solutions. The complex roots are x = (−1 ± i√3)/2.
5.How many real roots does 3x² + 6x + 2 = 0 have?
- Discriminant: b² − 4ac = 6² − 4 × 3 × 2 = 36 − 24 = 12.
- 12 is positive but not a perfect square, so there are two irrational roots.
Two, both irrational, because the discriminant is positive but not a perfect square.
Assumptions
Every result here rests on these. Change your inputs and the result changes with them.
- The equation is in standard form, ax² + bx + c = 0. Move everything to one side first: x² = 5x − 6 becomes x² − 5x + 6 = 0.
- a is not zero. With a = 0 the equation is linear, and the calculator says so and gives the single answer.
What this cannot tell you
- Coefficients are plain numbers, decimals included, up to a trillion in size. For a fraction such as 1/3, multiply the whole equation by 3 first, so the coefficients are whole numbers and the roots stay exact.
- Very large coefficients can make the square root too big to simplify exactly; then the roots are given as decimals.
- It solves quadratics only. Cubic and higher-degree equations need other methods.
Questions people ask
What is the quadratic formula?
For ax² + bx + c = 0, x = (−b ± √(b² − 4ac)) ÷ 2a. Substitute a, b and c, simplify the square root, then work out the + and − versions separately to get the two roots.
What does the discriminant tell you?
How many real solutions there are. If b² − 4ac is positive there are two, if it is zero there is one (a repeated root), and if it is negative there are none, only two complex roots. If it is a perfect square, the roots are rational and the equation can be factored.
What if the discriminant is negative?
Then there are no real solutions: the parabola never touches the x-axis. In complex numbers there are still two roots, using i = √−1. For x² + x + 1 = 0 they are (−1 ± i√3)/2.
Should I factor or use the quadratic formula?
Factor when it is quick and obvious, as with x² − 5x + 6 = (x − 2)(x − 3). The quadratic formula always works, including when the roots are irrational or complex and factoring over whole numbers is impossible.
Related calculators
- Pythagorean Theorem CalculatorThe missing side of a right triangle from the other two, with the exact square root, the angles and every step.School
- Slope CalculatorThe slope of the line through two points as an exact fraction, with its equation, angle, grade and midpoint.School
- Fraction CalculatorAdd, subtract, multiply and divide fractions and mixed numbers, with every step shown.School
- Triangle CalculatorSolve any triangle from three sides and angles: the missing sides, angles, area and perimeter.School
Sources and review
Sources
Methodology version 1.0.0 · Last reviewed
Cite this calculator
For coursework, a resource list or your own site. How every calculator is built and checked is set out on the methodology page.
Citation
Chalk Calculator. (2026, October 12). Quadratic Formula Calculator (Methodology version 1.0.0). https://chalkcalculator.com/quadratic-formula-calculator/Link to it from your site
<a href="https://chalkcalculator.com/quadratic-formula-calculator/">Quadratic Formula Calculator</a> from Chalk Calculator