Quadratic Equation Calculator
Values
Fill in the values and click Calculate to see results
Example 1
Find the roots of x² − 5x + 6 = 0 using the quadratic formula.
Solution
Identify the coefficients: a = 1, b = −5, c = 6.
Since D > 0, there are two distinct real roots.
Answer
The roots are x₁ = 3 and x₂ = 2. Substituting either value back into the original equation gives zero, confirming both solutions.
Example 2
Solve x² − 4x + 2 = 0, where the solutions are irrational.
Solution
Identify the coefficients: a = 1, b = −4, c = 2.
Since D = 8 is positive but not a perfect square, the roots are irrational.
Answer
The two irrational roots are x ≈ 3.414 and x ≈ 0.586, or exactly 2 + √2 and 2 − √2. The parabola crosses the x-axis at these two points because the discriminant is positive.
Example 3
Solve x² − 6x + 9 = 0 and interpret the result.
Solution
Identify the coefficients: a = 1, b = −6, c = 9.
Since D = 0, there is exactly one repeated real root.
This can also be seen by factoring: x² − 6x + 9 = (x − 3)² = 0.
Answer
The equation has one repeated root: x = 3. The parabola touches the x-axis at its vertex (3, 0) and opens upward, so there is only a single point of contact.
Example 4
Solve the quadratic equation 2x² + 3x + 5 = 0.
Solution
Identify the coefficients: a = 2, b = 3, c = 5.
Since D < 0, there are two complex conjugate roots.
Answer
The roots are complex conjugates: x ≈ −0.75 + 1.3919i and x ≈ −0.75 − 1.3919i. The parabola opens upward (a = 2 > 0) and lies entirely above the x-axis, which is why there are no real solutions.
Published:
Updated:
References
- [1]MathWorld – Wolfram Research, Weisstein, Eric W. "Quadratic Formula.". https://mathworld.wolfram.com/QuadraticFormula.html
- [2]Khan Academy, Khan Academy. "Solving Quadratic Equations.". https://www.khanacademy.org/math/algebra/x2f8bb11595b61c86:quadratic-functions-equations
- [3]Cengage Learning, 9th Edition, Chapter P.5, Stewart, James. "Calculus: Early Transcendentals.".
- [4]National Institute of Standards and Technology, NIST Digital Library of Mathematical Functions. "Quadratic Equations.". https://dlmf.nist.gov/
Glossary
- Quadratic equation – A second-degree polynomial equation of the form ax² + bx + c = 0, where a ≠ 0. It has at most two solutions (roots).
- Discriminant – The expression D = b² − 4ac under the square root in the quadratic formula. Its sign determines whether the roots are real, repeated, or complex.
- Parabola – The U-shaped curve that graphs a quadratic function f(x) = ax² + bx + c. It opens upward when a > 0 and downward when a < 0.
- Vertex – The highest or lowest point of a parabola, located at (h, k) where h = −b/(2a) and k = f(h).
- Axis of symmetry – The vertical line x = −b/(2a) that divides the parabola into two mirror halves. The vertex lies on this line.
- Roots – The values of x that satisfy ax² + bx + c = 0. Also called zeros or solutions. They correspond to the x-intercepts of the parabola.
- Complex roots – Solutions involving the imaginary unit i = √(−1), occurring when the discriminant is negative. They always appear in conjugate pairs p ± qi.
- Factoring – Rewriting ax² + bx + c as a product of linear terms, e.g., (x − r₁)(x − r₂). Only works neatly when roots are rational.
- Completing the square – An algebraic method that rewrites ax² + bx + c as a(x − h)² + k, directly revealing the vertex. The quadratic formula is derived from this technique.
- Quadratic formula – The formula x = (−b ± √(b² − 4ac)) / (2a) that gives exact solutions to any quadratic equation.
How to Use?
- 1
Enter the coefficients
Type the values of a, b, and c from your quadratic equation ax² + bx + c = 0. The coefficient a must be non-zero for the equation to be quadratic.
- 2
Click Calculate
Press Calculate to solve the equation. The calculator determines the discriminant, classifies the roots, and computes both solutions.
- 3
Read the results
The results panel shows the root classification, individual roots (real or complex), discriminant value, and vertex coordinates.
- 4
Inspect the graph
The parabola graph displays the curve with real roots marked on the x-axis and the vertex highlighted. Use it to visualise the equation geometrically.
Frequently Asked Questions
A quadratic equation is any equation that can be written in the form ax² + bx + c = 0, where a, b, and c are real numbers and a ≠ 0. It is a second-degree polynomial equation, meaning the highest power of the variable x is 2. Quadratic equations have at most two solutions (roots) and graph as parabolas.
The discriminant D = b² − 4ac determines the nature of the roots without computing them. If D > 0, there are two distinct real roots. If D = 0, there is one repeated real root. If D < 0, there are two complex conjugate roots. The discriminant is the value under the square root in the quadratic formula.
Complex roots occur when the discriminant is negative, meaning the parabola never crosses the x-axis. The roots take the form p ± qi, where p is the real part, q is the imaginary part, and i = √(−1). Complex roots always come in conjugate pairs. For example, x² + 1 = 0 has roots x = ±i.
The vertex of the parabola y = ax² + bx + c is at the point (h, k) where h = −b/(2a) and k = f(h) = a(h)² + b(h) + c. The vertex represents the minimum point (when a > 0) or maximum point (when a < 0) of the parabola. This calculator computes both vertex coordinates automatically.
Yes. When the discriminant is negative, the calculator returns complex conjugate roots in the form p ± qi. The real and imaginary parts are shown separately in the results panel. The graph will show the parabola without x-axis crossings.
Factoring splits the quadratic into two linear terms (e.g., x² − 5x + 6 = (x − 2)(x − 3)) and is fast when the roots are rational integers. The quadratic formula x = (−b ± √D) / (2a) works for every quadratic equation, including those with irrational or complex roots. Use the quadratic formula when factoring is not obvious or when the discriminant is not a perfect square.
Substitute each root back into the original equation ax² + bx + c = 0. If the result is zero (within rounding tolerance), the solution is correct. You can also use Vieta’s formulas: the sum of roots should equal −b/a and the product should equal c/a.
If a = 0, the equation is no longer quadratic – it becomes a linear equation bx + c = 0 with at most one solution x = −c/b (assuming b ≠ 0). This calculator validates that a ≠ 0 before solving. If you need to solve a linear equation, rearrange it directly: x = −c/b.
Move every term to one side of the equals sign so the other side is zero, then arrange the terms in descending powers of x. For example, 2x² + 7 = 5x becomes 2x² − 5x + 7 = 0. Then read off a as the coefficient of x², b as the coefficient of x, and c as the constant term. If a term is missing, its coefficient is zero. This is the only requirement before entering values into the calculator.
A repeated (or double) root occurs when the discriminant equals zero. The quadratic formula yields a single value because ±√0 adds nothing, so both the plus and minus branches give the same root. Geometrically, the parabola is tangent to the x-axis at its vertex, touching it at exactly one point. For example, x² − 6x + 9 = (x − 3)² = 0 has the repeated root x = 3.
Yes. The calculator accepts any real coefficient, including decimals and negative values. For example, solving 0.5x² − 1.25x + 0.75 = 0 works exactly like one with integer coefficients. Fractions and decimals do not change the method – the quadratic formula still applies and the discriminant is still computed the same way. Results are reported to six decimal places.
Completing the square rewrites ax² + bx + c as a(x − h)² + k, which directly reveals the vertex (h, k) and lets you solve by taking square roots. It is the derivation from which the quadratic formula is built. The quadratic formula is a ready-made result of that process, so it is faster in practice. Use completing the square when you specifically need vertex form; otherwise the formula is simpler. This calculator uses the formula and reports the vertex separately.
The axis of symmetry is the vertical line that passes through the vertex, given by x = −b/(2a). It divides the parabola into two mirror-image halves. The vertex’s x-coordinate lies on this line, so the axis of symmetry always has the equation x = h where h = −b/(2a). This calculator reports the axis of symmetry alongside the vertex and roots.
No. A quadratic equation is a degree-2 polynomial, and the fundamental theorem of algebra guarantees that it has exactly two roots when complex roots are counted (accounting for multiplicity). A repeated root is counted twice. It will never have more than two solutions. Higher-degree equations, such as cubic or quartic, can have more roots, but a quadratic is always limited to at most two.
Yes. This quadratic equation solver is completely free and works in your browser without any sign-up or download. There is no limit on the number of calculations, so you can solve as many equations as you need – homework problems, exam practice, or real-world engineering checks. Every result includes the discriminant, the roots to six decimal places, and the vertex.
Related Calculators
Explore All 3 Maths CalculatorsBrowse by Category
Browse All 9 CategoriesShare: