letmecalc

Quadratic Equation Calculator

A quadratic equation has the form ax² + bx + c = 0, where a is not zero. This calculator solves it with the quadratic formula and shows both roots (real, repeated or complex), the discriminant and the nature of the solution. Enter the three coefficients with their signs, exactly as they appear once the equation is set equal to zero.

Your numbers

Root x₁
3
Root x₂
2
Discriminant (Δ)
1
Nature of roots
Two distinct real roots

How to solve a quadratic equation

First rearrange the equation into standard form, with every term on one side and zero on the other, then read off a, b and c including their signs. Step 1: compute the discriminant, Δ = b² - 4ac. Step 2: check its sign. A positive Δ gives two different real roots, Δ = 0 gives one repeated root, and a negative Δ gives a pair of complex roots. Step 3: take the square root of Δ (or of -Δ in the complex case) and substitute into x = (-b ± √Δ) / 2a, once with the plus sign for x₁ and once with the minus sign for x₂. The calculator rounds each root and the discriminant to four decimal places. If you enter a = 0 the equation is no longer quadratic, so it solves the linear equation bx + c = 0 instead and reports x = -c/b.

Formula
x = (-b ± √(b² - 4ac)) / 2a | Discriminant Δ = b² - 4ac

Worked example. For x² - 5x + 6 = 0 (a=1, b=-5, c=6): Δ = 25 - 24 = 1, so the roots are x = (5 + 1)/2 = 3 and x = (5 - 1)/2 = 2.

Two more worked examples

When a is not 1: for 2x² + 3x - 5 = 0, a = 2, b = 3 and c = -5. The discriminant is 3² - 4(2)(-5) = 9 + 40 = 49, and √49 = 7. So x₁ = (-3 + 7)/4 = 1 and x₂ = (-3 - 7)/4 = -2.5. Substituting back confirms it: 2(1)² + 3(1) - 5 = 0. When the discriminant is negative: for x² + 2x + 5 = 0, Δ = 4 - 20 = -16. There is no real square root of -16, so the roots are complex: √16 = 4, giving x = (-2 ± 4i)/2 = -1 ± 2i. The graph of y = x² + 2x + 5 never touches the x-axis, which is what a negative discriminant always means. Its lowest point sits at (-1, 4).

Common mistakes and how to avoid them

The most frequent error is losing a sign. With b = -5, the formula starts with -b = +5, and b² is +25, not -25. Typing -5² into a handheld calculator often returns -25 because the square is applied before the minus, so use brackets: (-5)². The second error is dividing only the square root by 2a instead of the whole numerator: the fraction bar covers -b ± √Δ. The third is skipping the rearrangement step. For x² = 5x - 6 you must first write x² - 5x + 6 = 0, which makes b = -5 and c = +6, not b = 5 and c = -6. Finally, check every answer by substituting it into the original equation. A correct root makes the left side equal zero, apart from tiny rounding differences.

Reading the result: roots, vertex and real problems

The roots are the x-values where the parabola y = ax² + bx + c crosses the x-axis. The vertex lies exactly halfway between them, at x = -b/2a. Two quick checks come from the coefficients: the roots add up to -b/a and multiply to c/a. For x² - 5x + 6 = 0 that gives 3 + 2 = 5 and 3 x 2 = 6. In applied problems, not every root is meaningful. A ball thrown upward at 20 m/s from 1.5 m follows h = -4.9t² + 20t + 1.5. Solving h = 0 gives t ≈ 4.1553 s and t ≈ -0.0737 s. Only the positive time is physical, so the ball lands after about 4.16 seconds. The vertex at t = 20/9.8 ≈ 2.04 s gives the peak height, about 21.91 m.

Questions people ask

What is the quadratic formula?

For ax² + bx + c = 0, x = (−b ± √(b² − 4ac)) ÷ 2a. For x² − 5x + 6 = 0: a = 1, b = −5, c = 6, so x = (5 ± √1) ÷ 2, giving x = 3 or x = 2.

What does the discriminant tell me?

It tells you how many real roots the equation has. If Δ > 0 there are two distinct real roots, if Δ = 0 there is one repeated real root, and if Δ < 0 there are two complex roots and the parabola does not cross the x-axis.

What happens if a = 0?

The equation becomes linear, bx + c = 0, which has the single solution x = -c/b. The calculator detects this and labels the result as a linear equation. If a and b are both 0 there is nothing to solve for x.

When can I factor instead of using the formula?

Factoring works neatly when a, b and c are integers and the discriminant is a perfect square, because the roots are then rational. x² - 5x + 6 has Δ = 1, so it factors as (x - 2)(x - 3). x² + 4x + 1 has Δ = 12, which is not a perfect square, so its roots (-0.2679 and -3.7321) are irrational and the formula is the practical route.

What does the i in a complex root mean?

The letter i stands for the square root of -1. A root such as -1 + 2i has a real part of -1 and an imaginary part of 2. Complex roots of a quadratic with real coefficients always come in a matching pair, differing only in the sign of the imaginary part.

Which root is x₁ and which is x₂?

x₁ is the result with +√Δ and x₂ the result with -√Δ. When a is positive, x₁ is the larger root. When a is negative the order flips. The order has no mathematical significance, both are equally valid solutions.

Put this calculator on your site

Free to use on any site. Please keep the credit link.

<iframe
  id="letmecalc-quadratic-calculator"
  src="https://letmecalc.com/embed/math/quadratic-calculator"
  title="Quadratic Equation Calculator"
  width="100%"
  height="620"
  style="border:0;max-width:100%"
  loading="lazy"
></iframe>
<p><a href="https://letmecalc.com/math/quadratic-calculator" target="_blank" rel="noopener">Quadratic Equation Calculator</a> by letmecalc</p>
<script>
(function () {
  var f = document.getElementById("letmecalc-quadratic-calculator");
  window.addEventListener("message", function (e) {
    if (e.origin !== "https://letmecalc.com") return;
    if (!f || e.source !== f.contentWindow) return;
    var d = e.data;
    if (!d || d.source !== "letmecalc-embed" || d.type !== "resize") return;
    if (typeof d.height === "number" && d.height > 0) {
      f.style.height = d.height + "px";
    }
  });
})();
</script>