Quadratic Formula Calculator Formula

Understand the math behind the quadratic formula calculator. Each variable explained with a worked example.

Formulas Used

Root1

root1 = (-b + sqrt(abs(discriminant))) / (2 * a)

Root2

root2 = (-b - sqrt(abs(discriminant))) / (2 * a)

Discriminant Val

discriminant_val = discriminant

Vertex X

vertex_x = -b / (2 * a)

Vertex Y

vertex_y = a * (-b / (2 * a))^2 + b * (-b / (2 * a)) + c

Variables

VariableDescriptionDefault
aCoefficient a1
bCoefficient b-5
cCoefficient c6
discriminantDerived value= b^2 - 4 * a * ccalculated

How It Works

How to Use the Quadratic Formula

Formula

x = (-b ± √(b² - 4ac)) / (2a)

For the equation ax² + bx + c = 0

Discriminant (Δ = b² - 4ac)

  • Δ > 0: Two distinct real roots
  • Δ = 0: One repeated real root
  • Δ < 0: Two complex roots (no real solutions)
  • Vertex

    The vertex of the parabola is at x = -b/(2a), y = f(-b/(2a)).

    Worked Example

    Solve x² - 5x + 6 = 0 (a=1, b=-5, c=6).

    a = 1b = -5c = 6
    1. 01Discriminant = (-5)² - 4(1)(6) = 25 - 24 = 1
    2. 02Since Δ > 0, there are two distinct real roots
    3. 03x₁ = (5 + √1) / 2 = 6 / 2 = 3
    4. 04x₂ = (5 - √1) / 2 = 4 / 2 = 2
    5. 05Vertex: x = 5/2 = 2.5, y = (2.5)² - 5(2.5) + 6 = -0.25

    Ready to run the numbers?

    Open Quadratic Formula Calculator