Skip to main content

Calcu.fit

Quadratic Formula Calculator: Solve ax² + bx + c = 0

Use this free quadratic formula calculator to solve any quadratic equation. Enter the coefficients a, b, and c, and the calculator finds the roots (real or complex), the discriminant, the vertex, and the factored form, with step-by-step working. No signup needed.

Quadratic Formula Calculator

Enter your equation

ax² + bx + c = 0

Enter integers, decimals or fractions (e.g. 1/2).

Solutions (Roots)
x₁ = 3, x₂ = 2
Two real roots
Discriminant1
Root x₁3
Root x₂2
Vertex(2.5, -0.25)
Axis of symmetryx = 2.5
Sum of roots5
Product of roots6
Parabola directionOpens upward
Y-intercept(0, 6)

Quadratic formula

x = (−b ± √(b² − 4ac)) / 2a
Applied formula
x = (5 ± √1) / 2
Factored form
(x − 3)(x − 2) = 0

Calculation steps

  1. Identify a = 1, b = -5, c = 6.
  2. D = b² − 4ac = 25 − 24 = 1.
  3. x = (5 ± √1) / 2.
  4. x₁ = 3 and x₂ = 2.

Discriminant analysis

D = 1. Since D is greater than zero, there are two different real roots.
Number of real roots2
Root typeDistinct real

The calculator solves quadratic equations using the quadratic formula. It supports real and complex roots, decimals and fractions. When a = 0, the equation is solved as a linear equation instead.

How to Use This Quadratic Formula Calculator

  1. Write your equation in standard form: ax² + bx + c = 0.
  2. Enter the coefficient a (the number with x²), b (the number with x), and c (the constant).
  3. Click Calculate.

If your equation is not in standard form, move all terms to one side first. For example, x² = 4x − 3 becomes x² − 4x + 3 = 0, so a = 1, b = −4, and c = 3.

 

You can enter integers, decimals, and fractions. The value of a cannot be 0. If it is, the equation is linear, and the calculator solves it as bx + c = 0.

What You’ll See in Your Results

  • The roots (solutions) x₁ and x₂, in exact form and as decimals
  • The discriminant and what it tells you
  • The vertex and the axis of symmetry of the parabola
  • The factored form, when the roots are real
  • The sum and product of the roots
  • Steps using your numbers

The Quadratic Formula

For ax² + bx + c = 0 with a ≠ 0:

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

The discriminant is the part under the square root:

D = b² − 4ac

DiscriminantNumber and type of roots
D > 0Two different real roots
D = 0One repeated real root (a double root)
D < 0Two complex roots (no real roots)

When D is a perfect square (and a, b, c are whole numbers), the roots are rational, and the equation can be factored over the integers.

Other Useful Formulas

Vertex: x = −b ÷ (2a), and y = c − b² ÷ (4a)

Axis of symmetry: x = −b ÷ (2a)

Sum of the roots: x₁ + x₂ = −b ÷ a

Product of the roots: x₁ × x₂ = c ÷ a

Factored form: a(x − x₁)(x − x₂)

Direction of the parabola: it opens up if a > 0, and down if a < 0.

y-intercept: the point (0, c)

Quadratic Formula Calculator Examples

All answers are checked by substituting back into the equation.

Example 1: Two Real Roots

x² − 5x + 6 = 0 (a = 1, b = −5, c = 6)

  • D = (−5)² − 4(1)(6) = 25 − 24 = 1
  • x = (5 ± √1) ÷ 2
  • x₁ = 3 and x₂ = 2
  • Factored form: (x − 2)(x − 3)
  • Vertex: (2.5, −0.25)

Example 2: A Leading Coefficient Not Equal to 1

2x² + 3x − 2 = 0 (a = 2, b = 3, c = −2)

  • D = 9 − 4(2)(−2) = 9 + 16 = 25
  • x = (−3 ± 5) ÷ 4
  • x₁ = 0.5 and x₂ = −2
  • Factored form: (2x − 1)(x + 2)
  • Vertex: (−0.75, −3.125)

Example 3: One Repeated Root

x² − 6x + 9 = 0 (a = 1, b = −6, c = 9)

  • D = 36 − 36 = 0
  • x = 6 ÷ 2 = 3 (a double root)
  • Factored form: (x − 3)²
  • The parabola touches the x-axis at one point, its vertex (3, 0).

Another: 4x² − 12x + 9 = 0 has D = 144 − 144 = 0, so x = 1.5.

Example 4: Complex Roots

x² + 2x + 5 = 0 (a = 1, b = 2, c = 5)

  • D = 4 − 20 = −16
  • √(−16) = 4i
  • x = (−2 ± 4i) ÷ 2 = −1 ± 2i

The parabola does not cross the x-axis. Its vertex is (−1, 4), above the axis, and it opens upward.

Example 5: Complex Roots with a Square Root

2x² − 4x + 5 = 0 (a = 2, b = −4, c = 5)

  • D = 16 − 40 = −24
  • x = (4 ± √(−24)) ÷ 4 = 1 ± (√6 ÷ 2)i
  • x ≈ 1 ± 1.2247i

Example 6: Rational Roots

3x² − 2x − 1 = 0 (a = 3, b = −2, c = −1)

  • D = 4 + 12 = 16
  • x = (2 ± 4) ÷ 6
  • x₁ = 1 and x₂ = −1/3 (≈ −0.3333)

Example 7: Irrational Roots

x² + 4x + 1 = 0 (a = 1, b = 4, c = 1)

  • D = 16 − 4 = 12
  • x = (−4 ± √12) ÷ 2 = (−4 ± 2√3) ÷ 2 = −2 ± √3
  • x ≈ −0.268 and x ≈ −3.732

Another: x² − 2x − 1 = 0 has D = 8, so x = 1 ± √2 ≈ 2.414 and −0.414.

Example 8: When b = 0

  • x² − 9 = 0: x = ± √9 = ±3
  • x² + 4 = 0: x = ± √(−4) = ±2i (no real roots)

You can also solve these by moving the constant to the other side and taking the square root.

Example 9: Not in Standard Form

x² = 4x − 3

Move all terms to one side: x² − 4x + 3 = 0, so a = 1, b = −4, c = 3.

  • D = 16 − 12 = 4
  • x = (4 ± 2) ÷ 2
  • x₁ = 3 and x₂ = 1

Example 10: Decimal Coefficients

0.5x² − x − 1.5 = 0

  • D = 1 − 4(0.5)(−1.5) = 1 + 3 = 4
  • x = (1 ± 2) ÷ 1
  • x₁ = 3 and x₂ = −1

Multiplying the whole equation by 2 gives x² − 2x − 3 = 0, which has the same roots.

Example 11: Sum and Product of the Roots

For x² − 5x + 6 = 0:

  • Sum of roots = −b ÷ a = 5 (2 + 3)
  • Product of roots = c ÷ a = 6 (2 × 3)

Use this to check your answers quickly.

Example 12: Vertex of a Parabola

For y = x² − 4x + 3:

  • Axis of symmetry: x = 4 ÷ 2 = 2
  • y at the vertex: 3 − 16 ÷ 4 = −1
  • Vertex: (2, −1)
  • Roots (x-intercepts): 1 and 3
  • y-intercept: (0, 3)

Example 13: Completing the Square

x² + 6x + 5 = 0

  • x² + 6x + 9 = 4 (add 9 to both sides after moving the 5)
  • (x + 3)² = 4
  • x + 3 = ± 2
  • x = −1 or −5

The formula comes from completing the square on the general equation.

Example 14: Word Problem, Rectangle

The length of a rectangle is 3 more than its width, and the area is 40. Find the width.

  • Let the width be w: w(w + 3) = 40, so w² + 3w − 40 = 0
  • D = 9 + 160 = 169, and √169 = 13
  • w = (−3 ± 13) ÷ 2 = 5 or −8
  • A width cannot be negative, so w = 5 and the length is 8.

Example 15: Word Problem, Projectile

A ball is thrown upward from a height of 1.5 m at 20 m/s. Its height in meters after t seconds is approximately h = −4.9t² + 20t + 1.5. When does it hit the ground (h = 0)?

  • a = −4.9, b = 20, c = 1.5
  • D = 400 + 29.4 = 429.4
  • t = (−20 ± 20.72) ÷ (−9.8)
  • t ≈ 4.16 s (the other root, t ≈ −0.07, is before the throw, so it is not used)
  • The maximum height occurs at t = 20 ÷ 9.8 ≈ 2.04 s, and is about 21.91 m.

Example 16: A Case with a = 0

2x + 4 = 0 is not quadratic. With a = 0, it is a linear equation: x = −4 ÷ 2 = −2.

How to Choose a Method

MethodBest when
FactoringThe roots are whole numbers or simple fractions
Square rootsb = 0 (the form ax² = −c)
Completing the squareYou need the vertex form, or you want to see where the formula comes from
Quadratic formulaIt works for every quadratic equation
GraphingYou want a picture, or an approximate answer

The quadratic formula always works, so it is a safe choice when factoring is not obvious.

What the Roots Mean on a Graph

The graph of y = ax² + bx + c is a parabola. The roots are the x-intercepts, which are the points where the parabola crosses the x-axis.

  • Two real roots: the parabola crosses the x-axis twice.
  • One real root: the parabola touches the x-axis at its vertex.
  • Complex roots: the parabola does not touch the x-axis.

Common Mistakes

  • Forgetting standard form. Always move everything to one side so the other side is 0.
  • Sign errors with b. In the formula, the first term is −b. If b = −5, then −b = 5.
  • Dividing only part of the expression by 2a. The whole numerator is divided by 2a.
  • Dropping the ±. There are usually two answers.
  • Using the wrong a. If a = −1, the denominator 2a is −2.
  • Rejecting valid roots, or keeping invalid ones. In word problems, check that the roots make sense (for example, a length cannot be negative).
  • Forgetting the square on b. (−5)² = 25, not −25.

Tips for Using a Quadratic Formula Calculator

  • Write the equation in ax² + bx + c = 0 form before you enter numbers.
  • Check the discriminant first. It tells you what kind of answers to expect.
  • Check your roots with sum = −b/a and product = c/a.
  • Substitute a root back into the equation to confirm it gives 0.
  • For word problems, reject answers that do not fit the situation.
  • If all the coefficients share a factor, divide it out first to simplify.
  • Use the exact form (with √) for homework that asks for exact answers, and the decimal form for measurements.

Quadratic Formula Calculator vs. Other Tools

  • Scientific Calculator: powers, roots, trig, logs, and more.
  • Exponent Calculator: powers and roots using exponents.
  • Fraction Calculator: add, subtract, multiply, and divide fractions.
  • Triangle Calculator: solve triangles, which uses the Law of Cosines and quadratics in some cases.
  • Percent Error Calculator: how far a measurement is from the accepted value.

Frequently Asked Questions (FAQ)

What is the quadratic formula?

For ax² + bx + c = 0, the solutions are x = (−b ± √(b² − 4ac)) ÷ (2a).

Put it in the form ax² + bx + c = 0, find a, b, and c, calculate the discriminant b² − 4ac, and then use the quadratic formula. You can also factor, complete the square, or take square roots when b = 0.

 It is b² − 4ac. It tells you how many real roots there are: two if it is positive, one if it is zero, and none (two complex roots) if it is negative.

The equation has no real solutions. It has two complex solutions, which include the imaginary number i, where i² = −1. The parabola does not cross the x-axis.

Then the equation is not quadratic. It is linear (bx + c = 0), and the solution is x = −c ÷ b.

The x-coordinate is −b ÷ (2a). Substitute it into the equation to get y. For y = x² − 4x + 3, the vertex is (2, −1).

They are the values of x that make the equation true. They are also called solutions, zeros, or x-intercepts.

Substitute each root into the equation and see if you get 0. You can also check that the sum of the roots is −b/a and their product is c/a.

Yes. When the discriminant is 0, there is one repeated root. For example, x² − 6x + 9 = 0 has x = 3.

 It is a root with an imaginary part, such as −1 + 2i. Complex roots of equations with real coefficients always come in pairs (−1 + 2i and −1 − 2i).

Use it whenever factoring is not obvious, since it works for every quadratic equation.

Yes. It is free, with no registration and no limits.

Exact forms (with fractions and square roots) are exact. Decimal answers are rounded for display.

Disclaimer

This calculator is for general and educational use. Exact answers are exact, and decimal answers are rounded for display. Check your answers by substituting them back into the equation, and follow your teacher’s rules on the form of the answer. For engineering, finance, or safety-related work, check the results with a qualified professional.