Solve any quadratic equation ax² + bx + c = 0 with complete step-by-step solution.
The quadratic formula is one of the most useful tools in algebra because it solves every possible quadratic equation, no matter how the coefficients work out. Whether your equation factors neatly into whole-number solutions, produces messy irrational numbers, or has complex roots that involve the imaginary unit, the formula handles all cases with the same simple steps. This calculator not only gives you the answers but shows the complete working so you can verify each step and learn the method. A quadratic equation is any equation that can be written in the form ax² + bx + c = 0 where a is not zero. If a equals zero, the equation becomes linear (bx + c = 0) and does not need the quadratic formula.
The quadratic formula states that for any equation ax² + bx + c = 0, the solutions are: x = (-b ± √(b² - 4ac)) / (2a). The formula gives two solutions because of the ± sign (read as "plus or minus"). One solution uses the positive square root, the other uses the negative. Every quadratic has exactly two roots by the Fundamental Theorem of Algebra, though these roots may be identical (a "double root" when the discriminant equals zero) or complex (when the discriminant is negative). The formula is derived from the technique called "completing the square" applied to the general form ax² + bx + c = 0. If you learn one algebra formula in your entire life, this is the one to memorize — it solves problems ranging from projectile motion in physics to optimization problems in economics. Our scientific calculator handles the arithmetic once you know your coefficients, and our square root calculator computes exact square roots for the discriminant term.
| Discriminant (b² - 4ac) | Number of Roots | Type of Roots |
|---|---|---|
| Positive (> 0) | 2 distinct roots | Two different real numbers |
| Zero (= 0) | 1 repeated root | One real number (double root) |
| Negative (< 0) | 2 distinct roots | Two complex conjugates (contain i) |
| Perfect square positive | 2 rational roots | Two fractions or integers |
| Non-square positive | 2 irrational roots | Two numbers with radicals |
Solving a quadratic equation with the formula follows six steps. Step 1: rewrite your equation in standard form so that everything is on one side and equals zero. For example, 2x² = 5x + 3 becomes 2x² - 5x - 3 = 0. Step 2: identify the coefficients a, b, and c. Here a = 2, b = -5, and c = -3. Be careful with signs — this is where most errors happen. Step 3: calculate the discriminant by computing b² - 4ac. In our example: (-5)² - 4(2)(-3) = 25 + 24 = 49. Step 4: interpret the discriminant to know what type of roots to expect. Since 49 is positive and a perfect square, we expect two nice rational roots. Step 5: plug into the formula. x = (-(-5) ± √49) / (2 × 2) = (5 ± 7) / 4. Step 6: separate into the two solutions. x₁ = (5 + 7)/4 = 12/4 = 3. x₂ = (5 - 7)/4 = -2/4 = -0.5. Both solutions can be verified by substituting back into the original equation. Our fraction calculator handles the arithmetic when your solutions are fractions rather than integers.
The discriminant b² - 4ac is the expression under the square root in the quadratic formula, and it tells you the nature of the roots before you finish solving. When the discriminant is positive, the square root produces a real number, and the ± splits into two distinct real roots — the parabola crosses the x-axis at two different points. When the discriminant equals exactly zero, the square root is zero, and both roots collapse to a single value x = -b/(2a) — the parabola touches the x-axis at exactly one point (the vertex). When the discriminant is negative, the square root of a negative number is imaginary, producing two complex conjugate roots that involve the imaginary unit i (where i² = -1) — the parabola does not cross the x-axis at all. Additionally, if the discriminant is a perfect square (like 4, 9, 16, 25, 49, 64, 81, 100), the roots are rational (fractions or integers). If it is positive but not a perfect square (like 2, 3, 5, 7, 10, 11), the roots are irrational (involve a square root radical that cannot be simplified to a fraction). Checking the discriminant first tells you exactly what kind of answer to expect and helps you catch computation errors.
| Example Equation | a, b, c | Discriminant | Roots |
|---|---|---|---|
| x² - 5x + 6 = 0 | 1, -5, 6 | 1 (positive, perfect square) | x = 3, x = 2 |
| x² - 4x + 4 = 0 | 1, -4, 4 | 0 (zero, double root) | x = 2 (double) |
| x² + 4 = 0 | 1, 0, 4 | -16 (negative, complex) | x = 2i, x = -2i |
| 2x² - 3x - 2 = 0 | 2, -3, -2 | 25 (positive, perfect square) | x = 2, x = -0.5 |
| x² - 2x - 4 = 0 | 1, -2, -4 | 20 (positive, not perfect) | x = 1 ± √5 |
For quadratic equations with nice integer roots, factoring is often faster than the formula. To factor x² + bx + c = 0 where a = 1: find two numbers that multiply to c and add to b. For x² + 5x + 6 = 0: two numbers that multiply to 6 and add to 5 are 2 and 3, so the equation factors as (x + 2)(x + 3) = 0, giving roots x = -2 and x = -3. For quadratics where a is not 1, you can factor by grouping or use trial and error. However, factoring only works when the roots are rational, and even then, only if you can find the factor pair quickly. Rule of thumb: if you can factor the equation in under 30 seconds, factoring is faster. If not, use the quadratic formula. The formula always works — it produces the same answer as factoring when factoring is possible, and it handles all the cases (irrational, complex) that cannot be factored using integers. Students should know both methods. Our scientific calculator and percentage calculator handle related computations, and our ratio calculator is useful when quadratic problems involve proportions.
Quadratic equations appear throughout physics, engineering, economics, and everyday problem-solving. Projectile motion is described by quadratics: the height h of a projectile at time t follows h = h₀ + v₀t - 4.9t² in metric units. Finding when the projectile hits the ground means solving a quadratic equation for t. Area and geometry problems often produce quadratics: finding the dimensions of a rectangle with known area and perimeter, calculating the width of a border around a garden, or determining the size of a pool with fixed water volume. Optimization problems in business use quadratics because profit and revenue often have quadratic shapes: profit peaks at a specific price point and drops off on either side. The vertex of a profit parabola tells you the optimal price. Physics problems in electricity, gravity, and mechanics regularly produce quadratic equations that must be solved to find times, distances, or velocities. Even simple problems like "find two numbers whose sum is 10 and whose product is 21" reduce to quadratic equations (x + (10-x) = 10 and x(10-x) = 21 gives x² - 10x + 21 = 0, with roots x = 3 and x = 7). Whenever a problem involves squaring a variable, expect a quadratic to appear.
The quadratic formula as we know it today was assembled over more than 3,000 years of mathematical development across multiple civilizations. Babylonian clay tablets from around 2000 BCE show solutions to specific quadratic equations using geometric methods equivalent to completing the square, though the Babylonians did not use symbolic notation. Ancient Greek mathematicians including Euclid worked with quadratics geometrically, viewing them as area problems rather than algebraic equations. Indian mathematician Brahmagupta in the 7th century CE provided the first general algebraic solution and explicitly handled both positive and negative roots. Persian mathematician Muhammad ibn Musa al-Khwarizmi in the 9th century systematized the approach in his book "Al-Kitab al-mukhtasar fi hisab al-jabr wa'l-muqabala" — the word "algebra" comes from "al-jabr" in that title. Al-Khwarizmi's methods were passed to Europe through translations and gradually developed into modern symbolic notation during the 1500s and 1600s by mathematicians including Viète, Descartes, and others. The formula in the form we teach today only emerged in its final symbolic form in the 1600s, though the underlying method is millennia older. Understanding this history explains why "algebra" is a word with Arabic roots and why the quadratic formula appears in nearly identical form in mathematics education worldwide.