Skip to content
LunaCalc

Math

Quadratic Formula Calculator

Solve quadratic equations and report discriminant and roots.

Calculator

About this calculator

This quadratic formula calculator solves ax² + bx + c = 0, reporting the discriminant and both roots.

Formula notes

x = (−b ± √(b² − 4ac)) / 2a. The discriminant Δ = b² − 4ac tells you whether roots are real and distinct (Δ>0), repeated (Δ=0), or complex (Δ<0).

Worked examples

  1. Example: x² − 3x + 2 = 0 gives Δ = 1, with roots x = 2 and x = 1 — as the defaults show.
  2. For 2x^2 - 5x - 3 = 0, the discriminant is 49 and the roots are (5 +/- 7) / 4, giving x = 3 and x = -0.5.

How to use it

  1. Enter coefficients a, b, and c from your equation.
  2. Check the discriminant to know the root type.
  3. Read both roots, including complex ones when Δ < 0.

Frequently asked questions

What happens when a = 0?

It stops being quadratic and becomes linear; solve bx + c = 0 instead.

Why are there sometimes two equal roots?

When the discriminant is 0, both ± branches give the same value, producing a repeated root.

Limits and interpretation

  • The coefficient a must be nonzero; otherwise the equation is linear rather than quadratic.
  • Floating-point arithmetic can lose accuracy for extreme coefficient scales or nearly repeated roots; specialist numerical methods may be needed.

References