Quadratic Formula Calculator

Solve any quadratic equation in standard form ax² + bx + c = 0. Find real or complex roots, the discriminant, vertex and axis of symmetry with a transparent substitution.

ax² + bx + c = 0

Your Quadratic Results

Discriminant (Δ)0
Vertex0
Axis of symmetry0
Solutions / roots0

Enter a, b and c with a ≠ 0. The blue card shows the solution(s).

Calculation breakdown

Standard form0
Discriminant b² − 4ac0
Root type0
Vertex x-coordinate0
Vertex y-coordinate0
Final solution(s)0

Transparent formula

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

The discriminant Δ = b² − 4ac determines whether the roots are two real, one repeated real, or two complex values.

The leading coefficient a must not be 0; otherwise the equation is not quadratic.

Parabola preview

The graph is automatically scaled for visual context. Real roots appear where the parabola crosses or touches the x-axis; complex roots do not appear as x-intercepts.

What is a quadratic equation?

A quadratic equation is a second-degree equation that can be written in standard form ax² + bx + c = 0, where a, b and c are real coefficients and a ≠ 0. The quadratic formula solves every equation in this form, including equations that do not factor neatly and equations whose solutions are complex numbers.

OpenStax states that any quadratic equation in standard form can be solved by the quadratic formula and derives that formula by completing the square. This makes the formula especially useful when factoring is difficult or impossible over the integers. The expression under the square root, b² − 4ac, is the discriminant and tells you the nature of the roots before you finish solving. citeturn0search0turn0search1

This calculator goes beyond returning two decimal answers. It identifies the discriminant, distinguishes real and complex roots, calculates the vertex and axis of symmetry, shows the actual coefficient substitution, and provides a scaled parabola preview. The primary blue result remains the solutions because finding the roots is the main reason to use a quadratic formula calculator.

How to use the Quadratic Formula Calculator

  1. Put the equation in standard form. Rearrange it so one side is 0: ax² + bx + c = 0.
  2. Enter coefficient a. This is the coefficient of x² and must not be zero.
  3. Enter coefficient b. Include its sign. If there is no x term, enter 0.
  4. Enter constant c. Include its sign. If there is no constant term, enter 0.
  5. Solve. The blue card gives the root or roots. Supporting cards show the discriminant, vertex and axis of symmetry.
  6. Check the breakdown. It shows the discriminant calculation and the values used in the quadratic formula.
Sign check: negative coefficients are a common source of errors. If the equation is x² − 5x + 6 = 0, then a = 1, b = −5 and c = 6. Do not enter b as +5.

Quadratic formula explained

x = [−b ± √(b² − 4ac)] ÷ 2a for ax² + bx + c = 0, a ≠ 0

The ± symbol means the expression generally produces two values: one using addition and one using subtraction. OpenStax emphasizes careful substitution, especially putting negative coefficient values in parentheses. The formula works for every genuine quadratic equation in standard form, whether the answers are rational, irrational or complex. citeturn0search0

Where does the quadratic formula come from?

The formula is not an arbitrary rule. Starting from ax² + bx + c = 0, divide by a, move the constant term, and complete the square. The left side becomes (x + b/2a)². Taking square roots introduces the ± sign, and isolating x produces the familiar formula. OpenStax gives this derivation explicitly, connecting the quadratic formula directly to completing the square. citeturn0search0

Understanding the discriminant

The discriminant is Δ = b² − 4ac. Because it is the quantity inside the square root, its sign controls the number and type of roots for real coefficients. OpenStax summarizes the cases as follows. citeturn0search1turn0search5

DiscriminantRootsGraph meaning
Δ > 0Two distinct real rootsParabola crosses x-axis twice
Δ = 0One repeated real rootParabola touches x-axis at vertex
Δ < 0Two complex conjugate rootsNo real x-intercepts

When Δ is positive and a perfect square (with suitable rational coefficients), the roots can simplify to rational values. When it is positive but not a perfect square, irrational radicals commonly remain. When Δ is negative, √Δ introduces the imaginary unit i because √(−k) = i√k for k > 0.

Worked quadratic formula examples

Two real roots

x² − 5x + 6 = 0. Δ = 25 − 24 = 1. x = [5 ± 1]/2, giving x = 3 and x = 2.

Repeated root

x² + 4x + 4 = 0. Δ = 16 − 16 = 0. x = −4/2 = −2, a double root.

Complex roots

x² + x + 2 = 0. Δ = 1 − 8 = −7. x = (−1 ± i√7)/2.

The complex-root example matches the standard OpenStax treatment of x² + x + 2 = 0: a negative discriminant leads to the conjugate pair (−1 ± i√7)/2. citeturn0search0turn0search5

Example with a non-unit leading coefficient

For 2x² + 9x − 5 = 0, a = 2, b = 9 and c = −5. The discriminant is 9² − 4(2)(−5) = 121. Then x = [−9 ± 11]/4, giving x = 1/2 and x = −5. This example also demonstrates why parentheses around a negative c value help prevent sign mistakes.

How the calculator handles complex roots

If Δ is negative, the calculator does not stop at “no real solution.” A quadratic equation with real coefficients still has two solutions in the complex number system. It reports them as a conjugate pair in the form real part ± imaginary part i.

For example, if a = 1, b = 2 and c = 5, then Δ = 4 − 20 = −16. The roots are [−2 ± √(−16)]/2 = [−2 ± 4i]/2 = −1 ± 2i. The parabola y = x² + 2x + 5 has no x-intercepts, which is consistent with having no real roots, but the algebraic equation still has two complex solutions.

How roots connect to the vertex and graph

The graph of y = ax² + bx + c is a parabola. Its axis of symmetry is x = −b/(2a), and the vertex lies on that axis. The calculator evaluates the polynomial at that x-coordinate to find the vertex y-value.

Axis of symmetry: x = −b ÷ 2a Vertex: (h, f(h)), where h = −b ÷ 2a

If a > 0, the parabola opens upward and the vertex is its minimum. If a < 0, it opens downward and the vertex is its maximum. The discriminant connects the roots to this geometry: positive Δ gives two real x-intercepts, zero Δ puts the vertex on the x-axis, and negative Δ means the parabola never intersects the real x-axis.

Relationship between the two roots

For roots r₁ and r₂ of ax² + bx + c = 0, their sum is −b/a and their product is c/a. These are Vieta's relationships. They provide a useful check after solving: if your two numerical roots do not approximately satisfy both relationships, revisit the arithmetic or coefficient signs.

Quadratic formula vs factoring and completing the square

The quadratic formula is universal for quadratic equations, but it is not always the fastest hand method. OpenStax recommends factoring when a quadratic factors easily, using the square-root property when the equation already has a suitable squared form, and using the quadratic formula as a dependable general method. citeturn0search6

MethodBest whenStrength
FactoringFactors are easy to recognizeFast and often exact
Square-root propertyEquation is or can quickly become (x − h)² = kVery short solution
Completing the squareYou need vertex form or want the derivationReveals structure
Quadratic formulaAny quadratic in standard formAlways applicable when a ≠ 0

Exact answers versus decimal approximations

When the discriminant is not a perfect square, an exact answer may contain a square root, such as (−5 ± √21)/2. A decimal approximation is convenient for graphing or numerical work, while the radical form preserves exactness. This calculator reports practical numerical values and, for simple integer-coefficient cases, also keeps the discriminant visible so the origin of the roots is clear.

For complex roots, numerical real and imaginary parts are shown. In coursework that specifically requires simplified radical form, use the displayed discriminant and formula substitution to write the exact symbolic form.

What if a = 0?

If a = 0, the x² term disappears and the equation is not quadratic. It becomes bx + c = 0, which is linear when b ≠ 0. The quadratic formula cannot be used because its denominator 2a would be zero. Rather than silently treating the equation as quadratic, this calculator flags the input and asks for a nonzero leading coefficient.

Common quadratic formula mistakes

How to check quadratic roots

The most direct check is substitution. Put each calculated root back into ax² + bx + c. For a correct root, the expression should equal zero; with rounded decimal roots, it should be very close to zero. You can also use the sum and product checks r₁ + r₂ = −b/a and r₁r₂ = c/a.

Graphically, real roots correspond to x-intercepts. A repeated real root is where the parabola just touches the x-axis. Complex roots cannot be read as real x-intercepts, so algebra remains necessary in that case.

Frequently asked questions

What is the quadratic formula?

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

What does the discriminant tell you?

Δ = b² − 4ac determines root type: positive gives two distinct real roots, zero gives one repeated real root, and negative gives two complex conjugate roots.

Can the quadratic formula solve every quadratic equation?

Yes. Any genuine quadratic that can be written ax² + bx + c = 0 with a ≠ 0 can be solved by the quadratic formula.

Why are there sometimes two answers?

The ± in the formula creates a plus branch and a minus branch. With positive discriminant these produce two distinct real roots.

What happens when the discriminant is zero?

Both ± branches give the same value, −b/(2a). This is one repeated or double real root.

What happens when the discriminant is negative?

The square root involves i = √−1, producing two complex conjugate roots rather than real x-intercepts.

Is the vertex always a root?

No. The vertex is a root only when it lies on the x-axis, which occurs when the discriminant is zero.

Why can't a equal zero?

If a = 0, the x² term vanishes and the equation is no longer quadratic. The quadratic formula would also require division by zero.

Important note: The quadratic formula is mathematically stable, but coursework may require a particular answer form—such as exact radicals, simplified complex numbers, or decimal approximations. Use the calculator to verify the mathematics, then report the roots in the form required by your class or application.