Quadratic equation calculator

Type coefficients a, b and c of ax² + bx + c = 0. The discriminant, Δ = b² - 4ac, says how many real roots you get. With a = 1, b = -3, c = 2 the discriminant is 9 and the roots are x = 1 and x = 2.

When a = 0, the calculator falls back to the linear equation bx + c = 0. A negative discriminant means no real roots.

Input data

Results

Enter data and click Calculate.

How it works

A quadratic equation is ax² + bx + c = 0 with a not zero. You look for the x values that make the left side zero. With a = 1, b = -3, c = 2 the equation is x² - 3x + 2 = 0 and the roots are 1 and 2.

The discriminant, written Δ = b² - 4ac, decides the picture. Δ > 0 gives two different x. Δ = 0 gives one double root. Δ < 0 leaves a message that there are no real roots. For 1, -3, 2 you get Δ = 9. For 1, 2, 1 you get Δ = 0 and x = -1.

The formula is x = (-b ± √Δ) / (2a). Plus and minus are the two places on the axis. The calculator rounds to six decimals when the number is not short. The parabola chart shows the same zeros, unless a is zero.

When a = 0 it is no longer a parabola. The calculator then solves bx + c = 0, so x = -c/b, provided b is not zero. With a = 0, b = 2, c = -4 you get x = 2. All-zero a, b, c become either an identity or no solution, in the calculator message.

The fields are coefficient a, coefficient b and coefficient c. A comma and a dot are the same decimal. Type 1, -3 and 2, then click Calculate.

x² + 1 = 0, meaning a = 1, b = 0, c = 1, has discriminant -4 and no real x. x² - 2x + 1 = 0 has x = 1 twice. 2x² - 8 = 0 has x = -2 and x = 2.

Formula

Δ = b² - 4ac, then x = (-b ± √Δ) / (2a)

How to use

  1. Type a, b and c, for example 1, -3 and 2.
  2. Click Calculate. The discriminant is 9, x = 1 and x = 2.
  3. With 1, 2, 1 the discriminant is 0 and you get x = -1, a double root.
  4. With 1, 0, 1 the discriminant is negative: no real roots.
  5. When a = 0 the calculator solves bx + c = 0. Plain ax + b = 0 lives on the linear equation card.

Discriminant and two x

ax² + bx + c = 0. Δ = b² - 4ac. For 1, -3, 2 the discriminant is 9 and the roots are x = 1 and x = 2.

discriminant
Δ = b² - 4ac. Positive: two x. Zero: one. Negative: no real roots.
a
The coefficient of x². Zero falls back to a linear equation. For 1, -3, 2 it keeps the parabola.
root
An x that makes the left side zero. With Δ = 9 there are two: 1 and 2.

Examples

Example 1

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

x₁ = 1, x₂ = 2

How many roots when Δ = 9? Two: 1 and 2.

Example 2

  • a = 1
  • b = 2
  • c = 1

x = -1

What if Δ = 0? One double root, x = -1.

Example 3

  • a = 1
  • b = 0
  • c = 1

none

Does x² + 1 = 0 have a real x? No. Δ = -4.

Related calculators

Common questions

What is the discriminant for a=1, b=-3, c=2?

Δ = (-3)² - 4·1·2 = 9. Two roots: x = 1 and x = 2.

What does the discriminant mean in a quadratic?

Δ = b² - 4ac. Positive gives two x, zero one double root, negative no real roots.

What x solves x² - 3x + 2 = 0?

1 and 2. You can check: 1 - 3 + 2 = 0 and 4 - 6 + 2 = 0.

What if the discriminant is 0?

One double root x = -b / (2a). For 1, 2, 1 you get x = -1.

Does a negative discriminant give complex x in this calculator?

No. The calculator stays with real numbers and says there are no real roots.

What if a = 0?

It is no longer quadratic. The calculator solves bx + c = 0, so x = -c/b. If b is also 0, you get a no-solution or infinitely-many message.

Does a comma in 1.5 work?

Yes. 1.5 and 1,5 are the same coefficient. The formula does not change with the separator.

Why is there a chart next to the result?

The parabola y = ax²+bx+c shows the same zeros on the axis. When a = 0 it does not draw the chart.

How many x does 2x² - 8 = 0 have?

x = -2 and x = 2. Here b = 0, Δ = 64, roots symmetric about zero.

How is this different from a linear equation?

Here you have x² and a discriminant. On the linear card it stays ax + b = 0 and one x = -b/a, with no parabola.

Knowledge sources

The calculator computes the same formula as the definition below.

Page updated in 2026.