Visual Tools
Calculators
Tables
Mathematical Keyboard
Converters
Other Tools


Quadratic Equation Solver

How to use Quadratic Equation Solver
  1. Build the equation in the display at the top: click the Var, Num and Op buttons, the ^ or x² power buttons and the brackets, or type on the keyboard; click inside the display to move the caret. Learn more about building equations
  2. Clear empties the display, the curved arrow undoes the last edit and the ⌫ button deletes the character before the caret. Learn more about editing
  3. Click Solve, or press Enter in the display, once the equation is complete; an expression without an equals sign or without a squared term is refused. Learn more about solving
  4. Open Try an Example and click a card to load a random equation of that form. Learn more about the templates
  5. The right panel lists the steps from standard form through the discriminant to the roots, the answer card gives the roots marked Exact or Approximate, and the graph shows the parabola; the box under the solver explains the method. Learn more about the solution
  6. A negative discriminant ends in No real solutions; a zero discriminant in one repeated root. Learn more about the discriminant
x²

Solve quadratic equations step by step

Enter equation...
Var
Num
Op

Select an equation type or enter your own quadratic equation, then click Solve to see the step-by-step solution.

How the solver works

The solver reads one equation of degree 22 in xx, yy or nn, moves every term to the left to reach ax2+bx+c=0ax^2 + bx + c = 0, and computes the discriminant Delta=b2−4acDelta = b^2 - 4ac. A positive DeltaDelta gives two roots by the quadratic formula, shown factored first when DeltaDelta is a perfect square; Delta=0Delta = 0 gives one repeated root −b/(2a)-b / (2a); a negative DeltaDelta gives no real solution. Each move is listed as a step on the right, and the graph draws the parabola with its roots and vertex. Learn more about quadratic equations





Getting Started

Demox² − 5x + 6 = 0, Solve, Clear, no real solutions
Step 0 of 4
The solver shows an equation display at the top with a blinking yellow caret marking the cursor position. Click anywhere in the display to move the cursor, or use arrow keys, Home, and End for keyboard navigation. Type directly or use the button panel below.

Three quick experiments:

• Type x2−5x+6=0x^2 - 5x + 6 = 0 and press Enter — the right panel shows discriminant calculation Δ=25−24=1\Delta = 25 - 24 = 1, the factored form (x−2)(x−3)=0(x - 2)(x - 3) = 0, and the two roots x=2x = 2 and x=3x = 3.
• Click an example template like "Perfect Square" — a random equation with a repeated root loads into the display.
• Enter x2+1=0x^2 + 1 = 0 to see the no-real-solutions case — Δ=−4<0\Delta = -4 < 0.

The Solve button is disabled until you enter something. Pressing Enter on the display is equivalent to clicking Solve. The graph panel renders the parabola y=ax2+bx+cy = ax^2 + bx + c with roots marked on the x-axis and the vertex highlighted. An expression without an equals sign is refused with "Input must be an equation (use = sign)", and an equation without a squared term with a message that points to the linear solver. What makes an equation quadratic is explained in what is a quadratic equation.

Building Equations with Buttons and Keyboard

DemoThe power button, undo, delete, Solve
Step 0 of 4
The button panel groups inputs by type. All inputs can be made either by clicking or typing on the keyboard.

• Variable row — xx, yy, nn. The solver picks up whichever variable appears in your equation.
• Number row — digits 0 through 9 and the decimal point.
• Operator row — multiplication, division, plus, minus, equals.
• Power row — the caret operator for any exponent, the x2x^2 shortcut button (inserts caret plus 2), and bracket buttons.

Keyboard shortcuts: type letters and digits directly, use star or slash for multiplication and division (auto-converted to proper symbols on display), and press Enter to solve. The caret key inserts the power operator. The display renders exponents as proper superscripts.

Ctrl+Z undoes the last action up to fifty edits back; Backspace deletes the character before the cursor; Delete removes the character after it. The Clear button empties the display entirely; the curved-arrow button steps through the undo stack one edit at a time; the ⌫ button deletes the character before the caret. The x2x^2 button inserts only the power, so click the variable first and then x2x^2. Why a square is the highest power allowed is explained in what is a quadratic equation.

Try an Example — Eight Form Templates

DemoOpen the templates, load two forms
Step 0 of 4
Click the "Try an Example" header to expand the template panel. Each card generates a random equation of that form. Clicking the same card again produces a new random version.

• Standard Form — ax2+bx+c=0ax^2 + bx + c = 0 with all three coefficients present.
• Missing b Term — ax2+c=0ax^2 + c = 0. Solve by isolating x2x^2 and taking the square root.
• Missing c Term — ax2+bx=0ax^2 + bx = 0. Factor out xx to get roots x=0x = 0 and x=−b/ax = -b/a.
• Perfect Square — x2+2ax+a2=0x^2 + 2ax + a^2 = 0. Produces a repeated root with Δ=0\Delta = 0.
• Difference of Squares — x2−a2=0x^2 - a^2 = 0. Factors as (x−a)(x+a)(x - a)(x + a).
• Leading Coeff ≠1\neq 1 — ax2+bx+c=0ax^2 + bx + c = 0 with a>1a > 1. Tests the general factoring case.
• No Real Roots — constructed with Δ<0\Delta < 0. The solver flags this case.
• Non-Zero RHS — x2+bx=cx^2 + bx = c. The solver moves all terms to the left and proceeds.

Roughly 80 percent of generated equations produce clean integer roots; the rest exercise irrational or fractional cases. Loading a template clears the previous solution; click Solve to work the new equation. The methods the solver applies to every template are compared in three solution methods.

Reading the Step-by-Step Solution

DemoIrrational roots, then a repeated root
Step 0 of 3
The solution panel shows each algebraic move as a labeled step. The exact step sequence depends on which discriminant case applies.

• Standard Form — rewrites the equation as ax2+bx+c=0ax^2 + bx + c = 0 by moving everything to the left side, with explicit values for aa, bb, and cc.
• Calculate Discriminant — substitutes the coefficients into Δ=b2−4ac\Delta = b^2 - 4ac and shows the arithmetic.
• Case Routing — labels the case as Two Distinct Roots, Repeated Root, or No Real Solutions based on the sign of Δ\Delta.
• Factor (when applicable) — if Δ\Delta is a perfect square and aa, bb, cc are integers, the solver attempts the factored form (px−q)(rx−s)=0(px - q)(rx - s) = 0.
• Apply Quadratic Formula — substitutes into x=(−b±Δ)/(2a)x = (-b \pm \sqrt{\Delta}) / (2a) and shows the numerical result.
• First Root and Second Root — separate steps for each branch of the plus-or-minus sign.

The final answer card at the bottom displays both roots (or the repeated root, or the no-solutions message) along with the discriminant value and whether the answer is exact or approximate. Exact means the discriminant is a perfect square: x2−2x−4=0x^2 - 2x - 4 = 0 has Δ=20\Delta = 20 and the roots 3.2360683.236068 and −1.236068-1.236068 are marked Approximate, while x2+4x+4=0x^2 + 4x + 4 = 0 has Δ=0\Delta = 0 and the repeated root x=−2x = -2. The box under the solver, How the solver works, summarises the method in a few lines and links to the theory below. The formula every case rests on is derived in three solution methods.

The Discriminant — Three Cases

The discriminant Δ=b2−4ac\Delta = b^2 - 4ac is the single number that controls how a quadratic equation behaves. It comes from the radicand of the quadratic formula.

• Δ>0\Delta > 0 — Two distinct real roots. The parabola crosses the x-axis at two points. The square root of Δ\Delta is a positive real number, so −b+Δ-b + \sqrt{\Delta} and −b−Δ-b - \sqrt{\Delta} are different, giving two different roots when divided by 2a2a.
• Δ=0\Delta = 0 — One repeated real root. The parabola touches the x-axis at exactly one point: its vertex. The ±Δ\pm \sqrt{\Delta} term vanishes, so both branches give the same value x=−b/(2a)x = -b / (2a).
• Δ<0\Delta < 0 — No real solutions. The parabola never crosses the x-axis. The square root of a negative number is not real (it is imaginary), so the roots exist only in the complex numbers as a conjugate pair.

The discriminant also determines whether the roots are rational. If aa, bb, cc are integers and Δ\Delta is a perfect square, both roots are rational and the equation can be factored over the integers.

For coverage of the complex case see complex roots of quadratics and the imaginary unit.

The three cases are worked through in the discriminant and the link between roots and the graph in connection to graphing.

What is a Quadratic Equation?

A quadratic equation in one variable is a polynomial equation of degree 2:

ax2+bx+c=0,a≠0ax^2 + bx + c = 0, \quad a \neq 0


The coefficient aa is the leading coefficient and must be nonzero (otherwise the equation reduces to linear). The coefficient bb controls the position of the parabola's axis of symmetry; the constant cc is the y-intercept of the parabola y=ax2+bx+cy = ax^2 + bx + c.

Solutions to the equation are the x-coordinates of the points where the parabola crosses (or touches) the x-axis. A parabola can cross the x-axis in zero, one, or two places — matching the three cases of the discriminant.

The vertex of the parabola sits at x=−b/(2a)x = -b / (2a), with y-coordinate yvertex=c−b2/(4a)y_{\text{vertex}} = c - b^2 / (4a). This is the minimum point if a>0a > 0 (parabola opens upward) or the maximum if a<0a < 0 (opens downward).

Quadratic equations appear in projectile motion, optimization problems, area calculations, financial models with compounding, and any setting where a quantity depends on the square of another.

For deeper coverage see quadratic functions, parabola graph, and vertex form.

The standard form is defined in definition and standard form, the place of quadratics among the equation types in quadratic equations, and the vertex and the crossings in connection to graphing.

Three Solution Methods

Three standard methods solve any quadratic equation. The choice depends on the structure of the equation.

• Factoring — rewrite ax2+bx+cax^2 + bx + c as (px+q)(rx+s)(px + q)(rx + s) and use the zero-product property: if a product is zero, at least one factor is zero. This works cleanly only when the roots are rational. The solver attempts factoring whenever Δ\Delta is a perfect square and the coefficients are integers.

• Completing the Square — rewrite ax2+bx+c=0ax^2 + bx + c = 0 as a(x+h)2+k=0a(x + h)^2 + k = 0, then isolate the squared term and take the square root. This method derives the quadratic formula and is essential for converting to vertex form. It always works but involves more steps than factoring.

• Quadratic Formula — substitute directly into x=(−b±b2−4ac)/(2a)x = (-b \pm \sqrt{b^2 - 4ac}) / (2a). This works for every quadratic equation without needing to recognize special structure. It is the most general method and is what the solver applies in every case (with factoring shown as an additional step when applicable).

For special cases, simpler approaches work:

• If b=0b = 0: isolate x2x^2 and take the square root directly.
• If c=0c = 0: factor out xx to get x(ax+b)=0x(ax + b) = 0, so x=0x = 0 or x=−b/ax = -b/a.
• If the equation is a perfect square trinomial: recognize it directly and use the resulting linear equation.

For comprehensive treatment see factoring quadratics, completing the square, and the quadratic formula derivation.

Each method has its own lesson section: solving by factoring, solving by completing the square and the quadratic formula; they are compared in summary of solving methods.