What this calculator does
This tool solves any quadratic equation written in standard form, \(a \cdot x^2 + b \cdot x + c = 0\), using the classic quadratic formula. Enter the three coefficients and it returns both roots, the value of the discriminant, and a plain-language statement of whether the roots are real or complex. It handles negative coefficients and reports complex conjugate roots in the familiar \(p \pm q \cdot i\) form.
How to use it
Type the coefficient of x² into a, the coefficient of x into b, and the constant term into c. Coefficient a must not be 0 — if it is, the equation is linear rather than quadratic, and the calculator falls back to solving \(b \cdot x + c = 0\). Press calculate to see x₁, x₂, and the discriminant.
The formula explained
The quadratic formula is $$x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}.$$ The expression under the square root, \(D = b^2 - 4ac\), is called the discriminant. Its sign tells you everything about the roots: when \(D > 0\) there are two distinct real roots; when \(D = 0\) there is exactly one real root repeated twice; when \(D < 0\) there are two complex conjugate roots, with real part \(-b/(2a)\) and imaginary part \(\sqrt{-D}/(2a)\).
Worked example
Solve \(x^2 - 3x + 2 = 0\), so \(a = 1\), \(b = -3\), \(c = 2\). The discriminant is $$D = (-3)^2 - 4 \cdot 1 \cdot 2 = 9 - 8 = 1,$$ which is positive, so two real roots exist. \(\sqrt{1} = 1\), giving \(x_1 = (3 + 1)/2 = 2\) and \(x_2 = (3 - 1)/2 = 1\). The equation factors as \((x - 2)(x - 1) = 0\), confirming the result.
FAQ
What if the discriminant is negative? The equation has no real solutions; the calculator returns two complex conjugate roots in \(p \pm q \cdot i\) form.
Why must a not be zero? The denominator \(2a\) would be zero, and the equation would no longer be quadratic. This calculator instead solves the linear case \(x = -c/b\).
What does a repeated root mean? When \(D = 0\) the parabola just touches the x-axis at a single point, so both roots are identical: \(x = -b/(2a)\).