How to use it
- Type the number in front of x² into Number a. It cannot be 0.
- Type the number in front of x into Number b, and the constant into Number c. Use a minus sign for negative numbers.
- Read Roots (values of x) and the Discriminant. The result updates as you type.
- Check Vertex, Factored form and the graph, and go through How it is worked out to see each step.
The quadratic formula and the discriminant
A quadratic equation has the form ax² + bx + c = 0, where a is not 0. Its roots are given by the quadratic formula. The number under the square root, D = b² − 4ac, is the discriminant, and it decides what kind of roots there are.
x = (−b ± √D) ÷ 2a
D = b² − 4ac
- D greater than 0: two different real roots.
- D equal to 0: one real root, −b ÷ 2a, which counts as a double root.
- D less than 0: two complex roots a ± bi, where i is the square root of −1.
Exact roots and decimal approximations
When D is a perfect square the roots are simple fractions. Otherwise the square root is written exactly: for x² − 8x + 4 = 0, D = 48 = 4² × 3, so the roots are 4 − 2√3 ≈ 0.5359 and 4 + 2√3 ≈ 7.4641.
The decimal values use the stable form of the formula, q = −(b + sgn(b)√D) ÷ 2, with x₁ = q ÷ a and x₂ = c ÷ q. With the textbook form, one root loses most of its digits when −b and √D have opposite signs and nearly the same size. The stable form avoids that loss.
What this calculator does not cover
- Equations where a is 0, which are linear, and equations of degree three or more.
- Square factors above 10,000 in D are not removed, so such a root may not be fully simplified.
- Equations with a variable other than x, or with more than three numbers.
Worked example: x² − 5x + 6 = 0
With a = 1, b = −5 and c = 6, the discriminant is D = (−5)² − 4 × 1 × 6 = 25 − 24 = 1. D is positive and a perfect square, so both roots are rational: x = (5 ± 1) ÷ 2, which gives 3 and 2.
The vertex is at x = 5/2, and the parabola's lowest point is (2.5, −0.25). The factored form is (x − 2)(x − 3), so the graph crosses the x axis at 2 and 3.
| Result | |
|---|---|
| Roots | x₁ = 2 and x₂ = 3 |
| Discriminant | 1 |
| Vertex | (2.5, −0.25) |
| Factored form | (x − 2)(x − 3) |
Frequently asked questions
What is the discriminant?
The discriminant D = b² − 4ac is the part of the quadratic formula under the square root. If D is positive there are two real roots, if it is zero there is one double root, and if it is negative the roots are complex.
Why do I see roots like 4 − 2√3?
Some roots are neither whole numbers nor simple fractions. The exact form 4 − 2√3 is shown first, followed by its decimal value, 0.5359, so you can use either.
What does the vertex mean?
The vertex is the lowest point of a parabola that opens upwards (a greater than 0) and the highest point of one that opens downwards (a less than 0). Its x value is −b ÷ 2a.
Can a be zero?
No. If a is 0 the x² term disappears and the equation is linear, with the single root −c ÷ b. A quadratic equation needs a number for a that is not zero.
Does it work with decimal numbers?
Yes. Decimal numbers are read exactly, so an equation such as 0.5x² + x + 0.125 = 0 is solved without rounding its numbers first.
Are the numbers I enter sent to a server?
No. The equation is solved in your browser, and nothing you enter is sent to us.
Sources
Figures and text last checked on Tuesday, November 10, 2026.