All Solvers/Quadratic Equation Solver
Free Solver, No Sign-up

Quadratic Equation Solver with Steps

Enter the coefficients of ax² + bx + c = 0 and get the roots, the discriminant, and the complete step-by-step solution using the quadratic formula.

Quadratic equation

ax2 + bx + c = 0

Tip: enter negative coefficients with a minus sign (e.g. −5). For more complex problems, use the photo solver.

How the quadratic formula works

The Formula

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

For any quadratic ax² + bx + c = 0 where a ≠ 0, this formula gives the two roots directly. The expression under the square root, b² − 4ac, is called the discriminant and tells you what kind of roots to expect.

D > 0

Two real roots

The parabola crosses the x-axis at two distinct points.

D = 0

One repeated root

The parabola touches the x-axis at exactly one point.

D < 0

Complex roots

The parabola does not touch the x-axis. Roots involve i.

Worked Examples

Five quadratic equations, solved step by step

Each example shows a different case you'll see in real problems , distinct, repeated, complex, factorable, and fractional coefficients.

Example 1, Two distinct real roots

x² − 5x + 6 = 0

x₁ = 3, x₂ = 2
  1. 1

    Identify coefficients

    a = 1, b = −5, c = 6
  2. 2

    Compute discriminant

    D = b² − 4ac = 25 − 24 = 1
  3. 3

    Apply the formula

    x = (5 ± √1) / 2 = (5 ± 1) / 2
  4. 4

    Final roots

    x₁ = 6/2 = 3, x₂ = 4/2 = 2

Since D > 0, the equation has two different real roots. This is the most common case in introductory algebra.

Coefficients: a = 1, b = -5, c = 6

Discriminant: D = (−5)² − 4(1)(6) = 25 − 24 = 1

Example 2, One repeated real root

x² − 4x + 4 = 0

x₁ = x₂ = 2
  1. 1

    Identify coefficients

    a = 1, b = −4, c = 4
  2. 2

    Compute discriminant

    D = 16 − 16 = 0
  3. 3

    Apply the formula

    x = (4 ± √0) / 2 = 4/2
  4. 4

    Single repeated root

    x = 2 (multiplicity 2)

When D = 0, the parabola touches the x-axis at exactly one point. This is also called a 'double root' or 'repeated root'.

Coefficients: a = 1, b = -4, c = 4

Discriminant: D = (−4)² − 4(1)(4) = 16 − 16 = 0

Example 3, Complex (no real) roots

x² + 2x + 5 = 0

x = −1 ± 2i
  1. 1

    Identify coefficients

    a = 1, b = 2, c = 5
  2. 2

    Compute discriminant

    D = 4 − 20 = −16 (negative)
  3. 3

    Rewrite using i

    √(−16) = 4i
  4. 4

    Final complex roots

    x = (−2 ± 4i) / 2 = −1 ± 2i

When D < 0, the equation has no real solutions. The two roots are complex conjugates, expressed using the imaginary unit i where i² = −1.

Coefficients: a = 1, b = 2, c = 5

Discriminant: D = (2)² − 4(1)(5) = 4 − 20 = −16

Example 4, Factorable quadratic

2x² + 7x + 3 = 0

x₁ = −1/2, x₂ = −3
  1. 1

    Identify coefficients

    a = 2, b = 7, c = 3
  2. 2

    Compute discriminant

    D = 49 − 24 = 25 = 5²
  3. 3

    Apply the formula

    x = (−7 ± 5) / 4
  4. 4

    Final roots

    x₁ = −2/4 = −1/2, x₂ = −12/4 = −3

When the discriminant is a perfect square and the coefficients are integers, the equation often factors cleanly. (2x + 1)(x + 3) = 0 gives the same roots.

Coefficients: a = 2, b = 7, c = 3

Discriminant: D = 7² − 4(2)(3) = 49 − 24 = 25

Example 5, Quadratic with fractional coefficient

0.5x² − 2x − 6 = 0

x₁ ≈ 6, x₂ ≈ −2
  1. 1

    Identify coefficients

    a = 0.5, b = −2, c = −6
  2. 2

    Compute discriminant

    D = 4 − (−12) = 16
  3. 3

    Apply the formula

    x = (2 ± √16) / 1 = (2 ± 4)
  4. 4

    Final roots

    x₁ = 6, x₂ = −2

Multiplying both sides by 2 first turns this into x² − 4x − 12 = 0, which factors as (x − 6)(x + 2) = 0. Either approach gives the same roots.

Coefficients: a = 0.5, b = -2, c = -6

Discriminant: D = (−2)² − 4(0.5)(−6) = 4 + 12 = 16

The quadratic equation solver, explained from the ground up

A quadratic equation is any equation that can be written in the form ax² + bx + c = 0, where a, b, and c are numbers and a is not zero. Quadratic equations show up everywhere in mathematics, physics, engineering, and economics, anywhere you describe parabolic motion, area, optimization, or growth that levels off. This solver handles all of them with full step-by-step solutions, completely free.

When you need a quadratic equation solver

You reach for a quadratic solver any time a problem reduces to finding the values of a variable that make a second-degree polynomial equal zero. Common examples include finding where a projectile lands, calculating the dimensions of a rectangle given its area and perimeter, optimizing revenue in a pricing problem, or simply working through algebra homework. The solver above gives you the answer plus every intermediate step, so it works as both an answer key and a study aid.

Methods for solving quadratic equations

There are several classical methods: factoring (works when roots are rational), completing the square (a foundational technique), the quadratic formula (always works), and graphing (for visual estimates). This solver uses the quadratic formula because it handles every case uniformly, including complex roots, and produces clean steps you can follow by hand. Each worked example above corresponds to a different scenario you'll encounter in coursework and exam problems.

Understanding the discriminant

The discriminant, D = b² − 4ac, is the single most important quantity in a quadratic equation. Its sign alone tells you the nature of the roots before you do any other work. A positive discriminant means two distinct real roots, zero means one repeated real root, and negative means two complex conjugate roots. Learning to spot the discriminant's sign by inspection is a powerful shortcut in algebra and pre-calculus.

From algebra class to real applications

Beyond schoolwork, the quadratic formula is the workhorse of any field that involves curves, growth, or motion. In physics, free-fall and projectile motion are quadratic in time. In economics, profit and cost models often involve quadratic terms. In engineering, parabolic shapes appear in antennas, headlights, bridges, and arches. Mastering the quadratic formula isn't just an academic exercise, it's a tool you reuse for the rest of your technical life.

Tips for using this solver effectively

Enter coefficients exactly as they appear in the original equation, including negative signs. Decimals and fractions both work, just use the decimal form (e.g. enter 0.5 for one-half). If the leading coefficient is not 1, the solver still applies the quadratic formula correctly. For equations that aren't already in standard form, rearrange them to ax² + bx + c = 0 before entering values. For more complex problems, including word problems and handwritten equations, use the photo solver on our homepage instead.

Need to solve something more complex?

Cubic equations, systems of equations, calculus problems, or word problems are all supported on our main solver, upload a photo or type the problem and the AI handles the rest.

Got a photo of a math problem?

Skip the typing , upload a photo and get a full step-by-step solution for any equation in seconds.

Try the Photo Solver