Quadratic Equation Solver
Solve any quadratic equation, with the discriminant, the roots and the vertex shown and explained.
Last reviewed by the Radiatus Cloud team
Loading tool...
Need this done properly for your business?
Radiatus delivers secure cloud, DevOps & compliance engineering.
The discriminant tells you what to expect
Before solving, b² − 4ac decides the shape of the answer. Positive gives two distinct real roots, so the parabola crosses the x-axis twice. Zero gives one repeated root, where the parabola touches the axis at its vertex. Negative gives two complex conjugate roots and no real crossing at all. Checking it first tells you whether a real-world problem expecting two answers is going to produce none.
The formula, and when not to use it
The quadratic formula always works, but factoring is faster when the roots are simple integers, and completing the square is what reveals the vertex directly. For x² − 5x + 6, spotting that 2 and 3 multiply to 6 and add to 5 is quicker than any substitution. The formula is the reliable fallback, not the only route.
The vertex and why it is usually the point
The vertex sits at x = −b / 2a, and substituting back gives the y-coordinate. When a is positive the parabola opens upward and the vertex is the minimum; when negative it opens downward and the vertex is the maximum. In applied problems this is generally what is being asked — maximum height, minimum cost, optimal price — and it exists whether or not the equation has real roots.
Catastrophic cancellation in floating point
When b² is much larger than 4ac, one of the two roots is computed by subtracting two nearly equal numbers, and floating-point precision collapses. Numerical libraries avoid this by computing the well-conditioned root with the standard formula and deriving the other from the fact that the roots multiply to c/a. Naive implementations return a visibly wrong second root for equations like x² + 10⁸x + 1, which is a real and frequently encountered failure rather than a theoretical concern.
Complex roots are still answers
A negative discriminant gives roots of the form p ± qi. They are meaningless for a problem about physical distance and essential in electrical engineering, control theory and signal processing, where they describe oscillation. Discarding them as errors is only correct if the model genuinely required real values.
Check by expanding
Roots r and s satisfy r + s = −b/a and r × s = c/a. That takes seconds and catches sign errors, which are the most common mistake in solving by hand. It is a better check than re-running the formula, because it tests the answer rather than repeating the method.
Related tools
- Percentage Calculator — Calculate percentages, percentage change, increase and decrease, and reverse percentages, with the working shown for each result.
- Statistical Calculator — Calculate mean, median, mode, standard deviation, and more.
- Probability Calculator — Calculate probabilities for single and combined events, including conditional probability and Bayes' theorem.
- Scientific Calculator — Perform advanced mathematical operations including trig, log, and exponents.
Frequently Asked Questions
What does the discriminant tell me?
Whether the roots are two distinct real numbers, one repeated root, or a complex conjugate pair. Positive, zero and negative respectively — worth checking before solving.
When should I factor instead of using the formula?
Whenever the roots are simple integers. For x² − 5x + 6, spotting that 2 and 3 multiply to 6 and add to 5 is faster than any substitution.
How do I find the vertex?
At x = −b / 2a, then substitute back for y. It is the minimum when a is positive and the maximum when negative, and it exists whether or not there are real roots.
Why does my solver give a wrong second root?
Catastrophic cancellation. When b² greatly exceeds 4ac, one root involves subtracting two nearly equal numbers and floating-point precision collapses. Derive it from the product of roots instead.
How do I check my answer quickly?
The roots must sum to −b/a and multiply to c/a. That takes seconds and catches sign errors, and it tests the answer rather than repeating the method.
Privacy & Security
Runs in your browser. Nothing you enter is uploaded or stored.
About This Tool
This tool runs entirely in your browser. No data is sent to any server, ensuring complete privacy. Simply use the interface above to get started — no registration or login required.
Disclaimer: This tool is provided "as is" without warranty of any kind. Results are for educational and utility purposes.
Related Tools
Percentage Calculator
MathCalculate percentages, percentage change, increase and decrease, and reverse percentages, with the working shown for each result.
Statistical Calculator
MathCalculate mean, median, mode, standard deviation, and more.
Probability Calculator
MathCalculate probabilities for single and combined events, including conditional probability and Bayes' theorem.