How to solve a quadratic equation
Put the equation in standard form
This calculator solves ax² + bx + c = 0 from real number coefficients. The boxes sit directly inside the equation: a multiplies x², b multiplies x, and c is the constant. The coefficient a must be nonzero. If an x term or constant is missing, type 0 in its box rather than leaving it empty. An unlabelled x² has coefficient 1; −x² has coefficient −1.
Zero on the right means all terms have been moved to the left. Subtracting the same terms from both sides keeps the solutions unchanged. For example: x² + 2x = 3 → x² + 2x − 3 = 0. Enter a = 1, b = 2, c = −3.
Enter the signed numbers and calculate
Type just the numbers, including negative signs, in the three boxes. The plus signs between boxes join the signed terms, so adding a negative b is the same as subtracting its magnitude. Use a decimal point in every language; for example, 0.5 or 2.5e-6. Select Calculate or press Enter to show the equation and its real solutions. Changing any coefficient immediately clears the previous answer. Clear empties the inputs, errors, and result so you can start again.
Discriminant, roots, and vertex form
For ax² + bx + c = 0, the discriminant is Δ = b² − 4ac. A positive discriminant gives two distinct real roots, zero gives one repeated root, and a negative discriminant gives no real roots. The real-root formula is x = (−b ± √Δ)/(2a). This page deliberately stops at “no real roots” when Δ is negative; complex-number output is outside its scope.
The vertex form is y = a(x − h)² + k, where h = −b/(2a) and k = −Δ/(4a). It describes the same quadratic function as y = ax² + bx + c. The vertex is (h, k), and the line x = h is the axis of symmetry. The calculator uses a numerically stable equivalent of the quadratic formula internally so a very small valid root is less likely to disappear through subtraction of nearly equal numbers.
Worked examples
Quadratic: x² − 5x + 6 = 0
Enter a = 1, b = −5, c = 6. Δ = 25 − 24 = 1, so the roots are 2 and 3. The vertex form is y = (x − 2.5)² − 0.25.
A repeated root: x² − 6x + 9 = 0
Enter a = 1, b = −6, c = 9. The discriminant is 36 − 36 = 0, so the only root is x = 3, repeated twice. Vertex form is y = (x − 3)² + 0. Substitution gives 9 − 18 + 9 = 0.
No real roots: x² + 1 = 0
Enter a = 1, b = 0, c = 1. Δ = −4, so the equation has no real roots. Complex roots are intentionally not calculated.
Using the result and understanding limits
Reading precision and handling errors
Ordinary results are shown with at most two decimal places and trailing zeros removed. Very small nonzero values and very large values use scientific notation so they are not displayed as zero or as an unreadable string. Calculations retain the browser’s full numeric precision until display formatting. A shown decimal is still an approximation unless it happens to terminate exactly.
Enter numbers without units, thousands separators, fractions, or formula text. Nonzero coefficient magnitudes must be from 1e-150 to 1e150. A blank box is not treated as zero. If the result exceeds the supported numeric range, reduce the coefficient contrast or rewrite the equation using a suitable common scale. Extremely close roots can be sensitive to floating-point rounding; this is a numerical calculator, not an exact symbolic solver.
Practical checks before using an answer
Substitute each reported root back into the original equation when the answer affects graded work or another calculation. Small residual differences can occur because decimal coefficients and irrational roots are represented approximately. Keep the unrounded coefficients for later calculations rather than copying a rounded intermediate value.
This tool is suited to homework checks, classroom examples, quick algebra review, and verifying coefficients after rearranging a formula. It is not a proof assistant or a replacement for showing the method required by a course. Copy the visible equation, result, and steps manually into your notes if needed; no download, account, cloud storage, or automatic submission is provided.
Frequently asked questions
Why must the right side be zero?
Zero on the right means all terms have been moved to the left. Subtracting the same terms from both sides keeps the solutions unchanged.
What happens when a is zero?
a must be nonzero. If a = 0, the equation is linear; solve the remaining bx + c = 0 separately.
Why do I see scientific notation?
A nonzero result smaller than 0.01 or a very large result is shown compactly so rounding does not turn it into zero or an unwieldy digit string.
Does a negative discriminant mean the equation is invalid?
No. It means there are no real roots. The equation can have complex roots, but this basic calculator does not display them.
Can I paste a full equation?
No. Rearrange it to the displayed standard form and enter only the real coefficients. This avoids ambiguous parsing and keeps each sign visible.