Quadratic Equation Solver

Share:
Mathematics

Quadratic Equation Solver

ax^2+bx+c=0 real + complex

By Checked against sources by Last reviewed ALGEBRA EDUCATION EQUATIONS MATH QUADRATIC
Your browser is too old for this tool’s interactive features. Please update to Safari 13.1, Chrome or Edge 80, Firefox 74 or newer.

Quadratic Equation Solver

ax² + bx + c = 0
Samples:
—
x₁
—
x₂
—

Discriminant (b²−4ac)
—
Vertex (h, k)
—
Axis of symmetry
—
Factored form
—

Working for this equation

    Advertisement
    After results · AD-W1Responsive · Post-tool — peak engagement

    How to use the Quadratic Equation Solver

    Identify a, b, c from your equation

    Standard form: ax² + bx + c = 0. Coefficient of x² is a; coefficient of x is b; constant is c. If your equation has terms on both sides, move everything to one side first. Type whole numbers, decimals, fractions such as 1/3, or scientific notation such as 2e6. A fraction stays exact; a blank box asks you to fill it rather than counting as zero.

    Read x₁ and x₂

    The two roots (solutions). If the discriminant (b²−4ac) is positive, you get two distinct real roots. If zero, one repeated real root (the parabola touches the x-axis at exactly one point). If negative, two complex conjugate roots — the parabola doesn't reach the x-axis. A rational root prints as an exact fraction; an irrational one prints as a decimal with its exact surd underneath.

    Check vertex + axis of symmetry

    Vertex (h, k) is the parabola's extreme point: minimum if a > 0 (opens upward), maximum if a < 0 (opens downward). h = −b/(2a) is also the axis of symmetry. Useful for: optimisation problems, projectile motion (max height = vertex k), and graphing.

    Use the factored form

    For real roots, the equation factors as a(x − r₁)(x − r₂) = 0. Rational roots give whole-number factors, so 2x² + 5x − 3 reads (x + 3)(2x − 1); irrational roots give a rounded version marked ≈. With complex roots there are no real factors.

    Advertisement
    After how-to · AD-W2Responsive

    The quadratic equation — one of math's most-used tools

    Quadratic equations (degree-2 polynomial equations of form ax² + bx + c = 0) are everywhere — projectile motion, optimisation, finance, engineering, computer graphics. The quadratic formula, x = (−b ± √(b² − 4ac)) / 2a, has a long history. Babylonian scribes around 1800 BCE solved problems we would write as quadratics, but by step-by-step recipes rather than a formula; Brahmagupta stated rules for them in 628 CE, and al-Khwārizmī's rules in the 9th century are essentially the familiar formula, worked for numerical examples. The symbolic version came much later.

    The discriminant — predicting the nature of solutions

    Before computing the full formula, the discriminant Δ = b² − 4ac tells you what kind of solutions you'll get. Δ > 0: two distinct real solutions; parabola crosses x-axis at two points; equation has two different x-values that satisfy it. Δ = 0: one repeated real solution; parabola touches x-axis at exactly one point (the vertex); both formulaic solutions equal −b/2a. Δ < 0: two complex conjugate solutions (p ± qi); parabola doesn't touch x-axis; only solutions exist in the complex plane. Practical implication: in physics + engineering, Δ < 0 usually means the event never happens — a ball thrown too slowly never reaches the height you asked about. (A negative time, by contrast, comes from a real root and is simply discarded.) In pure math, complex solutions are first-class citizens.

    Vertex form + completing the square

    The vertex form a(x − h)² + k rewrites the quadratic to expose its geometric properties directly. (h, k) is the vertex; x = h is the axis of symmetry. For a > 0 (opens upward), k is the minimum value; for a < 0 (opens downward), k is the maximum. Conversion: h = −b/(2a); k = c − b²/(4a). The derivation uses "completing the square" — the same technique used to derive the quadratic formula itself. Use cases: optimisation problems (max revenue at vertex), projectile peak altitude, the peak bending moment in a uniformly loaded beam.

    Common quadratic applications

    Physics — projectile motion: position vs time follows h(t) = −½gt² + v₀t + h₀. Solving h(t) = 0 gives time of impact; vertex gives peak altitude + time. Finance — break-even analysis: revenue function minus cost function often produces a quadratic; roots are break-even points. Engineering — beams: in a simply supported beam under uniform load w, the bending moment is the quadratic M(x) = wx(L − x)/2. The deflection is degree 4, not a quadratic. Computer graphics — Bezier curves: a quadratic Bezier curve is a degree-2 polynomial in its parameter, so finding where it crosses a line means solving a quadratic. Optimisation: a quadratic cost or revenue curve has its best value at the vertex, so −b/2a answers the question without any calculus.

    The discriminant decides, the vertex sits at −b/2a, and Babylonians got there first

    01

    Discriminant Δ = b² − 4ac. Predicts solution type: positive = 2 real distinct; zero = 1 repeated; negative = 2 complex.

    02

    Vertex (h, k) = (−b/2a, c − b²/4a). Parabola's extreme point.

    03

    Babylonians solved quadratic problems by recipe c. 1800 BCE; Brahmagupta (628 CE) and al-Khwārizmī gave rules — the symbols came later.

    Frequently Asked Questions

    • Then it's not a quadratic equation — it's linear (degree 1). With a = 0 and b ≠ 0 the one solution is x = −c/b. With a = 0, b = 0 and c = 0 every x works (0 = 0). With a = 0, b = 0 and c ≠ 0 there is no solution. The quadratic formula itself requires a ≠ 0, because it divides by 2a.

    • When the discriminant (b² − 4ac) is negative. This happens when the parabola doesn't cross the x-axis. In physics: it usually means the situation never occurs — the ball never reaches that height, the two paths never meet. A negative time is different: that is a real root you discard. In pure math: complex solutions are first-class objects in algebra, signal processing, quantum mechanics. For school + most engineering: "no real solutions" is the practical answer; complex roots are notation.

    • Vertex form a(x − h)² + k exposes the parabola's geometric properties directly. (h, k) = vertex coordinates. For optimisation: k is the extreme value (max or min depending on a's sign). For graphing: h tells you horizontal shift; k tells you vertical shift. For physics: in projectile motion, h is time of peak; k is peak altitude — directly readable from vertex form.

    • Many quadratics have irrational or complex roots that don't simplify into clean integer factors. "Nice" factoring works when roots are rational + small. Example: x² − 5x + 6 = (x − 2)(x − 3) — clean. x² − 5x + 5: roots ≈ 1.382 and 3.618 — irrational, so no integer factors. x² − 5x + 7: discriminant −3, so roots 2.5 ± 0.866i. x² + 1: roots ±i — doesn't factor over real numbers. The quadratic formula always gives an answer; factoring is a shortcut for specific clean cases.

    • Three-step process. (1) Set up the equation: identify the variable, write the relationship, get to standard form ax² + bx + c = 0. (2) Solve using this tool or the formula. (3) Interpret: not all mathematical solutions are physically meaningful. Negative time, imaginary velocity, lengths < 0 should be discarded. Most physics problems give two roots; pick the one that makes physical sense.

    • It's derived from "completing the square." Starting with ax² + bx + c = 0: (1) divide by a → x² + (b/a)x + (c/a) = 0; (2) move c/a to other side → x² + (b/a)x = −c/a; (3) add (b/2a)² to both sides → x² + (b/a)x + (b/2a)² = (b/2a)² − c/a; (4) factor left as (x + b/2a)² = b²/4a² − c/a = (b² − 4ac)/4a²; (5) take square root → x + b/2a = ±√(b² − 4ac)/(2a); (6) solve for x → x = (−b ± √(b² − 4ac))/2a. The formula is just a compact summary of this 6-step algebraic process.

    • This tool handles only quadratics (degree 2). Cubic equations (degree 3) have a closed-form solution, published by Cardano in 1545, but it is unwieldy and usually solved numerically. Quartic equations (degree 4) also have one (Ferrari's). Degree 5 and above: there is no general formula in radicals (the Abel–Ruffini theorem), though particular equations can still be solvable. For those, use a numerical method or a computer algebra system.

    • Because spreadsheets and most calculators work in binary floating point. For x² + 10⁸x + 1 the textbook formula subtracts two nearly equal numbers and returns about −7.45 × 10⁻⁹ for the small root, when the true value is −1.00 × 10⁻⁸. For x² + 0.2x + 0.01 rounding makes the discriminant slightly positive, so a repeated root looks like two. This solver treats what you type as exact fractions, so it decides the discriminant exactly, and it uses the rearranged form q = −½(b + sgn(b)√Δ), with roots q/a and c/q, that avoids the subtraction. Goldberg's 1991 paper on floating-point arithmetic explains both effects.

    • No. The solver runs in your browser and does not send or store your coefficients. The page itself still makes ordinary requests of its own, such as loading its files and, where you have allowed them, ads and analytics.

    Method & sources

    How it computes

    Coefficients are parsed to exact rationals, so Δ = b² − 4ac and its sign are exact. Rational roots print as fractions and irrational ones as a surd plus a decimal. √Δ is taken to 128 bits and the roots come from q = −½(b + sgn(b)√Δ), x = q/a and c/q, which avoids cancellation. Complex roots are −b/2a ± i√(−Δ)/2a. Vertex (−b/2a, c − b²/4a). a = 0 falls back to the linear case.

    What this tool implements

    • DLMF §1.11(iii) gives the roots of az² + bz + c = 0 and relates them to the discriminant b² − 4ac.
    • Goldberg (1991) shows the two ways the textbook formula loses accuracy in floating point: cancellation when b² ≫ 4ac, which his formula (5) rearranges away, and rounding inside b² − 4ac when b² ≈ 4ac, which he says can contaminate up to half the digits. The first is handled by the rearranged form q = −½(b + sgn(b)√Δ); the second by exact rational arithmetic, so a typed 0.2 is 1/5 and the sign of Δ is never a rounding accident.
    • A value is printed as exact only when it is: rational roots as fractions, irrational roots as a decimal with the exact surd beneath, and factors from irrational roots marked ≈. Decimals are rounded from the rational, never through a double.
    • Corrected 2026-11-02: x² + 0.2x + 0.01 reported two distinct roots (Δ is exactly 0); the root −1×10⁻⁸ of x² + 10⁸x + 1 printed as "-0.00"; blank inputs counted as zero; the beam example said deflection is quadratic, when the bending moment is and deflection is degree 4; the claim that DevTools shows zero outbound requests, which the page's own files and consented ads and analytics make untrue.
    • History, per MacTutor: Babylonian scribes (c. 1800 BC) solved such problems by algorithm rather than formula; Brahmagupta (628) and al-Khwārizmī gave rules, the latter essentially the familiar formula.

    Sources

    Advertisement
    Pre-footer · AD-W3 728 × 90