Quadratic Equation
solver.
Type your numbers into the equation. You get exact roots, the graph and every step, as you type.
- Discriminant
- 49
- Vertex (lowest)
- (1.5, −12.25)
- Axis of symmetry
- x = 1.5
The curve crosses the x-axis twice, at x = −2 and x = 5. It opens upward, so the vertex is its lowest point.
Graph
Drag the brass point to move the curvey = x² − 3x − 10 opens upward, with its lowest point (the brass vertex) at (1.5, −12.25) and the y-intercept at (0, −10). It crosses the x-axis at x = −2 and x = 5. The shaded band between them is where x² − 3x − 10 is below 0.
Working
- 1Read off the numbersa = 1, b = −3, c = −10
- 2Discriminant, Δ = b² − 4ac(−3)² − 4(1)(−10) = 49
- 3Quadratic formulax = 3 ± √492
- 4Square root of the discriminant√Δ = 7
- 5Answerx = −2 or x = 5
- 6Check: put each root back into ax² + bx + c(−2)² − 3(−2) − 10 = 0(5)² − 3(5) − 10 = 0
Keyboard shortcuts
- ↑ and ↓ in an equation box change it by 1. Hold Shift for 10, Alt for 0.1. The boxes beside the sliders step by 0.1 for a, 0.5 for b and 1 for c.
- Tab to the brass point on the graph, then use the arrow keys to move the vertex. Shift moves it further.
- ← and → switch between Exact and Decimal, and between decimal places.
- Ctrl or ⌘ with the mouse wheel zooms the graph. Reset view brings it back.
What if c changes
| c | Roots | Discriminant | Type |
|---|---|---|---|
| −25Discriminant 109Two real | −3.7202, 6.7202 | 109 | Two real |
| −20Discriminant 89Two real | −3.217, 6.217 | 89 | Two real |
| −15Discriminant 69Two real | −2.6533, 5.6533 | 69 | Two real |
| −10 (yours)Discriminant 49Two real | −2, 5 | 49 | Two real |
| −5Discriminant 29Two real | −1.1926, 4.1926 | 29 | Two real |
| 0Discriminant 9Two real | 0, 3 | 9 | Two real |
| 5Discriminant −11Complex | 1.5 ± 1.6583i | −11 | Complex |
Steps of 5 around your c. The roots are real in 6 of 7 rows. They change from two real to complex between c = 0 and c = 5.
Solve a list of equations
Type or paste rows of a, b and c, for example a column block from a worksheet. Each row gets its own roots.
| # | a | b | c |
|---|---|---|---|
| 1 | |||
| 2 | |||
| 3 | |||
| 4 |
Roots for each row
| Equation | Roots | Type | |
|---|---|---|---|
| x² − 3x − 10 = 0Discriminant 49Two real | −2, 5 | 49 | Two real |
| 2x² + 3x − 2 = 0Discriminant 25Two real | −2, 0.5 | 25 | Two real |
| x² − 2 = 0Discriminant 8Two real | −1.4142, 1.4142 | 8 | Two real |
| x² + 2x + 5 = 0Discriminant −16Complex | −1 ± 2i | −16 | Complex |
How it’s worked out
Every quadratic can be written as ax² + bx + c = 0. The roots are the values of x that make the left side equal zero. The quadratic formula gives both of them at once:
- a is the number in front of x². It cannot be 0, or there is no x² term and the equation is a straight line.
- b is the number in front of x. If there is no x term, b is 0.
- c is the number standing on its own, after you move everything to one side.
- ± means you work the formula twice: once adding the square root, once subtracting it. That gives the two roots.
The part under the square root is called the discriminant, written Δ (the Greek letter delta):
Its sign tells you what kind of roots to expect before you finish. A positive Δ gives two different real roots. Zero gives one repeated root. A negative Δ gives two complex roots, because no real number squares to a negative.
| Equation | Δ | Roots |
|---|---|---|
| 1 | ||
| 12 | ||
| 0 | ||
| −16 |
The turning point of the curve, the vertex, sits halfway between the roots. Its coordinates are:
For real roots, the tool uses a rearranged form of the formula. When b is large, subtracting two nearly equal numbers loses digits, so it first finds , choosing the sign that matches b, and then takes the roots as q ÷ a and c ÷ q. This keeps the small root of x² + 100000000x + 1 = 0 correct to the last digit. The exact answer comes from completing the square with whole numbers, so surds such as √29 stay as surds instead of turning into long decimals.
Worked examples
Sizing a garden bed
Priya wants a rectangular bed that is 3 m longer than it is wide and covers 40 m². If the width is x, then x(x + 3) = 40. Move the 40 across to get x² + 3x − 40 = 0, so a = 1, b = 3 and c = −40.
The discriminant is 3² − 4(1)(−40) = 169, a perfect square, so the roots are whole numbers: x = −8 or x = 5. A width cannot be negative, so the bed is 5 m wide. Solving for the length L instead, L(L − 3) = 40 gives L² − 3L − 40 = 0 with the positive root L = 8, so the bed is 5 m by 8 m. The equation also factors as (x + 8)(x − 5) = 0.
When does a thrown ball land?
Marco throws a ball upward at 20 m/s from a hand 1.5 m above the ground. Using g = 9.8 m/s², its height after t seconds is h = −4.9t² + 20t + 1.5. It lands when h = 0.
Here Δ = 429.4, so there are two real roots: t = −0.07 and t = 4.16. Only the positive one fits the story, so the ball lands after about 4.16 s. The vertex, t = 2.04 s and h = 21.91 m, is the top of the flight. The negative root is the time the ball would have left the ground if its path had started earlier at ground level.
A homework answer with i in it
Sam's worksheet asks for the roots of 2x² + 2x + 5 = 0. The discriminant is 2² − 4(2)(5) = −36, which is negative, so the parabola never touches the x-axis and the roots are complex.
As decimals that is x = −0.5 ± 1.5i. The two roots are a conjugate pair: they share the real part −0.5 and differ only in the sign of the i part. The real part is also the x-coordinate of the vertex.
Reading your result
The roots are where the curve meets the x-axis. Two real roots mean two crossings. A repeated root means the curve only touches the axis at its vertex. Complex roots mean it never reaches the axis at all. These three cases follow the sign of the discriminant, as set out in Stewart's Precalculus, section 1.5.
The exact answer is what most answer keys print: whole numbers, stacked fractions such as , surds such as 2 ± √3, or p ± qi. If any of a, b or c is a decimal, only decimals are shown. Switch to Decimal and pick 2, 4, 6 or 8 places when you need a number to plug in somewhere else.
The vertex is the lowest point when a is positive and the highest point when a is negative. In a word problem it is usually the maximum height, the largest area or the best price. The axis of symmetry is the vertical line through it.
The factored form appears only when both roots are rational. x² − 2 = 0 has roots ±√2, so it has no factors with whole numbers; you see the vertex form under the answer instead.
The check in the working puts each root back into ax² + bx + c. A result of 0 confirms the root. With decimal inputs you may see "0 (to rounding)", which means the leftover is far smaller than the numbers you typed.
Common mistakes
- Squaring a negative b. With b = −3, b² is 9, not −9. Typing −3² into many handheld calculators gives −9 because the square is done before the minus. Put brackets round it: (−3)².
- Forgetting the minus in −b. When b is negative, −b is positive. In x² − 3x − 10 = 0 the formula starts with +3, not −3.
- Dividing only the square root by 2a. The whole top line, −b ± √Δ, is divided by 2a. Writing −b ± √Δ ÷ 2a changes the answer.
- Not moving everything to one side first. For x² + 3x = 40, c is −40, not 0 and not 40. The formula only works on ax² + bx + c = 0.
- Leaving out a missing term. x² − 9 = 0 has b = 0. Put 0 in the box rather than leaving it empty.
- Rounding too early. Rounding Δ or √Δ before the last step can move the roots by more than you expect. Equations built from decimals such as 0.1 and 0.2 can also give a tiny nonzero Δ when the true value is 0, so two roots that agree to many places are probably one repeated root.
- Keeping a root the story rules out. A negative time or a negative length is a real root of the equation but not an answer to the question.
Questions people ask
Sources
- Stewart, Redlin and Watson. Precalculus: Mathematics for Calculus, 7th ed., sections 1.5 and 1.6
- Higham, N. J. Accuracy and Stability of Numerical Algorithms, 2nd ed. (SIAM, 2002), section 1.8 on the quadratic formula
- Press et al. Numerical Recipes, 3rd ed., section 5.6: Quadratic and cubic equations
- OpenStax, College Algebra 2e, section 2.5: Quadratic Equations (2021)