Skip to content
FigureSure
Sign in

Quadratic Formula Calculator

Solve any quadratic equation ax² + bx + c = 0 with the quadratic formula. You get real or complex roots, exact answers in simplest radical form where the coefficients are whole numbers, the discriminant, vertex, axis of symmetry and a step-by-step working you can follow or copy.
  • Updated
  • Formula shown

Coefficients of ax² + bx + c = 0

Results

Roots x₁ and x₂
2 and 1
Two real roots: the parabola crosses the x-axis twice
Exact roots
x = 2, 1
Factored form
(x − 2)(x − 1) = 0
Discriminant (D)
Positive: two real roots
1
Vertex (h, k)
Minimum value −0.25 at x = 1.5
(1.5, −0.25)
Axis of symmetry
x = 1.5
Opens
a > 0
Upwards
y-intercept
(0, 2)
Sum and product of roots
Vieta: x₁ + x₂ = −b ÷ a, x₁ × x₂ = c ÷ a
3, 2

x² − 3x + 2 = 0: x = 2 or x = 1; vertex (1.5, −0.25)

Working for x² − 3x + 2 = 0
StepWorking
1. Identify the coefficientsa = 1, b = −3, c = 2
2. DiscriminantD = b² − 4ac = (−3)² − 4 × 1 × 2 = 9 − 8 = 1
3. Square root of D√1 = 1
4. Quadratic formulax = (−b ± √D) ÷ 2a = (3 ± √1) ÷ 2
5. Rootsx₁ = (3 + 1) ÷ 2, x₂ = (3 − 1) ÷ 2 → 2 and 1
5a. Exact formx = 2 or 1
6. Vertexh = −b ÷ 2a = 1.5, k = c − b² ÷ 4a = −0.25

How to use the quadratic formula calculator

  1. Rearrange your equation so one side is zero: ax² + bx + c = 0. For example, x² = 3x − 2 becomes x² − 3x + 2 = 0.
  2. Enter a, b and c, including their signs. Use 0 for a missing term (in x² − 9 = 0, b is 0).
  3. Read the roots, the exact form, the vertex and the full working. If a is 0, the calculator solves the linear equation bx + c = 0 instead.

The quadratic formula

x = (−b ± √(b² − 4ac)) ÷ 2a
Discriminant: D = b² − 4ac
Vertex: h = −b ÷ 2a, k = c − b² ÷ 4a · Axis of symmetry: x = h
Vieta's formulas: x₁ + x₂ = −b ÷ a, x₁ × x₂ = c ÷ a

The formula comes from completing the square on ax² + bx + c = 0, and it works for every quadratic, including ones that do not factor neatly. The discriminant under the square root decides what kind of roots you get: positive means two different real roots, zero means one repeated root, and negative means two complex roots that are conjugates of each other (a ± bi). When the discriminant is a perfect square and the coefficients are whole numbers, the roots are rational and the quadratic factors over the integers. The graph of y = ax² + bx + c is a parabola whose turning point is the vertex (h, k); it opens upwards when a is positive and downwards when a is negative.

On a computer, the textbook formula can lose accuracy when b² is much larger than 4ac, because −b and √D nearly cancel. This calculator uses the numerically stable rearrangement (q = −(b + sign(b)·√D) ÷ 2, then x₁ = q ÷ a and x₂ = c ÷ q), which gives the same roots without that loss.

Worked examples

Two rational roots. For 2x² − 7x + 3 = 0: a = 2, b = −7, c = 3, so D = (−7)² − 4 × 2 × 3 = 49 − 24 = 25 and √D = 5. Then x = (7 ± 5) ÷ 4, giving x = 3 or x = 1/2. The equation factors as (x − 3)(2x − 1) = 0.

Complex roots. For x² + 2x + 5 = 0, D = 4 − 20 = −16, so √D = 4i and x = (−2 ± 4i) ÷ 2 = −1 ± 2i. The parabola's lowest point is (−1, 4), above the x-axis, which is why there are no real roots.

A thrown ball. Ignoring air resistance, a ball thrown upwards at 20 m/s from 1.5 m has height h = −4.9t² + 20t + 1.5 meters after t seconds. Setting h = 0 gives roots t = 4.16 and t = −0.07; only the positive one makes sense, so it lands after about 4.16 s. The vertex says it peaks at 21.91 m after 2.04 s.

What the discriminant tells you

DiscriminantRootsGraph
D > 0, perfect squareTwo different rational rootsCrosses the x-axis twice
D > 0, not a perfect squareTwo different irrational rootsCrosses the x-axis twice
D = 0One repeated real rootTouches the x-axis at the vertex
D < 0Two complex conjugate rootsDoes not meet the x-axis

Solved examples

Each row was solved with this calculator's engine.

EquationDRootsExactVertex
x² − 5x + 6 = 013, 23, 2(2.5, −0.25)
x² − 4 = 0162, −22, −2(0, −4)
x² + 4x + 4 = 00−2−2(−2, 0)
x² + x − 1 = 050.618, −1.618(−1 ± √5)/2(−0.5, −1.25)
2x² − 7x + 3 = 0253, 0.53, 1/2(1.75, −3.125)
x² + 2x + 5 = 0−16−1 ± 2i−1 ± 2i(−1, 4)
x² + 1 = 0−40 ± 1i±i(0, 1)
3x² + 2x − 2 = 0280.5486, −1.2153(−1 ± √7)/3(−0.3333, −2.3333)

Tips and common mistakes

  • Get zero on one side first. The formula only applies to ax² + bx + c = 0; moving terms across changes their signs.
  • Watch the sign of b. −b means the opposite of b: if b = −7, then −b = 7. Squaring a negative b always gives a positive b².
  • Divide the whole numerator by 2a. Both −b and √D are over 2a, not just the square root.
  • Check with Vieta. The roots should add up to −b ÷ a and multiply to c ÷ a; it is a quick way to catch arithmetic slips.

To explore straight lines, use the slope calculator, and for systems of linear equations written as matrices, the matrix calculator finds determinants and inverses.

Frequently asked questions

What is the quadratic formula?

For ax² + bx + c = 0, the roots are x = (−b ± √(b² − 4ac)) ÷ 2a. For 2x² − 7x + 3 = 0, the discriminant is 25, so x = (7 ± 5) ÷ 4, which gives x = 3 or x = 1/2.

What does the discriminant tell you?

The discriminant D = b² − 4ac shows the type of roots before you solve. If D is positive there are two real roots, if it is zero there is one repeated root, and if it is negative the roots are complex. For x² + 2x + 5 = 0, D = −16, so the roots are complex.

How do I find the vertex of a parabola?

The vertex is at x = −b ÷ 2a; substitute that back in to get y, or use k = c − b² ÷ 4a. For y = x² − 3x + 2 the vertex is (1.5, −0.25), the lowest point because a is positive.

What happens if a is 0?

Then there is no x² term and the equation is linear: bx + c = 0, with the single solution x = −c ÷ b. For example, 2x + 4 = 0 gives x = −2. If b is also 0, there is either no solution or every x works.

Can a quadratic have complex roots?

Yes, whenever the discriminant is negative. The roots then come as a conjugate pair a ± bi. For x² + 2x + 5 = 0 they are −1 + 2i and −1 − 2i, and the parabola never touches the x-axis.

Was this calculator helpful?