Skip to main content
Calcimator

Quadratic Equation Solver

Solve quadratic equations (ax² + bx + c = 0). Find roots, discriminant, vertex, and axis of symmetry with a visual graph.

This calculator solves ax² + bx + c = 0 using the quadratic formula (line 66-67), and first computes the discriminant b² − 4ac (line 60) to decide which of three branches applies: two distinct real roots when the discriminant is positive, one repeated root when it's exactly 0, or two complex conjugate roots when it's negative (lines 65-79). At the defaults (a=1, b=−5, c=6), b dominates the discriminant's sensitivity — because b enters as b², moving b further from 0 in either direction always increases the discriminant, while moving it closer to 0 decreases it; a and c, by contrast, each enter linearly through the −4ac term, so raising either one (holding the other fixed and positive) always lowers the discriminant. The discriminant actually crosses zero — the boundary between real and complex roots — at b ≈ −4.899 for these values of a and c, since b² = 4ac = 24 there. The Vertex and Axis of Symmetry (lines 82-83) are computed the same way regardless of the discriminant's sign, since −b/2a is defined whenever a ≠ 0. This calculator does not handle a = 0: that branch (lines 8-58) silently falls back to solving the linear equation bx + c = 0 instead, and reports Root 2, Discriminant, Vertex, and Axis of Symmetry as "N/A" rather than computing them, since a linear equation has no parabola to describe.

Inputs

Results

Root 1 (x₁)

3

Root 2 (x₂)2
Discriminant (b²-4ac)1
Vertex(2.5, -0.25)
Axis of Symmetry2.5
Nature of RootsTwo distinct real roots
How to Use This Calculator
  1. Enter coefficients a, b, and c for the equation ax² + bx + c = 0 (a must be non-zero for a true quadratic).
  2. The calculator evaluates the discriminant b² − 4ac to determine the nature of the roots.
  3. If the discriminant > 0, two distinct real roots exist; if = 0, one repeated root; if < 0, two complex conjugate roots.
  4. Roots are found using the quadratic formula: x = (−b ± √(b² − 4ac)) / 2a.
  5. The Vertex (−b/2a, f(−b/2a)) is the turning point of the parabola; it is the minimum if a > 0 and maximum if a < 0.
  6. The parabola graph updates in real time so you can see how changing a, b, or c shifts and stretches the curve.

What each input means

a (x² coefficient)
Coefficient a in the equation.
b (x coefficient)
Coefficient b in the equation.
c (constant)
Coefficient c in the equation.

How this is calculated

Formula

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

Engine last updated .

Frequently Asked Questions

Which coefficient has the biggest effect on the discriminant?

b does, at the default coefficients. The discriminant is b² − 4ac (line 60), and because b is squared, moving it further from 0 in either direction always increases the discriminant — nudging b by 10% moves the discriminant roughly twice as much as the same-sized nudge on a or c, which only enter linearly through the −4ac term.

Does increasing a always lower the discriminant?

At the default coefficients (a=1, b=−5, c=6, both a and c positive), yes: increasing a makes the −4ac term more negative, lowering the discriminant (line 60), and the same holds symmetrically for c. If c or a were negative instead, −4ac would move in the opposite direction as that coefficient increased, since the sign of the whole term depends on both factors together.

At what value of b does this equation switch from real to complex roots?

With a=1 and c=6 held at their defaults, the discriminant b² − 4ac crosses zero at b ≈ −4.899 (and its mirror image, b ≈ 4.899), since that's where b² equals 4ac = 24. Between those two values the discriminant is negative and the calculator reports two complex conjugate roots; outside that range it reports two distinct real roots.

What happens if I set a to 0?

The calculator does not treat that as an error — the branch at line 8 detects a = 0 and instead solves the linear equation bx + c = 0 for x, reporting Root 2, Discriminant, Vertex, and Axis of Symmetry as "N/A" rather than computing them, since without an x² term there's no parabola for those quantities to describe.

The questions that sit next to this one — chosen by subject, including calculators filed under a different category.

More in Math & Statistics.