ThisCalculator

Everyday

Quadratic Equation Formula Calculator: Step-by-Step

Updated · Standard formula, shown below

The calculator for this page is switched off while it is checked. The formula is below, and the worked example in the article shows how to use it by hand.

A quadratic equation formula calculator solves equations of the form ax² + bx + c = 0 for x. You enter the coefficients a, b, and c, and it returns the real or complex roots using the quadratic formula. This page provides the formula, a worked example, and practical guidance to avoid common errors.

Formula

The quadratic formula gives the solutions to any quadratic equation ax² + bx + c = 0:

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

  • a – coefficient of x² (must not be zero)
  • b – coefficient of x
  • c – constant term
  • x – the unknown variable (root)

The expression under the square root, b² − 4ac, is called the discriminant. It determines the nature of the roots:

  • If b² − 4ac > 0: two distinct real roots
  • If b² − 4ac = 0: exactly one real root (a repeated root)
  • If b² − 4ac < 0: two complex conjugate roots

Worked Example

Using the default values from the calculator above: a = 1, b = −3, c = 2. The equation is x² − 3x + 2 = 0.

  1. Calculate the discriminant: b² − 4ac = (−3)² − 4(1)(2) = 9 − 8 = 1
  2. Since the discriminant is positive, there are two real roots.
  3. First root: x = (−(−3) + √1) / (2×1) = (3 + 1) / 2 = 4 / 2 = 2
  4. Second root: x = (−(−3) − √1) / (2×1) = (3 − 1) / 2 = 2 / 2 = 1

The calculator shows x₁ = 2 and x₂ = 1, which matches the manual calculation. Substituting x = 2 gives 4 − 6 + 2 = 0, and x = 1 gives 1 − 3 + 2 = 0, so both are correct.

When to Use the Quadratic Formula

Use the quadratic formula when you need to solve any equation that can be written in the standard form ax² + bx + c = 0. It works for every quadratic, even when factoring is not obvious or when the roots are complex. Common applications include physics problems (projectile motion, free fall), geometry (area problems), and economics (profit functions).

If you have a quadratic equation not in standard form, rearrange it first. For example, 2x² = 8x − 6 becomes 2x² − 8x + 6 = 0. Then identify a = 2, b = −8, c = 6.

How to Read the Results

The calculator returns two roots, x₁ and x₂. If the discriminant is positive, both are real numbers and the graph of the parabola crosses the x-axis at two points. If the discriminant is zero, both roots are the same, meaning the parabola touches the x-axis at one point (its vertex). If the discriminant is negative, the roots are complex numbers of the form p ± qi; the parabola does not intersect the x-axis at all.

For real roots, the values are often used as solutions to the original problem. For example, if t represents time in seconds, a positive root is physically meaningful while a negative root may be discarded.

Common Mistakes and How to Avoid Them

  • Sign errors: Forgetting that −b changes the sign of b. If b = −3, then −b = 3, not −3.
  • Incorrect a, b, c identification: Make sure the equation is in standard form before reading coefficients. For 5x² + 2x = 0, c = 0, not missing.
  • Unit mix-ups: The quadratic formula is unit-agnostic, but if x has a unit (like meters or seconds), the coefficients must have consistent units. For example, in physics, if x is time in seconds, then a has units of distance/time², b has units of distance/time, and c has units of distance.
  • Rounding too early: Keep full precision in the discriminant before taking the square root. Round only the final answer to the desired number of decimals.
  • Dividing by zero: If a = 0, the equation is not quadratic. The formula would involve division by zero, so it cannot be used.

Limitations of the Formula

The quadratic formula is exact for all quadratic equations, but it has practical limitations. When the discriminant is very close to zero, numerical rounding can cause the two roots to be slightly inaccurate. In such cases, an alternative method like completing the square or using a numerically stable variant (e.g., x = 2c / (−b ∓ √(b² − 4ac))) may give better results. Also, the formula only works for polynomial equations of degree 2; higher-degree equations require other methods.

Alternative Methods

Besides the quadratic formula, you can solve quadratics by:

  • Factoring: Write the equation as (x − r₁)(x − r₂) = 0. This works when the roots are rational numbers.
  • Completing the square: Transform ax² + bx + c = 0 into a(x − h)² + k = 0, then solve for x. This method is useful for deriving the quadratic formula and for graphing.
  • Graphing: Plot the parabola and read the x-intercepts. This gives approximate solutions.

Each method has its place. The quadratic formula is the most general and works for all cases, including complex roots.

Frequently Asked Questions

What if the discriminant is negative?

If b² − 4ac < 0, the equation has two complex conjugate roots. For example, x² + 1 = 0 gives a = 1, b = 0, c = 1, discriminant = −4, and roots x = i and x = −i. The calculator will show them as complex numbers, though some calculators may display an error if they do not support complex output.

Can I use the quadratic formula when a = 0?

No. If a = 0, the equation becomes linear (bx + c = 0), and the quadratic formula would involve division by zero. Solve it as a linear equation instead: x = −c/b.

How do I enter the coefficients if the equation is not in standard form?

First, rearrange the equation so that all terms are on one side and equal zero. For example, 3x² = 6x − 9 becomes 3x² − 6x + 9 = 0. Then read a = 3, b = −6, c = 9.

What does the discriminant tell me about the graph?

The discriminant indicates how many times the parabola crosses the x-axis: positive means two crossings, zero means one (tangent), negative means none. It is a quick way to know the nature of the roots without solving.

Why does the calculator give two answers?

A quadratic equation has two roots (possibly equal). The ± symbol in the formula represents two separate calculations: one with addition and one with subtraction. Both are valid solutions unless one is extraneous due to the context of the problem.

Related

Formula used
in a | Coefficient a | - | 1 | 0
in b | Coefficient b | - | -3 | 0
in c | Coefficient c | - | 2 | 0
out x1 | First root | x | (-b + sqrt(b^2 - 4*a*c)) / (2*a) | 4
out x2 | Second root | x | (-b - sqrt(b^2 - 4*a*c)) / (2*a) | 4
out disc | Discriminant | - | b^2 - 4*a*c | 2

Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.