Quadratic Equation Solver
نیاSolve ax² + bx + c = 0 and get real or complex roots with the discriminant and working shown.
Solve ax² + bx + c = 0
Enter the three coefficients — results update instantly
Parabola Graph
Red dot = vertex, blue dots = x-intercepts, green dot = y-intercept
Runs entirely in your browser. Nothing is uploaded.
What Is the Quadratic Formula?
A quadratic equation is any polynomial equation of degree 2 in standard form ax² + bx + c = 0, where a, b, and c are real number coefficients and a ≠ 0. The word "quadratic" derives from the Latin quadratus meaning "square", because the highest power of the unknown is 2. Every quadratic equation has exactly two roots (counting multiplicity) in the complex number system — guaranteed by the Fundamental Theorem of Algebra.
The quadratic formula x = (−b ± √(b² − 4ac)) / (2a) provides a universal, closed-form solution for finding these roots. Simply identify a, b, and c from your equation, substitute them in, and evaluate both the + and − cases. This solver automates every step — discriminant computation, square root evaluation, and final root expressions — while showing full step-by-step working.
Understanding the Discriminant
The discriminant Δ = b² − 4ac is the single most informative quantity in the quadratic formula because it tells you the complete nature of solutions before you finish the calculation. Positive: two distinct real roots, the parabola crosses the x-axis twice. Zero: exactly one repeated real root, the vertex just touches the x-axis. Negative: two complex conjugate roots, the parabola floats above or below the x-axis.
In applied problems, the discriminant's sign has direct physical meaning. For a projectile height equation h(t) = −16t² + v₀t + h₀, Δ > 0 means the object reaches a given height twice (up and down); Δ = 0 means it just grazes that height at the apex; Δ < 0 means it never reaches that height. Understanding the discriminant transforms the formula from a mechanical procedure into a powerful analytical tool.
Parabola Geometry — Vertex, Intercepts, and Symmetry
The graph of y = ax² + bx + c is always a parabola. When a > 0 it opens upward (U-shaped) with a minimum; when a < 0 it opens downward (∩-shaped) with a maximum. The vertex at (−b/2a, c − b²/4a) is the turning point and key for optimization problems. The axis of symmetry x = −b/2a divides the parabola into two mirror halves. The y-intercept is always (0, c). The x-intercepts are the real roots, if they exist.
This calculator renders a live SVG graph with the vertex marked in red, real x-intercepts in blue, and the y-intercept in green. The graph updates instantly as you change a, b, or c — making it easy to develop geometric intuition for how each coefficient shapes the parabola.
How to Use This Quadratic Solver
Enter a, b, and c in the three input fields and results update instantly. Make sure your equation is in standard form ax² + bx + c = 0 before reading off coefficients — rearrange if needed. The solver shows: the discriminant and its sign, complete step-by-step formula evaluation, both roots (real or complex), vertex coordinates, axis of symmetry, y-intercept, Vieta's formulas verification, and the live parabola graph.
Four methods exist for solving quadratics: Factoring (fast for integer roots), Completing the square (systematic, always works), The quadratic formula (most general — handles all coefficient types and all root types), and Graphing (visual but approximate). For most practical purposes the quadratic formula is the go-to method, which is exactly what this solver implements with full precision and complete working shown.
UtiloKit vs CalculatorSoup, RapidTables and Wolfram Alpha
Most online quadratic calculators offer a subset of features. CalculatorSoup shows step-by-step working and the discriminant but doesn't render a graph. RapidTables provides a minimal calculator without visual output. Wolfram Alpha is the most comprehensive but sends your equation to a cloud server, requires entering a specific query format, and can be overwhelming for basic use.
UtiloKit's solver is the fastest option for most students and engineers: instant results as you type (no submit button needed), the complete set of outputs including vertex and Vieta's formulas, a live graph, and everything runs locally in your browser with no uploads and no account. It's the right balance of depth and speed for homework checking, exam practice, and engineering calculations.
Deriving the Quadratic Formula: Completing the Square
The quadratic formula is not magic — it is derived by systematically solving the general equation ax² + bx + c = 0 using a technique called completing the square. Start by dividing every term by a (valid because a ≠ 0) to get x² + (b/a)x + c/a = 0. Move the constant to the right: x² + (b/a)x = −c/a. Now the key step: add the square of half the coefficient of x to both sides. Half of b/a is b/(2a), and its square is b²/(4a²). Adding b²/(4a²) to both sides gives x² + (b/a)x + b²/(4a²) = b²/(4a²) − c/a.
The left side is now a perfect square trinomial: (x + b/(2a))² = (b² − 4ac) / (4a²). Taking the square root of both sides introduces the ± symbol: x + b/(2a) = ± √(b² − 4ac) / (2a). Subtracting b/(2a) from both sides yields the final result: x = (−b ± √(b² − 4ac)) / (2a). Every part of the formula now has an origin — the −b comes from subtracting b/(2a), the denominator 2a comes from dividing by a and the 2a in the square root step, and the discriminant b² − 4ac is the expression left on the right side after combining fractions. Understanding this derivation also shows why completing the square is independently useful: it is the only algebraic method that converts any quadratic into vertex form y = a(x − h)² + k directly.
Completing the square also exposes the geometric meaning of each operation. When you add b²/(4a²) to both sides, you are literally completing a square in coordinate geometry — turning a partial square into a full one. The vertex x-coordinate h = −b/(2a) drops out naturally as the value that makes the completed square zero, which confirms that the axis of symmetry and the halfway point between the two roots are the same line. This is not a coincidence but a direct consequence of the symmetric structure the algebra reveals.
Four Methods for Solving Quadratics — When to Use Each
Factoring is the fastest method when it works. For x² − 7x + 12 = 0, spotting that −3 × −4 = 12 and −3 + (−4) = −7 gives (x − 3)(x − 4) = 0 instantly. But factoring over the integers is only possible when the discriminant is a perfect square, which fails for most real-world equations. A useful preliminary check: compute Δ = b² − 4ac; if it is a perfect square integer, factoring is practical; otherwise, reach for the formula.
Completing the square is slower than the formula for solving roots but indispensable for two other tasks: deriving the vertex form y = a(x − h)² + k (required in optimization problems and conic-section analysis) and proving the quadratic formula itself. It is the foundational method that all other approaches rest on. The quadratic formula is the universal workhorse — it handles rational, irrational, and complex roots without any case-switching or inspiration. Graphing provides visual intuition and approximate answers but gives no exact values for irrational roots; it is best used as a sanity-check alongside one of the algebraic methods rather than as a primary solution strategy.
In practice, choose based on context. Exam problems with small integer coefficients often factor; physics problems involving measured constants almost never do. Engineering and science students should default to the quadratic formula because coefficient values come from measurements, not designed to factor neatly. Pure-math courses often require completing the square specifically to practice the technique. Graphing is most useful early in learning, when the goal is building intuition about how a, b, and c each affect the shape of the parabola before the algebra becomes automatic.
Real-World Applications of Quadratic Equations
Projectile motion is the most frequently cited application. When a ball is launched upward with initial velocity v₀ from height h₀, its height at time t is h(t) = −½gt² + v₀t + h₀, where g ≈ 9.8 m/s² on Earth. Setting h(t) = 0 and solving gives the landing time — a quadratic with a = −½g, b = v₀, c = h₀. The discriminant tells you whether the object ever reaches a target height at all. The vertex gives the apex: maximum height at t = v₀/g seconds, reaching h₀ + v₀²/(2g) metres. Every step of trajectory analysis — range, time of flight, maximum altitude — reduces to quadratic solving.
Area and dimension problems appear throughout geometry and construction. A rectangle with area 60 m² and perimeter 34 m has length l and width w satisfying l + w = 17 and l × w = 60. Substituting w = 17 − l gives l(17 − l) = 60, which rearranges to l² − 17l + 60 = 0 — solved in seconds by the formula to give l = 12 m and w = 5 m. Optimization problems follow the same structure: a farmer fencing a rectangular paddock with 200 m of fencing along three sides (a wall forms the fourth) maximizes area A = x(200 − 2x) = −2x² + 200x, where the vertex at x = 50 m gives the maximum area of 5,000 m².
In electronics, the LC circuit resonance frequency satisfies ω² = 1/(LC) — itself a quadratic in ω. In optics, the thin-lens equation 1/f = 1/d₀ + 1/dᵢ, when combined with magnification constraints, often yields a quadratic for the image distance. In economics, demand curves of the form P = a − bQ yield quadratic total-revenue functions TR = PQ = aQ − bQ², whose maximum (found at the vertex) gives the profit-maximizing output level. Quadratic equations are not an abstract algebra exercise — they are the mathematical structure underlying a large fraction of quantitative work across physics, engineering, and economics.
A Brief History of the Quadratic Equation
Quadratic equations were solved geometrically long before algebra was formalized. Babylonian mathematicians around 2000 BCE recorded clay tablets containing problems equivalent to solving x² + bx = c, working entirely through geometric arguments about areas and lengths — they had no symbolic notation, only verbal procedures. Ancient Egyptian, Greek, and Chinese mathematicians developed parallel geometric methods. Euclid's Elements (c. 300 BCE) contains what amounts to completing the square in purely geometric language, without the algebraic abstraction we use today.
The decisive algebraic step came with Muhammad ibn Musa al-Khwarizmi, whose treatise Al-Kitab al-mukhtasar fi hisab al-jabr wal-muqabala (written in Baghdad around 820 CE) systematically classified and solved quadratic equations using rhetorical algebra — words, not symbols. The title's phrase al-jabr ("completion" or "restoration") is the direct etymological root of the word algebra. Al-Khwarizmi recognized six canonical quadratic types and gave correct solution procedures for each, though he worked only with positive coefficients and positive roots because negative numbers were not yet accepted. The Indian mathematician Bhaskara II stated an explicit general formula in his Lilavati and Bijaganita (12th century CE) that is recognisably equivalent to the modern quadratic formula, and he was among the first to acknowledge that each equation could have two roots.
The final conceptual barrier — accepting roots with a negative discriminant — fell in 16th-century Italy. Gerolamo Cardano encountered square roots of negative numbers while solving cubics and tentatively manipulated them as formal objects. Rafael Bombelli then systematized imaginary numbers in his Algebra (1572), establishing rules for arithmetic with √(−1) that made complex roots of quadratics fully legitimate mathematical objects rather than impossible fictions. It took another two centuries — and the work of Euler, Gauss, and Argand — before complex numbers were given a rigorous geometric interpretation as points in the plane, transforming them from a computational convenience into a cornerstone of modern mathematics and physics.
Numerical Precision: Why Floating-Point Arithmetic Can Fool You
The quadratic formula, as written, harbors a subtle numerical hazard called catastrophic cancellation. Consider the equation x² − 10000x + 1 = 0. Here b² = 10⁸ and 4ac = 4, so the discriminant is 99,999,996 and √Δ ≈ 9999.99998. One root is x₁ = (10000 + 9999.99998)/2 ≈ 9999.99999 — computed accurately. The other is x₂ = (10000 − 9999.99998)/2 ≈ 0.00001. In this second root, you are subtracting two nearly equal large numbers, and floating-point arithmetic only retains a fixed number of significant digits. The subtraction destroys most of those digits, leaving a result that can be off by many orders of magnitude relative to the true answer.
The numerically stable remedy, often called Kahan's method, avoids the dangerous subtraction entirely. Compute whichever root does not involve cancellation first — always choose the sign in ±√Δ that matches the sign of b, so you are adding rather than subtracting. Call this x₁. Then recover the other root from Vieta's product formula: x₂ = c / (a · x₁). This route never subtracts nearly equal quantities and delivers full double-precision accuracy for both roots regardless of how ill-conditioned the coefficients are. A solver that blindly applies (−b ± √Δ)/(2a) without this correction can return a result that looks plausible on screen but is wrong in the fifth or sixth significant digit — exactly the range that matters for sensitive engineering calculations.
For the vast majority of homework and textbook problems, where coefficients are small integers, the naive formula is perfectly accurate. But awareness of catastrophic cancellation is essential when coefficients span several orders of magnitude — common in physics simulations, control-system design, and numerical root-finding. If you ever observe that one root seems suspiciously large while the other is near zero, verify x₂ using the Vieta check x₁ · x₂ = c/a rather than trusting the direct formula output. That check costs nothing and immediately flags any precision loss that occurred during the cancellation step.
Frequently asked questions
What is the quadratic formula?
The quadratic formula gives the two roots of any equation in the form ax² + bx + c = 0 (where a ≠ 0): x = (−b ± √(b² − 4ac)) / (2a). The ± symbol means you compute both x₁ = (−b + √(b² − 4ac)) / (2a) and x₂ = (−b − √(b² − 4ac)) / (2a). This formula always works regardless of whether the roots are real integers, irrational numbers, or complex numbers — making it the most universal method for solving quadratic equations.
What is the discriminant and what does its sign tell you?
The discriminant is Δ = b² − 4ac, the expression under the square root. If Δ > 0, there are two distinct real roots and the parabola crosses the x-axis twice. If Δ = 0, there is exactly one repeated real root — the parabola just touches the x-axis at its vertex. If Δ < 0, both roots are complex conjugates and the parabola never crosses the x-axis. Knowing the discriminant's sign tells you everything about the nature of solutions before finishing the calculation — it's the first thing to check.
How do I solve a quadratic equation step by step?
Step 1: Rearrange so one side equals zero: ax² + bx + c = 0. Step 2: Identify a, b, and c. Step 3: Compute the discriminant Δ = b² − 4ac. Step 4: If Δ ≥ 0, apply x = (−b ± √Δ) / (2a) to find two real roots. If Δ < 0, write √Δ = i√|Δ| and express roots as p ± qi where p = −b/(2a) and q = √|Δ|/(2a). This calculator automates every step and shows the full working, including intermediate discriminant values and root expressions.
What are complex (imaginary) roots and what do they mean geometrically?
Complex roots occur when Δ < 0. They come in conjugate pairs: x = p ± qi, where i = √(−1), p = −b/(2a) is the real part, and q = √(|Δ|)/(2a) is the imaginary part. Geometrically, complex roots mean the parabola does not intersect the x-axis at all — it floats entirely above if a > 0, or entirely below if a < 0. Despite not appearing on the real graph, complex roots still satisfy Vieta's formulas for sum and product of roots.
How do I find the vertex of a parabola?
For y = ax² + bx + c, the vertex is at (h, k) where h = −b / (2a) and k = c − b² / (4a). If a > 0, the vertex is the minimum point of the parabola; if a < 0, it is the maximum point. The vertex is the most important point for optimization problems — finding the maximum revenue, minimum cost, peak height of a projectile, or maximum enclosed area with fixed fencing all require identifying the vertex. This calculator shows vertex coordinates automatically.
What is the axis of symmetry of a parabola?
The axis of symmetry is the vertical line x = −b / (2a) that passes through the vertex. The parabola is a perfect mirror image on both sides of this line. When two real roots exist, they are always symmetrically placed: each root is the same horizontal distance from the axis of symmetry. For example, if the roots are 1 and 5, the axis is at x = 3. This also means the axis x-coordinate is the arithmetic mean of the two roots.
What are Vieta's formulas and how do I use them?
Vieta's formulas state that for ax² + bx + c = 0, the sum of the roots equals −b/a and the product of the roots equals c/a. These hold even for complex roots. They give you a quick verification check: if your two calculated roots don't sum to −b/a, you've made an arithmetic error. They also let you build a quadratic from its roots: if you want roots r₁ and r₂, the equation is a(x − r₁)(x − r₂) = 0, expanding to ax² − a(r₁+r₂)x + a(r₁r₂) = 0.
Can I solve a quadratic by factoring instead of the formula?
Yes — factoring is faster when roots are small integers. For example, x² − 5x + 6 = 0 factors to (x − 2)(x − 3) = 0, giving roots 2 and 3. However, factoring over integers isn't always possible when roots are irrational or complex. A useful strategy: check the discriminant first — if it's a perfect square, the roots are rational and factoring is practical; otherwise use the quadratic formula, which always works for any coefficients.
Is this better than CalculatorSoup or RapidTables for quadratic equations?
UtiloKit's quadratic solver goes further than most. CalculatorSoup shows step-by-step working and the discriminant but doesn't render a graph. RapidTables provides a basic calculator without a visual. This tool shows the full step-by-step solution, discriminant analysis, both real and complex roots, vertex coordinates, axis of symmetry, y-intercept, Vieta's formulas check, and a live SVG parabola graph — all updating instantly as you type, with no server roundtrip.
What are real-world applications of quadratic equations?
Quadratic equations model many physical phenomena: projectile motion (h = v₀t − ½gt² is quadratic in time; solving for t when h = 0 gives landing time), economics (profit P = −ax² + bx − c models diminishing returns; the vertex gives profit-maximizing quantity), engineering (beam deflection, LC circuit resonance), and area problems (maximizing enclosed area with fixed perimeter fencing). Any relationship where a quantity increases to a peak and then decreases — or has a minimum — is typically quadratic.
What happens when a = 0?
When a = 0, the equation degenerates from quadratic to linear: bx + c = 0. If b ≠ 0, the single solution is x = −c/b. If b = 0 and c = 0, the equation 0 = 0 is always true (infinite solutions). If b = 0 and c ≠ 0, the equation c = 0 is a contradiction (no solution). This calculator detects the a = 0 case and handles it correctly instead of producing a division-by-zero error.
Can this solve equations not in standard form?
The solver requires standard form ax² + bx + c = 0. If your equation is in a different form — for example 2x² + 3 = 5x — rearrange it first: subtract 5x from both sides to get 2x² − 5x + 3 = 0, then enter a=2, b=−5, c=3. A common mistake is losing negative signs when moving terms across the equals sign. Always write the rearranged equation explicitly before reading off a, b, and c.
Does this work offline and is my data private?
Yes to both. The calculator runs entirely in your browser using JavaScript — no server requests, no data uploads, and no account required. It works offline once the page has loaded. Unlike Wolfram Alpha, which sends your equation to a cloud server and may log queries, everything here stays on your device. Your coefficients, equations, and results are completely private.
Related tools
تمام ٹولز دیکھیںیونٹ کنورٹر
لمبائی، وزن، درجہ حرارت، رقبہ، حجم، رفتار، وقت اور ڈیٹا کے سائز تبدیل کریں۔
Unix Timestamp کنورٹر
Epoch وقت کو تاریخ میں اور واپس تبدیل کریں، موجودہ وقت اور ISO 8601 کے ساتھ۔
نمبر بیس کنورٹر
binary، octal، decimal، hex اور 2 سے 36 تک کسی بھی بیس کے درمیان تبدیل کریں۔
رومن ہندسہ کنورٹر
نمبروں کو Roman numerals میں اور واپس تبدیل کریں، تصدیق کے ساتھ۔
متن سے Binary کنورٹر
متن کو 8-bit binary میں تبدیل کریں اور binary کو واپس متن میں decode کریں۔
Morse کوڈ ترجمہ نگار
متن کو Morse code میں اور واپس ترجمہ کریں، آڈیو پلے بیک کے ساتھ۔