Quadratic Equation Solver
Last updated: 27 June 2026
Reviewed by Gavin Meiring, Lead research and primary author ยท Doctoral Candidate (Corporate Governance) ยท Research and drafting assisted by AI
Solve axยฒ + bx + c = 0
- Babylonian scribes solved quadratic problems on clay tablets around 2000-1600 BC, long before algebra had symbols โ they worked through them with geometric recipes.
- The general formula in its modern form was completed by the Indian mathematician Brahmagupta in 628 AD in his 'Brahmasphutasiddhanta'.
- The word 'algebra' comes from 'al-jabr', in the title of Al-Khwarizmi's ninth-century book โ and when the discriminant is negative, the 'imaginary' roots take their name from Descartes, who coined the term in 1637 as a slight.
Quadratic Equation Solver
A quadratic equation solver finds all real and complex solutions of any equation in the form ax^2 + bx + c = 0, using the quadratic formula and showing a full worked solution. It is used by GCSE and A-level students, engineering students, and anyone who needs to solve second-degree polynomial equations quickly and accurately.
How to Use the Quadratic Equation Solver
- Enter the coefficients a, b, and c from your equation in the form ax^2 + bx + c = 0.
- If your equation is not in this form, rearrange it first (move all terms to one side).
- Click Solve to see the full solution including the discriminant, both roots, and step-by-step working.
- Review the vertex form and factored form of the quadratic for additional insight.
- View the parabola graph showing where the curve crosses the x-axis (the roots).
The Formula
equation ax^2 + bx + c = 0, the solutions are given by the quadratic formula:
x = (-b +/- sqrt(b^2 - 4ac)) / (2a)
The discriminant D = b^2 - 4ac determines the nature of the roots:
D > 0: two distinct real roots D = 0: one repeated real root (x = -b / 2a) D < 0: two complex conjugate roots (no real solutions)
The vertex of the parabola is at x = -b / (2a), y = c - b^2 / (4a).
Real-World Example
Solve 2x^2 - 7x + 3 = 0.
a = 2, b = -7, c = 3
Discriminant: D = (-7)^2 - 4(2)(3) = 49 - 24 = 25
sqrt(25) = 5
x1 = (-(-7) + 5) / (2 x 2) = (7 + 5) / 4 = 12 / 4 = 3 x2 = (-(-7) - 5) / (2 x 2) = (7 - 5) / 4 = 2 / 4 = 0.5
Solutions: x = 3 and x = 0.5
Factored form: 2(x - 3)(x - 0.5) = (x - 3)(2x - 1)
Verify: substitute x = 3: 2(9) - 7(3) + 3 = 18 - 21 + 3 = 0. Correct.
Quadratics in the Real World
Quadratic equations describe any situation involving a parabolic relationship: projectile motion, profit maximisation, and the shape of lenses and reflectors. In physics, the height of a projectile thrown upward at velocity v from height h is given by h(t) = -0.5gt^2 + vt + h0, a quadratic in time t. Setting h = 0 and solving gives the time of impact. In business, revenue is often modelled as R(x) = px where p is a linear price function of quantity x, making R quadratic in x. The maximum revenue occurs at the vertex of the parabola. Architects and engineers use parabolic arches and cables (which are parabolic under uniform load) for their structural efficiency. The parabolic dish used in telescopes, satellite dishes, and solar concentrators focuses incoming parallel signals to a single point (the focus), a property that follows directly from the reflective geometry of the quadratic curve.
Frequently Asked Questions
What if the discriminant is negative? A negative discriminant means the quadratic has no real solutions. The parabola does not cross the x-axis. The two solutions are complex numbers of the form x = (-b +/- i x sqrt(4ac - b^2)) / (2a), where i = sqrt(-1). Complex solutions always come in conjugate pairs (one with +i and one with -i). In many practical applications, complex roots indicate that the physical constraint being modelled (such as landing on the ground) is never met under those conditions.
Can I solve a quadratic by factoring instead? Yes, if the quadratic factors neatly. For example, x^2 - 5x + 6 = (x - 2)(x - 3), giving roots x = 2 and x = 3. Factoring is faster when the roots are integers or simple fractions, but it requires some trial and error. The quadratic formula always works regardless of whether the equation factors neatly, and it is the safest method when the roots are irrational or complex.
What is completing the square? Completing the square is an alternative method for solving quadratics and is also used to derive the quadratic formula. You rewrite ax^2 + bx + c = 0 by adding and subtracting the square of half the coefficient of x to create a perfect square trinomial: a(x + b/2a)^2 = b^2/4a - c. Taking the square root of both sides and rearranging gives the solutions. Completing the square is also used to convert a quadratic to vertex form y = a(x - h)^2 + k.
How do I know which method to use? For simple quadratics with obvious integer roots, try factoring first. If the quadratic does not factor neatly, use the quadratic formula, which gives exact answers every time. Completing the square is best reserved for problems where you need vertex form or are deriving a result rather than just finding roots. In timed exams, the quadratic formula is usually the most reliable and efficient method.
Seven equations worked through together
A single example shows that the solver works. A table of them shows what the discriminant does across the whole range of cases. The rows below cover two distinct real roots, a repeated root, a pair of complex roots and an irrational pair.
| Equation | Discriminant | Roots | Vertex |
|---|---|---|---|
| 2x^2 - 7x + 3 = 0 | 25 | 3 and 0.5 | (1.75, -3.125) |
| x^2 - 5x + 6 = 0 | 1 | 3 and 2 | (2.5, -0.25) |
| x^2 - 9 = 0 | 36 | 3 and -3 | (0, -9) |
| x^2 + 2x + 5 = 0 | -16 | -1 + 2i and -1 - 2i | (-1, 4) |
| 3x^2 - 6x + 3 = 0 | 0 | 1 twice | (1, 0) |
| x^2 - 3x + 1 = 0 | 5 | 2.618034 and 0.381966 | (1.5, -1.25) |
| 4x^2 + 4x + 1 = 0 | 0 | -0.5 twice | (-0.5, 0) |
Every discriminant in the table follows from D = b^2 - 4ac. For the first row, that is (-7)^2 - 4(2)(3) = 49 - 24 = 25. For the fourth, it is 2^2 - 4(1)(5) = 4 - 20 = -16. The sign of the result, not its size, decides which kind of answer comes back.
Checking the roots without returning to the formula
Two relations let you test a pair of roots in a few seconds. For ax^2 + bx + c = 0, the roots always add to -b/a and multiply to c/a. These are Vieta's formulas.
| Equation | Sum of roots, -b/a | Product of roots, c/a | Sum from the roots | Product from the roots |
|---|---|---|---|---|
| 2x^2 - 7x + 3 = 0 | 3.5 | 1.5 | 3 + 0.5 = 3.5 | 3 x 0.5 = 1.5 |
| x^2 - 5x + 6 = 0 | 5 | 6 | 3 + 2 = 5 | 3 x 2 = 6 |
| x^2 + 2x + 5 = 0 | -2 | 5 | -1 + 2i plus -1 - 2i = -2 | (-1 + 2i) x (-1 - 2i) = 5 |
| 4x^2 + 4x + 1 = 0 | -1 | 0.25 | -0.5 + -0.5 = -1 | -0.5 x -0.5 = 0.25 |
The complex row is the one worth reading twice. The two roots add to a real number and multiply to a real number, even though neither root is real. Complex roots of a quadratic always arrive as a conjugate pair, and that pairing is what keeps the coefficients real.
A projectile that lands on a root
A ball is thrown upwards from 1.5 m at 20 m/s. Ignoring air resistance and taking g as 9.8 m/s^2, the height in metres after t seconds is h(t) = -4.9t^2 + 20t + 1.5.
Setting h = 0 gives the impact time. The discriminant here is 20^2 + 4(4.9)(1.5) = 429.40, and its square root is 20.721969. The two roots are -0.0737 and 4.1553.
| Quantity | Value | How it is found |
|---|---|---|
| Discriminant | 429.40 | b^2 - 4ac with a = -4.9, b = 20, c = 1.5 |
| Negative root | -0.0737 s | before the throw, so discarded |
| Positive root | 4.1553 s | the impact time |
| Vertex time | 2.040816 s | -b / 2a |
| Apex height | 21.908163 m | a t^2 + b t + c at the vertex time |
The negative root is not a mistake. It describes the moment the ball would have been at ground level if the parabolic path were extended backwards, which corresponds to a throw from below the launch point. Real world problems usually discard it, and the solver reports it so you can see why.
The apex position is the other half of the answer. A projectile spends half its flight rising and half falling, and the vertex time of 2.040816 seconds is close to but not exactly half of 4.1553 seconds, because the launch point sits 1.5 m above the landing point.
Reading the vertex straight from the coefficients
The vertex does not need the formula. For y = ax^2 + bx + c, the x coordinate is -b / 2a, and the y coordinate is c - b^2 / 4a. Both come from the coefficients alone.
For 2x^2 - 7x + 3 that gives x = 7 / 4 = 1.75 and y = 3 - 49 / 8 = -3.125, matching the table. The vertex sits exactly halfway between the two roots when the roots are real, which is 3 and 0.5 here, halfway being 1.75.
When the roots are complex the vertex still exists. For x^2 + 2x + 5 the vertex is at (-1, 4), and the parabola never reaches the x axis because the lowest point is four units above it.
What the solver assumes
- The coefficients are real numbers. Equations with complex coefficients are not supported.
- The value of a must not be zero. An equation with a = 0 is linear, and the tool rejects it.
- The equation has to be rearranged into standard form before the coefficients are entered. Terms on the right hand side must be moved across first.
- Roots are reported as exact values where they are rational or simple surds, and to six decimal places otherwise.
- The graph window is fixed, so very large roots can sit outside the visible range even though the solver reports them correctly.
- The tool works in the real and complex numbers only. It does not attempt numerical root finding for higher degree polynomials.
Also try these free tools: