Quadratic Formula Calculator

Solve any quadratic equation with exact answers, step-by-step explanations, an interactive graph, and practice questions.

Enter coefficients

ax2+bx+c=0ax^2+bx+c=0

Decimals and fractions such as 1/4 are supported. a cannot be 0.

Current equation
x2−5x+6=0x^2 - 5x + 6 = 0
Examples:

Solution

Equation
x2−5x+6=0x^2 - 5x + 6 = 0
First root
x1=3x_1 = 3
Second root
x2=2x_2 = 2
Two distinct real rootsDiscriminant: Δ = 1
Vertex
(52,−14)(\frac{5}{2}, \frac{-1}{4})
Axis of symmetry
x=52x = \frac{5}{2}
Sum of roots
55
Product of roots
66
Factored form
(x−3)(x−2)=0(x - 3)(x - 2) = 0

Step-by-step solution

  1. 1

    Identify the coefficients

    Read a, b, and c from the normalized form ax² + bx + c = 0.

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

    Calculate the discriminant

    The sign of Δ determines the kind of roots and how the graph meets the x-axis.

    Δ=b2−4ac\Delta = b^2 - 4ac
    Δ=(−5)2−4(1)(6)=1\Delta = (-5)^2 - 4(1)(6) = 1
  3. 3

    Substitute into the quadratic formula

    Keep negative coefficients in parentheses so their signs remain clear.

    x=−b±√Δ2ax = \frac{-b \pm √\Delta}{2}a
    x=(−(−5)±1)/(2(1))x = (-(-5) \pm \sqrt{1}) / (2(1))
  4. 4

    Simplify the exact expression

    Reduce fractions and extract any perfect-square factor from the radical.

    x=3,2x = 3, 2
  5. 5

    Find both solutions

    Evaluate the plus and minus branches separately.

    x1=3≈3x₁ = 3 ≈ 3
    x2=2≈2x₂ = 2 ≈ 2
  6. 6

    Verify the result

    Substitution checks that each solution makes the original polynomial equal zero.

    For x1 = 3, ax² + bx + c = 0.

    For x2 = 2, ax² + bx + c = 0.

Graph

y = x² − 5x + 6

Graph of x² − 5x + 6 = 0A coordinate graph showing the parabola, vertex, axis of symmetry, and any real roots.-1.5-0.50.51.52.53.54.55.56.5-2.171.136666674.443333337.7511.056666714.363333317.67Vertexx1x2
ParabolaVertexReal rootsAxis of symmetry

Try it yourself

1 / 3
Solve for xx² − 4x + 3 = 0
Core concept

What Is the Quadratic Formula?

A quadratic formula calculator solves equations that can be written as ax² + bx + c = 0, where a is not zero. It uses the coefficients a, b, and c to calculate the discriminant and both roots. CalculatorGoat keeps rational answers as fractions, simplifies radicals, and identifies complex conjugate roots when the graph has no real x-intercepts.

x=−b±b2−4ac2a,a≠0x=\frac{-b\pm\sqrt{b^2-4ac}}{2a},\qquad a\ne0

The ± creates two branches. The discriminant is evaluated first, then its square root is added to and subtracted from −b before each numerator is divided by 2a.

Quadratic equation
A degree-two equation whose highest variable power is x².
Root or zero
A value of x that makes ax² + bx + c equal zero.
Discriminant
The value b² − 4ac, which determines the number and type of roots.
Vertex
The highest or lowest point of a parabola, located on its axis of symmetry.
Reliable method

How to Use the Quadratic Formula

First collect every term on one side so the equation equals zero. Then identify each coefficient—including zero for a missing term—and keep negative values in parentheses during substitution.

  1. 1

    Write the equation in standard form ax² + bx + c = 0.

  2. 2

    Identify a, b, and c, keeping negative signs attached.

  3. 3

    Calculate Δ = b² − 4ac.

  4. 4

    Substitute into the quadratic formula and simplify both ± branches.

  5. 5

    Verify each root in the original equation.

Root classification

What Does the Discriminant Tell You?

The discriminant Δ = b² − 4ac is the expression under the square root. It controls the number system needed for the roots and how the parabola meets the x-axis.

Δ > 0

Two distinct real roots

The graph crosses the x-axis twice. A perfect-square Δ gives rational roots; otherwise the roots are irrational.

Δ = 0

One repeated real root

The vertex touches the x-axis at one point. Both branches of ± simplify to the same value.

Δ < 0

Two complex roots

The real graph does not reach the x-axis. The roots form a complex conjugate pair involving i.

Why it works

Where Does the Quadratic Formula Come From?

The formula is the result of completing the square once for the general equation. Because no step depends on particular coefficient values, the result works for every quadratic with a ≠ 0.

  1. 1

    Start in standard form

    ax² + bx + c = 0
  2. 2

    Divide every term by a

    x² + (b/a)x + c/a = 0
  3. 3

    Move the constant

    x² + (b/a)x = −c/a
  4. 4

    Complete the square

    x² + (b/a)x + b²/(4a²) = −c/a + b²/(4a²)
  5. 5

    Write the perfect square

    (x + b/(2a))² = (b² − 4ac)/(4a²)
  6. 6

    Take both square roots

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

    Isolate x

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

Worked Examples

Example 1

Solve x² − 5x + 6 = 0.

Δ = (−5)² − 4(1)(6) = 1; x = (5 ± 1)/2x = 3 or x = 2

The positive perfect-square discriminant gives two distinct rational roots and two graph crossings.

Example 2

Solve x² − 4x + 4 = 0.

Δ = 16 − 16 = 0x = 2

The root repeats, so the parabola touches the x-axis at its vertex.

Example 3

Solve x² − 4x + 1 = 0.

Δ = 16 − 4 = 12x = 2 ± √3

The positive non-square discriminant produces two irrational exact roots.

Example 4

Solve x² + 2x + 5 = 0.

Δ = 4 − 20 = −16x = −1 ± 2i

The negative discriminant gives complex conjugate roots; the real graph never crosses the x-axis.

Example 5

Solve 2x² − 5x + 2 = 0.

Δ = 25 − 16 = 9x = 2 or x = 1/2

The fraction 1/2 is retained as an exact value rather than replaced by a rounded decimal.

Error prevention

Common Mistakes

  • Dropping the sign when substituting a negative b.

  • Forgetting the ± and reporting only one root.

  • Dividing only the radical term instead of the whole numerator by 2a.

  • Rounding before the exact expression is simplified.

  • Applying the formula when a = 0.

Assumptions and limitations

  • When a = 0 the equation is linear, so the quadratic formula would divide by zero.
  • A zero discriminant produces the same root twice.
  • A negative discriminant requires the complex unit i.
  • Decimal approximations should not replace exact fractions or radicals unless a rounded value is specifically requested.

Factoring can be faster for friendly integer roots, while completing the square exposes vertex form. The quadratic formula works for every valid quadratic equation and directly reveals the root type through its discriminant.

Questions answered

Frequently Asked Questions

What is the quadratic formula?

For ax² + bx + c = 0 with a ≠ 0, the roots are x = (−b ± √(b² − 4ac))/(2a).

What does the discriminant tell me?

A positive discriminant gives two distinct real roots, zero gives one repeated real root, and a negative discriminant gives two complex conjugate roots.

Can I enter fractions and decimals?

Yes. Enter fractions such as 1/2 or terminating decimals such as 0.5. They are converted to exact rational values before solving.

Can I paste a complete equation?

Yes. Equations such as 3x^2 = 2x + 1 are safely parsed and rearranged into standard form without evaluating arbitrary code.

Why is a = 0 invalid?

If a is zero there is no x² term, and the denominator 2a is also zero. The remaining equation is linear rather than quadratic.

Why does the calculator show a radical and a decimal?

The simplified radical is exact. The decimal is an approximation that helps with graph reading and measurement.

How is the vertex related to the roots?

Its x-coordinate −b/(2a) is the axis of symmetry and, when two real roots exist, it is their midpoint.

Should I factor or use the formula?

Factor when the pattern is obvious and quick. Use the formula when factoring is unclear, coefficients are awkward, or you need a method guaranteed to work.

Verified sources

References & Technical Sources

Keep calculating

Related Calculators