Quadratic Equation Solver

JJ Ben-Joseph headshot JJ Ben-Joseph

What Is a Quadratic Equation?

A quadratic equation is any equation that can be written in the standard form:

ax² + bx + c = 0

Here, a, b, and c are real numbers called coefficients, and x is the unknown variable. The coefficient a must not be zero; if a = 0, the equation becomes linear, not quadratic.

Quadratic equations appear in algebra courses, standardized tests, and many real-world situations, such as modelling the path of a thrown object, optimizing area, or analyzing revenue and cost curves in basic economics.

This calculator is designed to quickly find the solutions (also called roots) of your quadratic equation. You simply enter the values of a, b, and c, and it applies the quadratic formula to return the solutions, whether they are real or complex.

The Quadratic Formula and Discriminant

The most reliable way to solve any quadratic equation is to use the quadratic formula. For the equation ax² + bx + c = 0 with a ≠ 0, the solutions for x are given by:

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

This expression comes from a method called completing the square, but you can use it directly without going through the derivation each time.

The expression under the square root, b² − 4ac, is called the discriminant, often written as D or Δ:

D = b² − 4ac

The discriminant is important because it tells you how many real solutions the quadratic has and what type they are.

Quadratic Formula in MathML

The same formula can be expressed using MathML, which some browsers and assistive technologies can render as high-quality mathematical notation:

x = - b ± b 2 - 4 a c 2 a

If your browser does not render the MathML nicely, you can rely on the plain-text version of the formula given above.

How to Use This Quadratic Equation Solver

  1. Rewrite your equation in the form ax² + bx + c = 0. Move all terms to one side if necessary.
  2. Identify the coefficients: the number in front of x² is a, in front of x is b, and the constant term is c.
  3. Enter your values of a, b, and c into the calculator. Make sure that a ≠ 0.
  4. Run the calculation. The tool computes the discriminant D = b² − 4ac and then applies the quadratic formula.
  5. Read the solutions. If the solutions are complex, they are typically shown in the form p ± qi, where i is the imaginary unit.

You can use the results to check your homework, understand how the graph of the quadratic behaves, or verify manual calculations.

Interpreting the Discriminant and the Roots

The discriminant D = b² − 4ac tells you the nature of the solutions without needing to compute the full formula. There are three main cases:

Our calculator automatically handles all three cases and formats the result accordingly.

Worked Examples

Example 1: Two Distinct Real Roots

Consider the equation:

2x² − 5x − 3 = 0

Identify the coefficients:

Step 1: Compute the discriminant:

D = b² − 4ac = (−5)² − 4(2)(−3) = 25 + 24 = 49

Since D > 0, there are two distinct real roots.

Step 2: Apply the quadratic formula:

x = [ −b ± √D ] / (2a) = [ −(−5) ± √49 ] / (2 · 2) = [ 5 ± 7 ] / 4

This gives two solutions:

If you plug a = 2, b = −5, and c = −3 into the calculator, it should return these two roots: 3 and −0.5.

Example 2: One Repeated Real Root (D = 0)

Now consider:

x² − 4x + 4 = 0

Coefficients are:

Discriminant:

D = b² − 4ac = (−4)² − 4(1)(4) = 16 − 16 = 0

With D = 0, there is exactly one real solution, but it is a double root.

Quadratic formula:

x = [ −b ± √0 ] / (2a) = [ 4 ± 0 ] / 2 = 4 / 2 = 2

The repeated root is x = 2. The graph of y = x² − 4x + 4 touches the x-axis at x = 2 and turns around there. If you enter a = 1, b = −4, c = 4 into the solver, it should show a single real root at x = 2 (possibly listed twice or noted as a repeated root).

Example 3: Complex Roots (D < 0)

Now look at:

x² + 4x + 13 = 0

Coefficients:

Discriminant:

D = b² − 4ac = 4² − 4(1)(13) = 16 − 52 = −36

Since D < 0, there are no real solutions, only complex ones.

Use the quadratic formula:

x = [ −4 ± √(−36) ] / 2 = [ −4 ± 6i ] / 2 = −2 ± 3i

The two complex solutions are x = −2 + 3i and x = −2 − 3i. When you input a = 1, b = 4, c = 13 into the calculator, it should display the roots in this complex form.

Quadratic Graphs, Vertex, and Roots

Every quadratic function of the form y = ax² + bx + c graphs as a parabola.

The highest or lowest point on the parabola is called the vertex. The x-coordinate of the vertex can be found using:

xvertex = −b / (2a)

Once you know xvertex, you can plug it back into the equation y = ax² + bx + c to find the y-coordinate of the vertex.

The roots that this calculator finds correspond to the x-values where y = 0, meaning the points where the graph crosses (or touches) the x-axis. If there are complex roots, the graph does not intersect the x-axis at all.

Comparison of Root Types

Discriminant (D = b² − 4ac) Number of Real Roots Type of Solutions Graph Behavior
D > 0 Two Two distinct real roots Parabola crosses the x-axis at two points
D = 0 One One real root (double root) Parabola touches the x-axis at one point (vertex)
D < 0 Zero Two complex conjugate roots Parabola does not intersect the x-axis

Common Uses for Quadratic Equations

Some typical situations where quadratic equations appear include:

In each case, the roots of the quadratic can represent times, lengths, or other values where something important happens, such as when an object hits the ground or when profit reaches zero.

Limitations and Assumptions of the Calculator

Frequently Asked Questions

How do I know if an equation is quadratic?

An equation is quadratic if it can be rearranged into the form ax² + bx + c = 0 with a ≠ 0. It must include an x² term, and no higher powers of x (like x³ or x⁴) are allowed. If there is no x² term, the equation is not quadratic.

What does the discriminant tell me?

The discriminant D = b² − 4ac tells you how many real solutions exist and whether they are distinct or repeated. A positive D means two real roots, zero means one repeated real root, and a negative value means there are no real roots, only complex ones.

Can a quadratic equation have no real solution?

Yes. When the discriminant is negative (D < 0), the square root in the quadratic formula involves a negative number, which leads to complex solutions. In that case, the graph of the quadratic does not intersect the x-axis at any point.

What is the vertex of a parabola and how is it related to the roots?

The vertex is the highest or lowest point of the parabola y = ax² + bx + c. Its x-coordinate is given by x = −b / (2a). If the discriminant is zero, the vertex lies exactly on the x-axis and coincides with the repeated root. When there are two real roots, the vertex lies exactly halfway between them on the x-axis.

Do I always have to use the quadratic formula?

Not always. Some quadratics factor nicely into expressions like (x − r)(x − s) = 0, allowing you to find roots quickly. Others are easier to handle by completing the square. However, the quadratic formula works for every quadratic equation as long as a ≠ 0, which is why it is widely used and built into this calculator.

Enter the squared-term coefficient. It cannot be zero in a quadratic equation.
Use the linear-term coefficient that multiplies x.
This is the constant term that does not include x.

The solutions to your quadratic equation will appear here.

Embed this calculator

Copy and paste the HTML below to add the Quadratic Equation Solver – Quickly Solve ax² + bx + c = 0 to your website.