Solve ax² + bx + c = 0 and see the discriminant.
Use this tool for solving real roots of a quadratic equation. Move all terms to one side and collect powers of x. Enter the coefficients with their signs. The squared-term coefficient must be nonzero.
How to use the quadratic formula calculator
Move all terms to one side and collect powers of x. Enter the coefficients with their signs. The squared-term coefficient must be nonzero.
The form starts with a demonstration you can run immediately. Its starting inputs are Coefficient a = 1; Coefficient b = -5; Coefficient c = 6. Replace these values with your own and select Calculate. Results appear underneath the buttons. Select Reset to restore the example. If you receive a validation message, check the field formats and try again.
What the calculation measures
Use b squared minus four times a times c to determine how many real roots there are. Positive means two, zero means one distinct root and negative means none in the real numbers.
A missing linear or constant term has coefficient zero. A missing squared term makes it a linear equation and belongs in a different calculation.
After finding roots, substitute them back into the original expression. Small residuals can result from rounded display values.
Worked example and comparison cases
The example inputs below give you a baseline you can reproduce. You can enter a comparison case next to check how the result moves when one input or assumption changes.
Starting example
Enter Coefficient a 1; Coefficient b -5; Coefficient c 6. The results are Discriminant 1; Root 1 3; Root 2 2. This is the starting scenario shown in the form.
The default factors as the product of x minus two and x minus three. Both values make one factor zero. The discriminant confirms that the roots are distinct.
Comparison 1
Enter Coefficient a 1; Coefficient b -4; Coefficient c 4. The results are Discriminant 0; Repeated root 2. Compared with the starting example, this case changes Coefficient b, Coefficient c.
A perfect square gives the same root twice algebraically. Record it as one distinct solution when describing where the polynomial touches the horizontal axis.
Comparison 2
Enter Coefficient a 1; Coefficient b 0; Coefficient c 1. The results are Discriminant -4; Real roots None (complex roots). Compared with the starting example, this case changes Coefficient b, Coefficient c.
The negative discriminant means there are no real roots. This does not rule out complex solutions and the calculator makes that distinction in the output.
Comparison 3
Enter Coefficient a 2; Coefficient b 0; Coefficient c -8. The results are Discriminant 64; Root 1 -2; Root 2 2. Compared with the starting example, this case changes Coefficient a, Coefficient b, Coefficient c.
With no linear term and opposite-sign squared and constant terms, the two roots are opposite in sign. Substitute each one to see that its square contributes the same value.
Comparison 4
Enter Coefficient a 1; Coefficient b -5; Coefficient c 0. The results are Discriminant 25; Root 1 5; Root 2 0. Compared with the starting example, this case changes Coefficient c.
A zero constant term means the expression has x as a factor. Zero is therefore a root alongside the value that makes the remaining linear factor equal zero.
Check the inputs against your source
Write down where the inputs came from before relying on the result. If you copied numbers from two records, make sure the records describe the same person, transaction, period or dataset. Work from the original values if possible. A rounded amount shown in a report may be adequate for a quick check, but reusing several rounded values can move the final answer enough to matter.
For this calculation, start by checking coefficient a, coefficient b, coefficient c. A missing linear or constant term has coefficient zero. A missing squared term makes it a linear equation and belongs in a different calculation. If a source uses a different definition, record the two calculations separately so that you can explain any discrepancy. Before sharing the result, include the inputs alongside it so the next reader can reproduce it without guessing what you entered.
Compare scenarios without losing the baseline
Save the starting inputs and outputs before editing a value. Change one assumption, then read the result against your baseline. When several inputs need to change together, write down the reason for those changes and treat them as a separate scenario. This is especially useful when two people are comparing results from different documents or when the source data might be revised later.
After finding roots, substitute them back into the original expression. Small residuals can result from rounded display values. It helps to choose a realistic alternative, such as an actual quoted figure, a measurement in the correct unit, or another value supported by your dataset. Compare the magnitude of the difference as well as its direction. Small differences can be down to rounding. Larger differences are a reason to review whether the two scenarios started from comparable inputs.
Common questions
What should I do if I get a different answer elsewhere?
Replicate the inputs shown in the worked example first. If the result agrees there, check your own entry against the source values and compare the two methods. Pay particular attention to units, inclusions and any rounding convention. Use b squared minus four times a times c to determine how many real roots there are. Positive means two, zero means one distinct root and negative means none in the real numbers.
How much precision should I keep?
Keep source values unrounded when you can. Choose the precision you report based on the question you are answering. For example, a figure you are using in a later calculation may need more digits than a figure you are giving in a quick summary. If a policy or quote supplies a rounding rule, compare your result using that rule.
Can I reuse the result when an input changes?
Recalculate when the measurement, quote or assumption changes. Record the prior result if it was part of a decision or report. A dated record makes it possible to compare the two runs accurately and see which difference came from a new input rather than an earlier entry mistake.