Quadratic Equation Calculator

Solve ax² + bx + c = 0, with exact roots, decimal approximations and the working shown.

Equation coefficients

ax2+bx+c=0ax^2+bx+c=0

Move all terms to the left and enter their signs. Use 0 for absent terms. Each signed decimal accepts up to 30 total digits and 12 decimal places. No fractions, commas or exponent notation.

Results

Solutions (exact)
x = 2 or 3
≈ 2 or 3

Decimal approximations use up to 10 significant digits. Exact radicals may remain unsimplified.

Equation type
Two distinct real roots
Discriminant b² - 4ac
1
From the original coefficients.

Working

  1. Equivalent integer equation: (1)x² + (-5)x + (6) = 0. Scaling and common-factor reduction preserve its roots.
  2. For the integer equation, Δ = B² - 4AC = 1.
  3. Use x = (-B ± √Δ) / (2A), with denominator 2.
  4. The discriminant is a perfect square: √Δ = 1.
  5. Exact solution: x = 2 or 3.

Root identities

Root sum (-b/a)
5
Root product (c/a)
6

These identities apply to quadratic roots, including a repeated root counted twice and complex conjugate roots.

The quadratic formula

D=b2−4ac,x=−b±D2a(a≠0)D=b^2-4ac,\qquad x=\frac{-b\pm\sqrt{D}}{2a}\quad(a\ne0)

If D is positive, there are two distinct real roots. If D is zero, there is a repeated real root. If D is negative, the roots are a complex conjugate pair with √D = i√(-D).

Decimal coefficients are converted to an equivalent integer equation using exact digit arithmetic. The integer discriminant and its square-root test remain exact; decimal root approximations are calculated separately.

Worked example: x² - 5x + 6 = 0

  1. a = 1, b = -5, c = 6.
  2. D = (-5)² - 4 × 1 × 6 = 1, so there are two real roots.
  3. x = (5 ± √1) ÷ 2, giving x = 2 or x = 3.
  4. The roots sum to 5 and multiply to 6, matching -b/a and c/a.

Entering and reading an equation

  • Use equality to zero: x² = 4 becomes x² - 4 = 0, so c = -4.
  • Both signs of a square root matter in the quadratic formula. A repeated root is one distinct value with multiplicity two.
  • If a = 0, solve the remaining linear or constant equation instead.
  • Exact fractions and radical expressions preserve distinctions that decimal rounding can hide. Very small non-zero approximations use scientific notation.
  • Multiplying every coefficient by the same non-zero factor preserves roots but changes the magnitude of the discriminant.

Frequently asked questions

How do I enter a quadratic equation?
Move every term to the left so the equation is ax² + bx + c = 0, then enter a, b and c with their signs. Enter 0 for an absent term. For example, x² = 4 becomes a = 1, b = 0, c = -4.
What happens if a is zero?
The equation is no longer quadratic. If b is non-zero, the calculator solves the linear equation bx + c = 0. If a and b are zero, a non-zero c gives no solution, while c = 0 gives an identity satisfied by every real or complex value.
Are complex roots supported?
Yes. A negative discriminant gives two complex conjugate roots. The symbol i means the square root of -1. Exact real and imaginary components are shown, with decimal approximations separately.
Are decimal inputs and fractions exact?
Ordinary decimal coefficients are read exactly, with up to 30 digits in total and 12 decimal places each. Fractions and exponent notation are not accepted as inputs. Rational roots are reduced exactly; irrational roots retain an exact radical that may not be simplified.
Why is the discriminant in the working sometimes different?
The result card uses b² - 4ac from your original coefficients. The working also shows an equivalent integer equation after clearing decimal places and removing common factors. Its discriminant can have a different magnitude, but its sign and roots are equivalent.
How precise are the decimal roots?
Decimal roots are numerical approximations shown with up to 10 significant digits. A stable calculation preserves small real roots when the direct subtraction formula would lose precision. Very close roots can display the same approximation; use the exact roots to distinguish them.
Does a repeated root count as two roots?
A zero discriminant gives one distinct real value with multiplicity two. The calculator labels it a repeated root.
Esc