SahlCalc سهل
Gulf Hubs:

Saudi Arabia: Labour: HRSD · Tax and zakat: ZATCA

Quadratic Equation Solver

Solve any equation of the form ax² + bx + c = 0 and see the discriminant, the roots (real or complex), the vertex of the parabola and the factored form.

Not 0, e.g. 1 for x² or −0.5; the equation is ax² + bx + c = 0

Keep the sign: x² − 5x + 6 has b = −5; 0 if there is no x term

Keep the sign: x² − 5x + 6 has c = 6; 0 if there is none

Roots

x = 2, 3

Discriminant Δ

1

Type of roots

Two real roots

Vertex (h, k)

(2.5, -0.25)

Factored form

(x − 2)(x − 3)

The parabola opens upward, so its lowest value is -0.25 at x = 2.5.

Formula with your numbers

  • Equation x² − 5x + 6 = 0
  • Discriminant Δ = b² − 4ac = (-5)² − 4 × 1 × 6 = 1
  • Quadratic formula x = (−b ± √Δ) ÷ 2a = (5 ± 1) ÷ 2 → 2, 3
  • Vertex h = −b ÷ 2a = 2.5, k = c − b² ÷ 4a = -0.25

Quick answer: For x² − 5x + 6 = 0 the discriminant is (−5)² − 4 × 1 × 6 = 1, so x = (5 ± 1) ÷ 2, giving the roots 2 and 3, and the equation factors as (x − 2)(x − 3).

How it's calculated

The quadratic formula gives x = (−b ± √(b² − 4ac)) ÷ 2a. The part under the root, Δ = b² − 4ac, is the discriminant: Δ > 0 gives two real roots, Δ = 0 one repeated root, and Δ < 0 two complex roots −b/2a ± i·√(−Δ)/2a.

To avoid losing digits when b² is much larger than 4ac, the calculator uses the stable form q = −½(b + sign(b)·√Δ), with x₁ = q ÷ a and x₂ = c ÷ q, which gives the same roots.

The vertex of the parabola y = ax² + bx + c is at h = −b ÷ 2a and k = c − b² ÷ 4a; the line x = h is the axis of symmetry. When a, b and c are whole numbers and Δ is a perfect square, the roots are rational and the equation factors over the integers.

Worked examples

  • x² − 5x + 6 = 0: Δ = 1, x = 2 or 3, (x − 2)(x − 3)
  • x² + 2x + 5 = 0: Δ = −16, x = −1 ± 2i
  • 2x² − 5x − 3 = 0: Δ = 49, x = −0.5 or 3, (2x + 1)(x − 3)

Frequently asked questions

What does the discriminant tell me?

Its sign tells you how many real roots there are: positive means two, zero means one (the vertex touches the x-axis), negative means none, only a pair of complex roots.

What if a is 0?

Then there is no x² term and the equation is linear: bx + c = 0 gives x = −c ÷ b.

Can I enter decimals or negative numbers?

Yes. Any real a, b and c work; type negative numbers with a minus sign, for example −5.

What is the vertex used for?

It is the highest or lowest point of the parabola: the maximum height of a thrown ball or the minimum cost in an optimisation problem.

Can I solve it by factoring instead?

When the numbers are friendly, yes. For x² − 5x + 6, look for two numbers that multiply to 6 and add to −5. That's −2 and −3, so (x − 2)(x − 3) = 0 and x is 2 or 3.

When does a ball thrown upwards hit the ground?

Throw it up at 20 m/s from 1.5 m and its height is −4.9t² + 20t + 1.5. Set that to 0 and keep the positive root: it lands after about 4.16 seconds.