Quadratic Equation Solver - Roots of ax² + bx + c = 0
A free online tool that solves ax² + bx + c = 0 using the quadratic formula. Enter coefficients a, b, and c to find real roots and the discriminant instantly.
Quadratic Equation Solver
Result:
Documentation
What is a quadratic equation?
A quadratic equation is an equation of the form , where , , and are numbers and is not zero. The quadratic equation solver on this page finds the value or values of that make the equation true, using the coefficients , , and that a user enters.
If were zero, the term would disappear and the equation would become linear instead of quadratic. For that reason the calculator requires and shows an error if .
The quadratic formula
Every quadratic equation in the form can be solved with the quadratic formula:
The sign stands for two separate calculations, one with a plus sign and one with a minus sign. This is why a quadratic equation can have two different solutions.
The expression under the square root, , is called the discriminant. It is usually written as (the Greek letter delta). The discriminant alone tells you how many real solutions the equation has, before doing the rest of the calculation.
How to calculate the roots
- Write the equation in standard form, .
- Identify the coefficients , , and .
- Calculate the discriminant: .
- If is positive, calculate both roots with .
- If is zero, calculate the single root with .
- If is negative, the equation has no real roots, because a negative number has no real square root.
The calculator on this page performs these steps automatically. It accepts coefficients between and , and it rounds the results to a chosen number of decimal places, from 0 to 10.
What the discriminant means
The sign of the discriminant sorts equations into three cases.
| Discriminant | Number of real roots | What the graph looks like |
|---|---|---|
| Two distinct real roots | The parabola crosses the x-axis at two points | |
| One repeated real root | The parabola touches the x-axis at exactly one point | |
| No real roots | The parabola does not touch the x-axis |
This calculator reports "no real roots" when is negative. It does not calculate complex roots (numbers that involve ).
Worked example
Solve .
Here , , .
First find the discriminant:
Since is positive, the equation has two real roots:
This can be checked by factoring: , which is zero when or .
A second example shows a negative discriminant. For , , , , so . Because is negative, the equation has no real roots.
The parabola, vertex, and axis of symmetry
The graph of is a curve called a parabola. If is positive, the parabola opens upward and has a lowest point. If is negative, it opens downward and has a highest point. That lowest or highest point is the vertex.
The vertex sits at:
A vertical line through the vertex, , is called the axis of symmetry, because the two halves of the parabola mirror each other across it. The real roots of the equation are the points where the parabola crosses the x-axis, so they lie on either side of the axis of symmetry, the same distance away.
Where quadratic equations are used
Quadratic equations describe many real situations. In physics, the height of a thrown object over time follows the equation , and solving it for gives the time the object lands. In engineering, parabolic shapes appear in satellite dishes and bridge cables because of how they focus or distribute force. In computer graphics, ray-tracing programs solve quadratic equations to find where a line intersects a sphere.
A short history
Babylonian mathematicians were solving problems that lead to quadratic equations by about 1800 BC. They used step-by-step recipes, not equations. In about 300 BC, Euclid treated such problems geometrically, as finding a length. The Indian mathematician Brahmagupta (598–665 AD) gave an almost modern method that allowed negative quantities. Around 800 AD, al-Khwarizmi sorted quadratic equations into types. He gave a rule for solving each type and a geometric proof by completing the square.
Frequently asked questions
What happens if I enter 0 for coefficient a? The calculator shows an error, because turns the equation into a linear one, , which is solved differently.
Why does an equation sometimes have no real roots? This happens when the discriminant, , is negative. A negative number has no real square root, so the formula cannot produce a real value of . The equation still has two complex roots, but this calculator does not compute them.
What is the difference between a root and a solution? None. Both words refer to a value of that makes the equation equal zero. "Root" refers to where the graph meets the x-axis; "solution" refers to the algebra.
How many decimal places can I choose? Between 0 and 10. Two or three decimal places are usually enough for everyday problems.
Can I enter very large coefficients? Coefficients must be between and . Values outside that range can cause rounding errors and are rejected.
Can this calculator find complex roots? No. When the discriminant is negative, it reports "no real roots" instead of computing complex numbers.
References
- NIST. Digital Library of Mathematical Functions, §1.11 Zeros of Polynomials. DLMF §1.11 — the roots of az² + bz + c = 0 are (−b ± √D)/(2a), with discriminant D = b² − 4ac.
- OpenStax. College Algebra 2e, 2.5 Quadratic Equations. Quadratic equations — what the discriminant b² − 4ac says about the number and type of solutions.
- MacTutor History of Mathematics, University of St Andrews. Quadratic, cubic and quartic equations. History of quadratic equations — Babylonian methods (about 1800 BC), Euclid (about 300 BC), Brahmagupta and al-Khwarizmi (c. 800).