Visual Tools
Calculators
Tables
Mathematical Keyboard
Converters
Other Tools


Quadratic Equation Solver

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.






Getting Started

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 x25x+6=0x^2 - 5x + 6 = 0 and press Enter — the right panel shows discriminant calculation Δ=2524=1\Delta = 25 - 24 = 1, the factored form (x2)(x3)=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.
&bull; Enter x2+1=0x^2 + 1 = 0 to see the no-real-solutions case &mdash; Δ=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.

Building Equations with Buttons and Keyboard

The button panel groups inputs by type. All inputs can be made either by clicking or typing on the keyboard.

&bull; Variable row &mdash; xx, yy, nn. The solver picks up whichever variable appears in your equation.
&bull; Number row &mdash; digits 0 through 9 and the decimal point.
&bull; Operator row &mdash; multiplication, division, plus, minus, equals.
&bull; Power row &mdash; 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.

Try an Example — Eight Form Templates

Click the &quot;Try an Example&quot; 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.

&bull; Standard Form &mdash; ax2+bx+c=0ax^2 + bx + c = 0 with all three coefficients present.
&bull; Missing b Term &mdash; ax2+c=0ax^2 + c = 0. Solve by isolating x2x^2 and taking the square root.
&bull; Missing c Term &mdash; ax2+bx=0ax^2 + bx = 0. Factor out xx to get roots x=0x = 0 and x=b/ax = -b/a.
&bull; Perfect Square &mdash; x2+2ax+a2=0x^2 + 2ax + a^2 = 0. Produces a repeated root with Δ=0\Delta = 0.
&bull; Difference of Squares &mdash; x2a2=0x^2 - a^2 = 0. Factors as (xa)(x+a)(x - a)(x + a).
&bull; Leading Coeff $\neq 1$ &mdash; ax2+bx+c=0ax^2 + bx + c = 0 with a>1a > 1. Tests the general factoring case.
&bull; No Real Roots &mdash; constructed with Δ<0\Delta < 0. The solver flags this case.
&bull; Non-Zero RHS &mdash; 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.

Reading the Step-by-Step Solution

The solution panel shows each algebraic move as a labeled step. The exact step sequence depends on which discriminant case applies.

&bull; Standard Form &mdash; 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.
&bull; Calculate Discriminant &mdash; substitutes the coefficients into Δ=b24ac\Delta = b^2 - 4ac and shows the arithmetic.
&bull; Case Routing &mdash; labels the case as Two Distinct Roots, Repeated Root, or No Real Solutions based on the sign of Δ\Delta.
&bull; Factor (when applicable) &mdash; if Δ\Delta is a perfect square and aa, bb, cc are integers, the solver attempts the factored form (pxq)(rxs)=0(px - q)(rx - s) = 0.
&bull; Apply Quadratic Formula &mdash; substitutes into x=(b±Δ)/(2a)x = (-b \pm \sqrt{\Delta}) / (2a) and shows the numerical result.
&bull; First Root and Second Root &mdash; 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.

The Discriminant — Three Cases

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

&bull; $\Delta > 0$ &mdash; 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.
&bull; $\Delta = 0$ &mdash; 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).
&bull; $\Delta < 0$ &mdash; 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.

What is a Quadratic Equation?

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

ax2+bx+c=0,a0ax^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 &mdash; matching the three cases of the discriminant.

The vertex of the parabola sits at x=b/(2a)x = -b / (2a), with y-coordinate yvertex=cb2/(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.

Three Solution Methods

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

&bull; Factoring &mdash; 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.

&bull; Completing the Square &mdash; 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.

&bull; Quadratic Formula &mdash; substitute directly into x=(b±b24ac)/(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:

&bull; If b=0b = 0: isolate x2x^2 and take the square root directly.
&bull; 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.
&bull; 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.

Related Concepts

Quadratic Functions &mdash; functions of the form f(x)=ax2+bx+cf(x) = ax^2 + bx + c. The graph is a parabola; the equation f(x)=0f(x) = 0 is the corresponding quadratic equation.

Quadratic Inequalities &mdash; same form as quadratic equations but with <<, >>, \leq, or \geq. Solved by finding the roots first, then using a sign chart over the resulting intervals.

Vertex Form &mdash; y=a(xh)2+ky = a(x - h)^2 + k where (h,k)(h, k) is the vertex. Obtained by completing the square. Useful for graphing and optimization.

Factored Form &mdash; y=a(xr1)(xr2)y = a(x - r_1)(x - r_2) where r1r_1 and r2r_2 are the roots. Available whenever the roots are real.

Discriminant &mdash; the quantity Δ=b24ac\Delta = b^2 - 4ac that determines the number and nature of the roots.

Vieta's Formulas &mdash; relate the coefficients to the roots: r1+r2=b/ar_1 + r_2 = -b/a and r1r2=c/ar_1 \cdot r_2 = c/a.

Polynomial Equations of Higher Degree &mdash; cubic, quartic, and beyond. The polynomial solver handles up to degree 4.

Complex Roots &mdash; when Δ<0\Delta < 0, the roots are complex conjugates of the form α±βi\alpha \pm \beta i.