Quadratic Equation Calculator

Solve ax²+bx+c=0 using the quadratic formula. Includes parabola visualization, vertex calculation, and Vieta's formulas.

MATHEMATICS

The Quadratic Equation Calculator solves ax squared + bx + c = 0 using the quadratic formula.

Displays real or complex roots, solution steps, parabola vertex, and an SVG graph visualization. Supports Vieta's formulas and discriminant analysis.

Quadratic Equation Calculator

Selesaikan ax² + bx + c = 0 — tampilkan akar, langkah, puncak parabola, dan grafik.

Referensi
Rumus Kuadrat (ABC)
x = (−b ± √(b² − 4ac)) / (2a)
Berlaku untuk semua persamaan kuadrat ax² + bx + c = 0 dengan a ≠ 0. Tanda ± menghasilkan dua akar sekaligus.
Arti Diskriminan (D = b² − 4ac)
KondisiJenis AkarGrafik
D > 0Dua akar real berbeda (x₁ ≠ x₂)Parabola memotong sumbu-x di dua titik
D = 0Satu akar kembar (x₁ = x₂)Parabola menyinggung sumbu-x di satu titik
D < 0Dua akar kompleks (bilangan imajiner)Parabola tidak memotong sumbu-x
Tips Pemfaktoran (untuk a = 1)
  • Cari dua bilangan p dan q sehingga p + q = b dan p × q = c
  • Bentuk faktor: (x + p)(x + q) = 0, maka x = −p atau x = −q
  • Contoh: x²−5x+6=0 → cari p,q: p+q=−5, p×q=6 → p=−2, q=−3
  • Hasil faktor: (x−2)(x−3)=0 → x=2 atau x=3
  • Gunakan rumus ABC jika koefisien tidak bulat atau tidak mudah difaktorkan
Rumus Vieta (Hubungan Akar dan Koefisien)
x₁ + x₂ = −b/a
Jumlah kedua akar
x₁ × x₂ = c/a
Hasil kali kedua akar
(x₁−x₂)² = D/a²
Selisih kuadrat kedua akar
x₁² + x₂² = (b²−2ac)/a²
Jumlah kuadrat akar

Calculator information

How to use this calculator

  1. Write the equation in standard form ax^2 + bx + c = 0 and make sure a is not 0.
  2. Enter values for coefficients a, b, and c (they can be negative or decimal).
  3. Choose the display: real roots, complex roots, or a full step-by-step solution.
  4. Check the discriminant D = b^2 - 4ac to determine the type of roots.
  5. Note the vertex at (-b/2a, c - b^2/4a) for sketching the parabola.
  6. Tip: use Vieta's formulas (x1 + x2 = -b/a; x1 * x2 = c/a) to verify your results.

Quadratic Formula

x = (-b +/- sqrt(b^2 - 4ac)) / (2a)
  • a, b, c = coefficients of ax^2 + bx + c = 0
  • D = b^2 - 4ac (discriminant)
  • If D > 0: two distinct real roots
  • If D = 0: one repeated real root
  • If D < 0: two complex conjugate roots

If a = 0, the equation reduces in degree to the linear equation bx + c = 0.

Worked example: Solving x^2 - 5x + 6 = 0

Given:
  • a = 1
  • b = -5
  • c = 6
Steps:
  1. Compute the discriminant: D = (-5)^2 - 4 * 1 * 6 = 25 - 24 = 1.
  2. Since D > 0, there are two distinct real roots.
  3. x1 = (5 + sqrt(1)) / (2 * 1) = 6/2 = 3.
  4. x2 = (5 - sqrt(1)) / (2 * 1) = 4/2 = 2.
  5. Vieta check: x1 + x2 = 5 = -b/a; x1 * x2 = 6 = c/a (matches).

Result: The roots are x = 2 and x = 3, with the parabola's vertex at (2.5, -0.25).

Frequently asked questions

What is the difference between the quadratic formula and factoring?
Factoring is faster when the rational roots are simple, but it fails when the discriminant is not a perfect square. The quadratic formula works universally for any coefficient values, including irrational and complex roots. Most US high school algebra courses (Algebra I and II) teach both techniques.
What if the discriminant is negative?
The roots become complex numbers of the form x = (-b +/- i * sqrt(|D|)) / (2a). The calculator displays the real and imaginary parts separately. Equations with D < 0 do not cross the x-axis, so the parabola never touches the horizontal axis.
What is the use of the vertex of a parabola?
The vertex marks the minimum value (if a > 0) or the maximum value (if a < 0) of the quadratic function. Its coordinates are (-b/2a, f(-b/2a)). The vertex is widely used in optimization problems such as maximum profit or projectile trajectories.
Why can a not be zero?
If a = 0, the ax^2 term disappears and the equation is no longer quadratic but linear. The quadratic formula becomes undefined because the denominator 2a is zero. In that case, solve it as a linear equation: x = -c/b.
Can Vieta's formulas replace the quadratic formula?
Vieta's formulas only give the sum and product of the roots, not the individual values directly. They are useful for quickly verifying results or constructing a new equation from known roots. To find the actual roots, use factoring, completing the square, or the quadratic formula.

Last updated: May 11, 2026