Quadratic Equation Solver

Solve ax² + bx + c = 0: discriminant, nature of roots, exact surd roots, graph

2x² − 5x + 3 = 0
Whole numbers, decimals (0.5) or fractions (1/3). Use ± to make a number negative. An empty b or c counts as 0.
Try an example
Roots
x = 3/2 or 1
x ≈ 1.5 or 1
Discriminant D = b² − 4ac
1
Nature of roots
Two distinct real roots (rational)
Sum of roots (−b/a)
5/2
Product of roots (c/a)
3/2
Vertex
(5/4, −1/8)
Opens
Upwards ∪
Factorised: 2x² − 5x + 3 = (2x − 3)(x − 1)
Step-by-step solution
  1. Compare with ax² + bx + c = 0
    a = 2, b = −5, c = 3
  2. Find the discriminant D = b² − 4ac
    D = (−5)² − 4 × 2 × 3 = 25 − 24 = 1
  3. Nature of the roots
    D = 1 > 0 and a perfect square (1²), so there are two distinct real roots, and they are rational.
  4. Use the quadratic formula
    x = (−b ± √D) / 2a = (5 ± √1) / 4
    √D = √1 = 1
    x = (5 + 1) / 4 = 6/4 = 3/2
    or x = (5 − 1) / 4 = 4/4 = 1
  5. Check with the relations between roots and coefficients
    Sum of roots = −b/a = 5/2
    Product of roots = c/a = 3/2
Another way: splitting the middle term

Find two numbers whose product is a × c = 2 × 3 = 6 and whose sum is b = −5: they are −2 and −3.

2x² − 2x − 3x + 3 = 0
2x(x − 1) − 3(x − 1) = 0
(2x − 3)(x − 1) = 0

Set each factor to 0 to get the same roots: x = 3/2 or x = 1.

Graph of y = 2x² − 5x + 3
  • Vertex form (completing the square): y = 2(x − 5/4)² − 1/8
  • Axis of symmetry: x = 5/4; minimum value of y = −1/8
  • The roots are where the parabola crosses the x-axis (y = 0).

Runs entirely in your browser. Nothing you type or upload is sent to us or stored.

Results are for general guidance. Please check anything important before relying on it. Terms of use

How to Use

  1. Write your equation in the form ax² + bx + c = 0 (bring every term to one side first).
  2. Enter a, b and c. Whole numbers, decimals and fractions such as 1/3 all work. Tap ± to make a number negative.
  3. The roots appear as you type, in exact form (fractions or surds such as (−1 ± √33)/4) and as decimals, with the discriminant and the nature of the roots.
  4. Scroll down for the step-by-step solution, the splitting-the-middle-term method when the roots are rational, and the graph of the parabola with its roots and vertex.

Solve any quadratic equation, with the working

A quadratic equation is any equation that can be written as ax² + bx + c = 0 with a ≠ 0. This quadratic equation solver finds both roots exactly, as fractions or in simplest surd form, and as decimals. It tells you the nature of the roots from the discriminant, and shows each line of the quadratic formula method as you would write it in a Class 10 answer. When the roots are rational it also shows the splitting-the-middle-term method, and for every equation it draws the parabola y = ax² + bx + c.

The quadratic formula

x = (−b ± √D) / 2a, where D = b² − 4ac
Sum of roots = −b/a, Product of roots = c/a

In India this is often called the Sridharacharya formula, after the mathematician Sridharacharya, who gave a method for it.

Nature of roots from the discriminant

Discriminant D = b² − 4acRootsGraph
D > 0 and a perfect squareTwo distinct real roots, rationalCrosses the x-axis twice
D > 0, not a perfect squareTwo distinct real roots, irrational (surds)Crosses the x-axis twice
D = 0Two equal real roots, x = −b/2aTouches the x-axis once
D < 0No real roots (two complex roots)Doesn’t meet the x-axis

The rational/irrational split applies when a, b and c are rational numbers, which they always are here. Decimals and fractions are cleared first by multiplying through.

Worked example 1: 2x² − 5x + 3 = 0

Here a = 2, b = −5 and c = 3. D = (−5)² − 4 × 2 × 3 = 25 − 24 = 1, a perfect square, so the roots are real, distinct and rational. x = (5 ± 1)/4, giving x = 3/2 or x = 1. Check: sum = 5/2 = −b/a and product = 3/2 = c/a.

By splitting the middle term: we need two numbers with product a × c = 6 and sum b = −5, which are −2 and −3. So 2x² − 2x − 3x + 3 = 2x(x − 1) − 3(x − 1) = (2x − 3)(x − 1) = 0.

Worked example 2: 2x² + x − 4 = 0

D = 1² − 4 × 2 × (−4) = 1 + 32 = 33, which is positive but not a perfect square, so the roots are irrational: x = (−1 ± √33)/4, about 1.186141 and −1.686141. Surds are simplified where possible, so for x² + 2x − 7 = 0 you get √32 = 4√2 and x = −1 ± 2√2.

When D is negative

For x² + x + 1 = 0, D = 1 − 4 = −3. In Class 10 the answer is “no real roots”. In Class 11 you meet complex numbers, where √−3 = √3 i, so x = (−1 ± √3 i)/2. The solver shows both readings.

Vertex and graph

The graph of y = ax² + bx + c is a parabola that opens upwards when a > 0 and downwards when a < 0. Its turning point (vertex) is at x = −b/2a, and the y-value there is −D/4a, the minimum or maximum value of the expression. Writing the equation as y = a(x − h)² + k (completing the square) shows the vertex (h, k) directly: x² − 4x + 3 = (x − 2)² − 1, so its lowest point is (2, −1).

Tips

  • Move everything to one side first: x² = 5x − 6 becomes x² − 5x + 6 = 0, so a = 1, b = −5, c = 6.
  • If a = 0 the equation is linear (bx + c = 0); the solver says so and gives x = −c/b.
  • Exact surd simplification is complete for discriminants up to 1015, which covers every textbook problem.

Frequently Asked Questions

It's D = b² − 4ac, for the equation ax² + bx + c = 0. It decides the nature of the roots: D > 0 gives two distinct real roots, D = 0 gives two equal real roots, and D < 0 gives no real roots. For 2x² − 5x + 3 = 0, D = 25 − 24 = 1.

Use x = (−b ± √(b² − 4ac)) / 2a. For x² − 5x + 6 = 0: a = 1, b = −5, c = 6, D = 25 − 24 = 1, so x = (5 ± 1)/2, which gives x = 3 or x = 2.

It means no real number solves the equation. When D < 0, the square root of D isn't a real number, so no real value of x satisfies the equation and the parabola never touches the x-axis. In Class 11 these roots are written as complex numbers, e.g. x² + 4 = 0 gives x = ± 2i.

Check the sum and product. The sum should equal −b/a and the product c/a. For 2x² − 5x + 3 = 0 the roots 3/2 and 1 add to 5/2 = −(−5)/2 and multiply to 3/2. You can also substitute each root back into the equation and get 0.

Yes. For 0.5x² − 1.5x + 1 = 0 enter a = 0.5, b = −1.5, c = 1, or use fractions like 1/3. The solver multiplies through to get whole-number coefficients (here x² − 3x + 2 = 0, roots 2 and 1) before working, so the answers stay exact.

It's the turning point of y = ax² + bx + c, at x = −b/2a. It's the lowest point when a > 0 and the highest when a < 0. For y = x² − 4x + 3 the vertex is (2, −1), so the smallest value of the expression is −1.