Quadratic Formula Calculator

Enter the coefficients a, b and c. The calculator finds both roots, real or complex, shows the working, and gives the exact form, the factored form when the roots are rational, and the parabola's vertex.

For ax² + bx + c = 0. Decimals and fractions such as 1/2 work.

Result

Two rational roots
x = 3 or x = 0.5
  • Factored form(x − 3)(2x − 1) = 0
  • Discriminant (b² − 4ac)25
  • Vertex(1.75, -3.125)
  • Axis of symmetryx = 1.75
  • y-intercept(0, 3)
  • OpensUpward (minimum at the vertex)
  • Sum and product of roots3.5 and 1.5
  • Equation: 2x² − 7x + 3 = 0
  • Discriminant: b² − 4ac = (-7)² − 4 × 2 × 3 = 25
  • The discriminant is a perfect square (25 = 5²), so the roots are rational.
  • x = (−b ± √25) ÷ 2a = (7 ± 5) ÷ 4
  • Vertex: x = −b ÷ 2a = 1.75, y = c − b² ÷ 4a = -3.125.

How to use the quadratic formula calculator

Write your equation in the standard form ax² + bx + c = 0, moving every term to one side first. Then enter:

  • a: the number in front of x² (it cannot be 0)
  • b: the number in front of x (leave it blank if there is no x term)
  • c: the constant (leave it blank if there is none)

Use negative signs where needed. For x² − 5x = 6, first rewrite it as x² − 5x − 6 = 0, then enter a = 1, b = −5 and c = −6.

The quadratic formula

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

The ± gives the two roots, one for each sign. The part under the square root, b² − 4ac, is the discriminant.

The formula comes from completing the square. Divide by a, move c/a across, add (b/2a)² to both sides, and take the square root. The same working gives the vertex of the parabola y = ax² + bx + c at x = −b ÷ 2a, with y = c − b² ÷ 4a. The vertical line through the vertex is the axis of symmetry, and the two roots sit at equal distances on either side of it.

Worked example: 2x² − 7x + 3 = 0

These are the default coefficients: a = 2, b = −7, c = 3.

  1. Discriminant: (−7)² − 4 × 2 × 3 = 49 − 24 = 25. It is positive and a perfect square (5²), so there are two rational roots.
  2. Apply the formula: x = (7 ± 5) ÷ 4.
  3. Roots: (7 + 5) ÷ 4 = 3 and (7 − 5) ÷ 4 = 0.5.
  4. Factored form: the root 3 gives (x − 3), and the root 1/2 gives (2x − 1). Their product is 2x² − 7x + 3, so the equation is (x − 3)(2x − 1) = 0.
  5. Vertex: x = 7 ÷ 4 = 1.75 and y = 3 − 49 ÷ 8 = −3.125. Because a > 0, the parabola opens upward and its lowest point is (1.75, −3.125).
  6. Check: the roots add up to 3.5 = −b ÷ a and multiply to 1.5 = c ÷ a, as Vieta’s formulas say they should.

Irrational and complex roots

When the discriminant is not a perfect square, the calculator simplifies the radical. For x² + x − 1 = 0, D = 5, and the roots are (−1 ± √5) ÷ 2, which is about 0.618 and −1.618. For 2x² − 4x − 2 = 0, D = 32 = 16 × 2, which simplifies to x = 1 ± √2. The root calculator shows the same simplification for any radical.

When D is negative, the square root is imaginary. For x² + 2x + 5 = 0, D = −16, so √D = 4i and x = −1 ± 2i. Complex roots always come in conjugate pairs like this when a, b and c are real.

Limitations

  • Each coefficient can have up to 15 digits, including those in a fraction.
  • Exact radical forms are fully simplified when the scaled discriminant is at most 10^18. Above that, only small square factors are taken out.
  • Decimal answers are shown to 10 significant figures. The small root of a lopsided equation, such as x² − 10¹⁰x + 1 = 0, is computed with a rearranged formula, so it keeps its accuracy.

Frequently asked questions

What does the discriminant tell me?

The discriminant D = b² − 4ac decides what kind of roots you get. If D is positive there are two different real roots, and if it is also a perfect square they are rational. If D is 0 there is one repeated real root. If D is negative there are two complex roots and the parabola never touches the x-axis.

When can a quadratic be factored?

Over the integers, exactly when the discriminant is a perfect square, so the roots are rational. Then each root p/q gives a factor (qx − p). For 2x² − 7x + 3, the roots 3 and 1/2 give (x − 3)(2x − 1). Otherwise the roots involve a square root or i, and the formula is the way to go.

What if a is 0?

Then there is no x² term, and the equation is linear: bx + c = 0, so x = −c ÷ b. The calculator points this out and gives that answer instead of applying the quadratic formula, which would divide by zero.

Can I enter decimals or fractions?

Yes. Coefficients such as 0.5 or 3/4 are read exactly. The equation is multiplied through by a common denominator, which does not change the roots, so exact radical and factored forms still work.

Last reviewed: