Quadratic Equation Calculator

Solve any quadratic equation — real roots, complex roots, vertex and discriminant, all shown.

Solve the quadratic equation

Enter the coefficients a, b and c of ax² + bx + c = 0 and the roots appear instantly — with the discriminant, vertex and every step of the quadratic formula. Inputs accept plain numbers or formulas like 2*3.

x^2 - 5x + 6 = 0

Must not be 0 for a quadratic — if a = 0, the equation is linear and this page solves that instead.

Can be any number, including 0 — then the roots are symmetric around 0.

The y-intercept: the value of the parabola at x = 0.

Two distinct real roots: x = 3 and x = 2.
Two distinct real roots
Discriminant (Δ = b² − 4ac)1
First root (x₁)3
Second root (x₂)2
Vertex(2.5, -0.25)
Axis of symmetryx = 2.5
Sum of roots (−b/a)5
Product of roots (c/a)6
Parabola opensupwards

Step-by-step working

  1. Discriminant: D = b^2 - 4ac = (-5)^2 - 4(1)(6) = 1.
  2. D > 0, so there are two distinct real roots.
  3. x = (-b +/- sqrt(D)) / 2a = (5 +/- 1) / 2.
  4. x1 = 3; x2 = 2.
  5. Check (Vieta): x1 + x2 = 5 = -b/a; x1 * x2 = 6 = c/a.

What Is a Quadratic Equation?

A quadratic equation is ax² + bx + c = 0, where a, b and c are numbers and a is not 0. The name comes from quadratus, Latin for square — the highest power of x is 2. Its graph is a parabola, the U-shaped curve that also describes the path of a thrown ball, the shape of a satellite dish and the cross-section of a headlight reflector. The solutions of the equation — called roots or zeros — are the x-values where the parabola crosses the x-axis, the points where y = 0. A quadratic has at most two roots, and the number it actually has depends on the discriminant, as the calculator shows. Quadratics appear wherever something changes at a changing rate: projectile motion, area problems, profit optimization, the physics of falling objects and the geometry of lenses.

The equation is called "standard form" when it is written as ax² + bx + c = 0 with the terms in descending powers of x. Before solving, any quadratic should be rearranged into this form — move everything to one side so that zero is on the other. For example, x² + 3 = 4x becomes x² − 4x + 3 = 0, with a = 1, b = −4, c = 3. The signs matter: b is −4 here, not 4, and forgetting a minus sign is the most common source of wrong answers. This calculator takes a, b and c exactly as they appear in standard form, so the rearrangement step is the one piece of work it leaves to the reader.

The Quadratic Formula

Every quadratic equation can be solved with one formula, discovered by completing the square on the general equation:

x = (−b ± √(b² − 4ac)) / 2a

The ± gives two answers — one with the plus, one with the minus — which is why a quadratic can have two roots. For x² − 5x + 6 = 0: a = 1, b = −5, c = 6. Substituting: x = (5 ± √(25 − 24)) / 2 = (5 ± 1) / 2, so x = 3 or x = 2. The formula never fails for a genuine quadratic (a ≠ 0), which is why it is the default tool for this kind of equation. Factoring is faster when the numbers are friendly, and completing the square is more illuminating, but the quadratic formula works on every case — including the ones where the roots are fractions, irrational numbers or complex.

The formula is derived by completing the square: divide through by a, move c to the other side, add (b/2a)² to both sides to make a perfect square, take the square root, and solve for x. The derivation is worth doing once, because it shows where the discriminant comes from — it is the part left under the square root after the algebra is done.

The Discriminant: How Many Roots?

The discriminant is Δ = b² − 4ac, the expression under the square root in the quadratic formula. It decides the nature of the roots before any square root is taken:

Checking the discriminant first is good practice: it tells you what kind of answer to expect, so a real root where a complex one was predicted (or the reverse) is an immediate sign of an arithmetic slip. The calculator shows the discriminant prominently for exactly that reason.

The Vertex and the Axis of Symmetry

Every parabola has a turning point — the vertex — and a vertical line through it, the axis of symmetry, that splits the parabola into mirror-image halves. The vertex sits at x = −b / 2a, and its y-value is y = −Δ / 4a. For x² − 5x + 6 = 0, the vertex is (2.5, −0.25): the lowest point of the curve, since a = 1 is positive and the parabola opens upwards. When a is negative, the parabola opens downwards and the vertex is the highest point. The axis of symmetry is the line x = −b / 2a, and the two roots (when they exist) sit symmetrically on either side of it — their average is always −b / 2a. That symmetry is the idea behind Vieta's formulas: the sum of the roots is −b/a and the product is c/a. For roots 2 and 3: sum 5 = −(−5)/1 and product 6 = 6/1. Checking those two numbers is the fastest way to verify a pair of roots without plugging them back in.

Worked Examples

Example 1 — Two real roots by the formula

Solve 2x² + 4x − 6 = 0.

Step 1: a = 2, b = 4, c = −6. Discriminant: Δ = 16 − 4(2)(−6) = 16 + 48 = 64.
Step 2: Δ > 0, so two real roots. x = (−4 ± √64) / 4 = (−4 ± 8) / 4.
Step 3: x₁ = 4/4 = 1; x₂ = −12/4 = −3.
Step 4: Check: sum 1 + (−3) = −2 = −b/a ✓; product 1 × (−3) = −3 = c/a ✓.

Example 2 — One repeated root

Solve x² − 6x + 9 = 0.

Step 1: Δ = 36 − 36 = 0.
Step 2: One repeated root: x = 6 / 2 = 3.
Step 3: Factored form: (x − 3)² = 0 — a perfect square, which is always the sign of Δ = 0.

Example 3 — Complex roots

Solve x² + 2x + 5 = 0.

Step 1: Δ = 4 − 20 = −16.
Step 2: Δ < 0, so the roots are complex: x = (−2 ± √−16) / 2 = (−2 ± 4i) / 2.
Step 3: x = −1 + 2i and x = −1 − 2i. The parabola's vertex is (−1, 4), above the x-axis, so it never crosses — consistent with no real roots.

Example 4 — A word problem

A ball is thrown upward from 5 metres with initial speed 20 m/s. Its height after t seconds is h = −4.9t² + 20t + 5. When does it hit the ground?

Step 1: Set h = 0: −4.9t² + 20t + 5 = 0.
Step 2: Δ = 400 − 4(−4.9)(5) = 400 + 98 = 498; √498 ≈ 22.32.
Step 3: t = (−20 ± 22.32) / (−9.8). The plus branch gives t ≈ 0.24 s (before the throw, discard); the minus branch gives t ≈ 4.32 s.
Step 4: The ball hits the ground after about 4.3 seconds. The negative root is a mathematical artifact of extending the parabola backward in time.

Other Ways to Solve a Quadratic

The quadratic formula is universal, but two other methods are faster when they apply. Factoring splits the quadratic into two linear factors: x² − 5x + 6 = (x − 2)(x − 3) = 0, so x = 2 or x = 3. Factoring works cleanly when the roots are integers or simple fractions — look for two numbers that multiply to c and add to b. Completing the square rewrites the equation as (x + p)² = q, which shows the vertex directly: x² − 6x + 5 = (x − 3)² − 4 = 0, so (x − 3)² = 4, x − 3 = ±2, x = 5 or 1. Completing the square is the method that proves the quadratic formula, and it is the most useful of the three for graphing, because vertex form (x − h)² + k shows the vertex (h, k) at a glance. When none of these is quick, the formula is the fallback — and the calculator above does the formula with the working shown.

Common Quadratic Mistakes to Avoid

The most common mistake is a sign error on b: in x² − 5x + 6 = 0, b is −5, so −b is +5. Forgetting that minus flips the roots entirely. Second, dividing by 2a, not just 2: the denominator is 2a, and when a is 2 or −1 the difference matters. Third, only taking one root: the ± is the whole point — a quadratic generally has two solutions, and word problems often need both (one may be discarded on physical grounds, as in the ball example, but it must be found first). Fourth, square-rooting the discriminant wrong: √64 = 8, but √(b² − 4ac) is not b − 2√(ac) — the square root does not distribute over subtraction. Fifth, calling Δ < 0 "no solution": there is no real solution, but there are two complex ones, and in engineering and physics those complex roots carry real meaning (damped oscillation, for instance). Finally, forgetting the a = 0 case: if the x² coefficient is 0, the equation is linear, not quadratic — the formula divides by 2a and breaks. This page handles that case by solving the linear equation instead.

Quadratic Equations in Real Life

Quadratics model anything that accelerates. A projectile's height over time is quadratic in t, which is why the ball example works. The area of a rectangle with a fixed perimeter is quadratic in its width — the maximum area (a square) sits at the vertex, a classic optimization. Profit as a function of price is often quadratic: raising the price increases margin per unit but reduces units sold, and the vertex is the profit-maximizing price. In electronics, the power dissipated in a resistor is quadratic in current (P = I²R). In finance, the time to double an investment under simple interest is a linear equation, but under compound interest with regular deposits the accumulated value is quadratic in the number of periods. And in computer graphics, Bézier curves — the curves behind fonts and vector art — are quadratic (or cubic) polynomials in a parameter t. Wherever a quantity depends on the square of another, a quadratic is waiting.

My saved numbers reuse them in any calculator

Save a number once — like your rent or hourly rate — then just type its name instead of the number, in any calculator here. You can also type formulas like 5000 * 1.1 right into any box.

    Saved only in this browser — nothing is sent to us.

    Frequently Asked Questions

    What is a quadratic equation?

    A quadratic equation is ax^2 + bx + c = 0 with a not equal to 0 — an equation where the highest power of x is 2. Its graph is a parabola, and its solutions (roots) are where the parabola crosses the x-axis.

    What is the quadratic formula?

    The quadratic formula solves any quadratic equation: x = (-b +/- sqrt(b^2 - 4ac)) / 2a. The +/- gives up to two roots. For x^2 - 5x + 6 = 0: x = (5 +/- sqrt(25 - 24)) / 2 = (5 +/- 1) / 2, so x = 3 or x = 2.

    What is the discriminant?

    The discriminant is D = b^2 - 4ac, the part under the square root. If D > 0 there are two distinct real roots; if D = 0 there is one repeated root; if D < 0 there are no real roots — instead there are two complex roots, and the parabola never touches the x-axis.

    How do I solve a quadratic with complex roots?

    When the discriminant is negative, take the square root of its absolute value and attach i: for x^2 + 2x + 5 = 0, D = -16, so x = (-2 +/- 4i) / 2 = -1 +/- 2i. The two roots are complex conjugates — same real part, opposite imaginary parts.

    What is the vertex of a parabola?

    The vertex is the turning point of the parabola: x = -b / 2a and y = -D / 4a. For x^2 - 5x + 6 = 0 the vertex is (2.5, -0.25). The parabola opens upwards when a is positive and downwards when a is negative.

    What happens when a = 0?

    With a = 0 the equation is no longer quadratic — it is the linear equation bx + c = 0, with one root x = -c/b. This calculator solves that case instead of failing. If b is also 0, there is either no solution (c is not 0) or every number is a solution (c is 0).

    Related Calculators

    Last reviewed: November 9, 2026 · Formulas verified for accuracy.