Skip to content

Quadratic Equation Calculator

Enter the coefficients a, b, and c to solve a quadratic equation. The calculator finds real or complex roots and shows the discriminant, vertex, axis of symmetry, y-intercept, and whether the parabola opens upward or downward.

Solve ax² + bx + c = 0

Quadratic roots

2, 1

two real roots; opens up.

Discriminant
1
Vertex
(1.5, -0.25)
Axis of symmetry
x = 1.5
Y-intercept
(0, 2)

How to Use the Quadratic Equation Calculator

Enter the coefficients a, b, and c from an equation in the form ax² + bx + c = 0. The coefficient a must not be zero.

The calculator finds the roots and identifies whether they are two distinct real roots, one repeated real root, or a pair of complex conjugate roots.

It also shows the discriminant, vertex, axis of symmetry, y-intercept, and whether the corresponding parabola opens upward or downward.

What Is a Quadratic Equation?

A quadratic equation is an equation whose highest power of the variable is 2. Its standard form is ax² + bx + c = 0, where a, b, and c are constants and a is not zero.

For example, x² - 3x + 2 = 0 is quadratic because the highest power of x is 2.

If a were zero, the x² term would disappear and the equation would become linear or constant rather than quadratic.

How the Quadratic Formula Works

The quadratic formula solves any quadratic equation written as ax² + bx + c = 0.

The coefficients a, b, and c are substituted into the formula x = (-b ± √(b² - 4ac)) / (2a). The ± symbol creates the two possible root calculations.

When the value under the square root is zero, both calculations produce the same root. When it is negative, the square root introduces the imaginary unit i and the roots form a complex conjugate pair.

What Is the Discriminant?

The expression b² - 4ac is called the discriminant, usually written as Δ.

You can determine the number and type of roots from the discriminant before calculating the roots themselves.

Its sign also describes how the parabola relates to the x-axis: two crossings, one touching point, or no real intersection.

Discriminant and root typesFor real coefficients in ax² + bx + c = 0, the sign of Δ = b² - 4ac determines the root type.
DiscriminantRootsParabola
Δ > 0Two distinct real rootsCrosses the x-axis twice
Δ = 0One repeated real rootTouches the x-axis once
Δ < 0Two complex conjugate rootsNo real x-intercepts

Two Real Roots

When the discriminant is positive, the quadratic has two distinct real roots.

For example, x² - 3x + 2 = 0 has discriminant 1. Its roots are x = 1 and x = 2.

On the graph of the corresponding quadratic function, those roots appear as two separate x-intercepts.

One Repeated Real Root

When the discriminant equals zero, the quadratic has one real root repeated twice.

For example, x² + 2x + 1 = 0 factors as (x + 1)² = 0, so both roots are x = -1.

Graphically, the vertex lies on the x-axis and the parabola touches the axis at that point rather than crossing it.

Complex Roots

When the discriminant is negative, the equation has no real roots. Instead, it has two complex conjugate roots.

For example, x² + 1 = 0 has roots i and -i.

For real coefficients, complex roots occur as conjugates: if p + qi is a root, then p - qi is the other root.

Roots and X-Intercepts

A root is a value of x that makes ax² + bx + c equal zero. For a quadratic function y = ax² + bx + c, real roots are therefore the x-coordinates of the x-intercepts.

A quadratic with two real roots crosses the x-axis twice. A repeated real root touches it once. A quadratic with complex roots has no real x-intercepts.

The words roots, zeros, and solutions are often used for the same x-values when solving a quadratic equation.

Vertex of a Parabola

The vertex is the turning point of the parabola. Its x-coordinate is -b/(2a).

The y-coordinate is found by evaluating the quadratic at that x-value. It can also be written directly as -Δ/(4a), where Δ is the discriminant.

If the parabola opens upward, the vertex is its minimum point. If it opens downward, the vertex is its maximum point.

Axis of Symmetry

Every vertical parabola is symmetric around a vertical line through its vertex.

For y = ax² + bx + c, that line is x = -b/(2a), the same as the x-coordinate of the vertex.

When two real roots exist, the axis of symmetry lies exactly halfway between them.

How the Coefficient a Changes the Parabola

The sign of a determines the opening direction. If a is positive, the parabola opens upward. If a is negative, it opens downward.

The magnitude of a also affects the shape. Compared with the parent function y = x², a larger absolute value produces a narrower parabola, while a nonzero absolute value below 1 produces a wider one.

Changing a does not by itself determine the vertex because b and c also affect the parabola's position.

Y-Intercept

The y-intercept of y = ax² + bx + c is especially simple to find. Set x = 0 and the equation becomes y = c.

The y-intercept is therefore (0, c).

For example, y = 2x² - 4x - 6 crosses the y-axis at (0, -6).

Standard, Factored, and Vertex Form

The same quadratic function can often be written in several useful forms.

Standard form makes the coefficients a, b, and c easy to identify. Factored form makes real roots easy to read. Vertex form makes the vertex and opening behavior easy to see.

This calculator accepts standard-form coefficients because they can always be used with the quadratic formula, even when the expression does not factor neatly over the real numbers.

Common forms of a quadraticDifferent forms make different features of a quadratic easier to see.
FormExpressionUseful for
Standard formax² + bx + cReading a, b, c and using the quadratic formula
Factored forma(x - r₁)(x - r₂)Reading real roots directly
Vertex forma(x - h)² + kReading the vertex and opening direction

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.

For example, x² - 5x + 6 = 0 has roots 2 and 3. Their sum is 5, which equals -b/a, and their product is 6, which equals c/a.

These relationships are useful for checking calculated roots and for constructing a quadratic when its roots are known.

Quadratic Formula vs Factoring

Factoring can be quicker when a quadratic breaks into simple factors. For example, x² - 5x + 6 becomes (x - 2)(x - 3), giving roots 2 and 3 immediately.

Not every quadratic factors conveniently using integers or rational numbers. The quadratic formula works for every equation of the form ax² + bx + c = 0 with a ≠ 0.

For negative discriminants, the quadratic formula also continues naturally into complex numbers.

Common Quadratic Formula Mistakes

Forgetting the entire denominator: Both -b and ±√Δ are divided by 2a.

Using the wrong sign for b: If b is negative, -b becomes positive when substituted into the formula.

Forgetting to square b: The discriminant contains b², not 2b.

Forgetting both roots: A positive discriminant produces two values because of the ± sign.

Calling a negative discriminant an error: It means the roots are complex rather than real.

Entering a = 0: Without a nonzero x² coefficient, the equation is not quadratic.

How This Calculator Works

The calculator first computes the discriminant Δ = b² - 4ac and uses its sign to classify the roots.

For a negative discriminant, it separates each root into real and imaginary parts. For a zero discriminant, both root positions contain the same repeated value.

For two distinct real roots, the implementation uses an algebraically equivalent rearrangement of the quadratic formula for one root when possible. This helps reduce numerical precision loss that can occur when subtracting nearly equal floating-point values.

The vertex is calculated from x = -b/(2a) and y = -Δ/(4a). The y-intercept is c, and the sign of a determines whether the parabola opens upward or downward.

Numerical Precision

The calculator returns numerical approximations. Decimal values may be rounded for display even though the internal calculation uses JavaScript's full floating-point precision.

Very large coefficient differences or nearly repeated roots can make numerical calculations more sensitive to floating-point rounding.

If an exact symbolic answer such as a simplified radical is required, keep the original coefficients and work with the exact quadratic formula rather than treating a displayed decimal approximation as exact.

Quadratic Equation Formulas

These formulas connect the coefficients, roots, discriminant, vertex, and intercepts of ax² + bx + c.

Standard form
Quadratic formula
Discriminant
Vertex x-coordinate
Vertex y-coordinate
Axis of symmetry
Y-intercept
Sum of roots
Product of roots
Vertex form
Coefficient of x²; must not be zero
Coefficient of x
Constant term and y-intercept value
Discriminant
X-coordinate of the vertex
Y-coordinate of the vertex
The two roots, including a repeated or complex pair

Examples

Two real roots

a = 1, b = -3, c = 2

Discriminant 1; roots 1 and 2; vertex (1.5, -0.25); opens upward.

Repeated real root

a = 1, b = 2, c = 1

Discriminant 0; repeated root -1; vertex (-1, 0).

Complex roots

a = 1, b = 0, c = 1

Discriminant -4; roots 0 + 1i and 0 - 1i; no real x-intercepts.

Parabola opening downward

a = -1, b = 4, c = -3

Discriminant 4; roots 1 and 3; vertex (2, 1); opens downward.

Negative and positive root

a = 2, b = -4, c = -6

Discriminant 64; roots 3 and -1; vertex (1, -8).

No real x-intercepts

a = 1, b = 4, c = 5

Discriminant -4; roots -2 + 1i and -2 - 1i; vertex (-2, 1).

Decimal coefficients

a = 0.5, b = -1, c = -1.5

Discriminant 4; roots 3 and -1; vertex (1, -2).

Frequently Asked Questions

What is the quadratic formula?

For ax² + bx + c = 0, the quadratic formula is x = (-b ± √(b² - 4ac)) / (2a).

How do I solve a quadratic equation?

Put the equation into ax² + bx + c = 0 form, identify a, b, and c, then use factoring, completing the square, or the quadratic formula. This calculator uses the coefficients directly.

What does the discriminant tell me?

The discriminant b² - 4ac determines the root type. A positive value gives two distinct real roots, zero gives one repeated real root, and a negative value gives two complex conjugate roots.

What happens when the discriminant is positive?

The quadratic has two distinct real roots and its graph crosses the x-axis at two points.

What happens when the discriminant is zero?

The quadratic has one repeated real root. The parabola touches the x-axis at its vertex.

What does a negative discriminant mean?

The equation has no real roots. Its two solutions are complex conjugates, so the real parabola does not intersect the x-axis.

What is a repeated root?

A repeated root occurs when both solutions of the quadratic formula are the same value. This happens when the discriminant equals zero.

How do I find the vertex of a quadratic?

The vertex x-coordinate is -b/(2a). Substitute that x-value into the quadratic to find the y-coordinate. The calculator returns both coordinates automatically.

How do I find the axis of symmetry?

For y = ax² + bx + c, the axis of symmetry is x = -b/(2a), which passes through the vertex.

How do I find the y-intercept?

The y-intercept is (0, c) because substituting x = 0 into ax² + bx + c leaves c.

How do I know whether the parabola opens up or down?

Look at a. If a is positive, the parabola opens upward. If a is negative, it opens downward.

Are roots the same as x-intercepts?

Real roots are the x-coordinates of the x-intercepts. Complex roots do not correspond to points where the real graph crosses the x-axis.

What is the difference between roots, zeros, and solutions?

For a quadratic equation, these terms usually refer to the x-values that make the quadratic expression equal zero.

What if a is zero?

Then the x² term disappears and the equation is no longer quadratic. This calculator therefore requires a nonzero value for a.

Can this calculator solve equations with complex roots?

Yes. When the discriminant is negative, the calculator returns the two complex conjugate roots using i.

Can a quadratic have only one solution?

It can have one distinct real solution when the discriminant is zero. Algebraically, that value is a repeated root with multiplicity two.

Why are there usually two quadratic roots?

A quadratic is degree 2, so over the complex numbers it has two roots when multiplicity is counted. They may be two different roots or one repeated root.

What are the sum and product of the roots?

For ax² + bx + c = 0, the sum of the two roots is -b/a and their product is c/a.

Does the calculator give exact radical answers?

No. The calculator returns numerical root values. Irrational results are displayed as decimal approximations rather than simplified radical expressions.

References