How to use the quadratic formula calculator
- Move every term to one side so the equation reads ax² + bx + c = 0.
- Type the coefficients into a (coefficient of x²), b (coefficient of x) and c (constant). Use 0 for a missing term.
- Read the roots at the top, then the discriminant, factored form and vertex. The steps box shows each substitution.
- Press a Try button to see irrational, repeated or complex roots.
How the quadratic formula works
The roots of ax² + bx + c = 0 are x = (-b ± √(b² - 4ac)) / (2a). The part under the root, Δ = b² - 4ac, is the discriminant: positive means two real roots, zero means one repeated root, and negative means two complex roots that are conjugates (OpenStax Intermediate Algebra, section 9.3). The calculator uses exact fractions, so 0.04 - 0.04 is exactly 0. It pulls square factors out of the root (√8 becomes 2√2) and reduces the fraction, so (2 ± 2√2) / 2 shows as 1 ± √2. Decimal roots use 10 significant digits and a form that avoids cancellation. The vertex is at x = -b / (2a) and y = -Δ / (4a).
Worked example with the starting numbers
The page opens with a = 1, b = -5 and c = 6, which is x² - 5x + 6 = 0. The discriminant is (-5)² - 4(1)(6) = 25 - 24 = 1, a positive perfect square, so x = (5 ± √1) / 2 gives x₁ = 3 and x₂ = 2. The factored form is (x - 3)(x - 2), the vertex is (2.5, -0.25), the axis of symmetry is x = 2.5, the parabola opens upward, and it crosses the y-axis at (0, 6).
Limits and edge cases
If a is 0 the equation is linear and the tool gives x = -c / b instead; if b is also 0 there is either no solution or every number is a solution. A blank box is an error, so type 0 for a missing term. Each coefficient may have up to 40 digits, and only real coefficients are supported. A repeated root is counted once, though it is a double root. Related tools: the slope calculator, the Pythagorean theorem calculator and the fraction calculator.
Quadratic formula FAQ
What is the discriminant of a quadratic equation?
The discriminant is b² - 4ac, the part under the square root. It is positive for two real roots, zero for one repeated root and negative for two complex roots. For x² - 5x + 6 = 0 it is 25 - 24 = 1.
Can a quadratic equation have only one solution?
Yes. When the discriminant is 0 the two roots are equal and the parabola just touches the x-axis. For x² - 6x + 9 = 0, Δ = 36 - 36 = 0 and the single root is x = 3.
How do I solve a quadratic when b or c is 0?
If b = 0, isolate x²: x² - 9 = 0 gives x = 3 or x = -3. If c = 0, factor out x: x² - 5x = 0 becomes x(x - 5) = 0, so x = 0 or x = 5. Type 0 for the missing term and the calculator does the rest.
What are complex roots?
They appear when the discriminant is negative, because the square root of a negative number is imaginary. They come as a conjugate pair p ± qi, where i² = -1. For x² + 2x + 5 = 0 the roots are -1 + 2i and -1 - 2i.
What happens if a is 0?
The x² term disappears and the equation is linear, bx + c = 0, with the single solution x = -c / b. If b is also 0 there is either no solution or every number is a solution. The calculator switches to this case automatically.
Source: OpenStax, Intermediate Algebra 2e, Solve Quadratic Equations Using the Quadratic Formula.