Enter the three coefficients — the discriminant decides whether you get two real roots, one repeated root, or a complex pair.
For any equation of the form ax² + bx + c = 0, the roots are given by x = (−b ± √(b² − 4ac)) ÷ 2a. With the values this page opens with — a = 1, b = −3, c = 2 — the discriminant is 9 − 8 = 1, and the roots come out as x = 2 and x = 1.
It is worth seeing where it comes from, because the structure stops looking arbitrary once you do. The formula is just completing the square, carried out once in general rather than every time. Divide through by a, move the constant across, add (b÷2a)² to both sides to make the left a perfect square, take the square root, and solve for x. Every piece of the formula is a residue of that process: the −b÷2a is the axis of symmetry, and the square-root term is the distance from that axis out to each root.
That reading also explains the ±. A parabola is symmetric about its vertex, so the two roots sit equally far either side of −b÷2a. They are never at unrelated positions.
The quantity under the root, b² − 4ac, determines the character of the solutions on its own — which is why the calculator reports it separately:
A perfect square discriminant (1, 4, 9, 16…) additionally means the roots are rational, which is the sign that the expression would have factored — a = 1, b = −3, c = 2 gives a discriminant of 1, and indeed x² − 3x + 2 factors cleanly as (x − 1)(x − 2).
When the discriminant is negative the roots take the form p ± qi, always as a conjugate pair — if one root is 2 + 3i, the other is necessarily 2 − 3i. They cannot appear singly for an equation with real coefficients.
Whether that constitutes a solution depends on what you were modelling. For "at what time does the projectile hit the ground", complex roots mean it never does — the answer is that the situation has no real solution, which is genuine information rather than an error. In electrical engineering and signal processing, complex roots are the normal case and describe oscillation directly.
If a = 0 the equation is not quadratic and the formula divides by zero. What you have is the linear equation bx + c = 0, solved directly as x = −c ÷ b. The calculator flags this rather than returning nonsense. It matters most when a is not a number you typed but the output of an earlier step that happened to vanish.
When b² is much larger than 4ac, the formula is numerically fragile in a way that rarely gets taught. The square root comes out very close to |b|, so one of the two roots is computed as a subtraction of two nearly equal numbers — and floating-point arithmetic loses most of its significant digits doing that. The standard fix is to compute the well-conditioned root first, then obtain the other from the fact that the two roots multiply to c ÷ a. If you are implementing this in code rather than solving by hand, that is the version to write.
Need the vertex or the shape rather than the roots? The slope calculator and the scientific calculator cover the surrounding work.
For any equation in the form ax² + bx + c = 0 (with a ≠ 0), the solutions are x = (−b ± √(b² − 4ac)) / (2a). It works for every quadratic equation, unlike factoring, which only comes out cleanly when the roots happen to be nice whole numbers.
The discriminant is the part under the square root, b² − 4ac. If it's positive, there are two distinct real roots. If it's exactly zero, there's exactly one repeated real root — the parabola just touches the x-axis at a single point. If it's negative, there are no real roots at all; the two solutions form a complex conjugate pair instead.
If a = 0, the x² term vanishes and the equation collapses to bx + c = 0, a linear equation rather than a quadratic one, with at most one solution found by simple algebra instead. This calculator requires a nonzero a, since the quadratic formula divides by 2a and isn't defined when a = 0 — it flags that input with a warning.
A complex root has a real part and an imaginary part, written as real ± imaginary·i, where i represents the square root of −1. Geometrically, it means the parabola never crosses the x-axis — there's no real x value that satisfies the equation — but the solution still exists formally within the complex number system, which is standard territory in algebra, engineering, and physics once you go beyond real-number solutions.
Worked example (real roots): a=1, b=−3, c=2: discriminant = (−3)² − 4(1)(2) = 9 − 8 = 1, a perfect square, so roots = (3 ± 1)/2 = 2 and 1. Worked example (complex roots): a=1, b=2, c=5: discriminant = 4 − 20 = −16, negative, so roots = −1 ± (√16/2)i = −1 + 2i and −1 − 2i.
For coordinate geometry rather than algebra, the Slope Calculator and Coordinate Distance Calculator handle lines and points.