Quadratic Equation Solver
Enter the coefficients a, b and c of ax^2 + bx + c = 0 and see the roots, whether they are real or complex, the discriminant, the exact answer with the square root simplified, the vertex and axis of the parabola, and the factored form. Whole-number coefficients give exact fractions and radicals. Everything runs in your browser.
x^2 - 3x + 2 = 0
The solutions of ax^2 + bx + c = 0 are x = (-b +/- sqrt(b^2 - 4ac)) / 2a. The part under the root, b^2 - 4ac, is the discriminant: positive gives two real roots, zero gives one repeated root and negative gives two complex roots that are conjugates of each other. When a, b and c are whole numbers up to 10,000,000, the exact answer is shown with the square root simplified and fractions in lowest terms. The decimal roots use a form that avoids losing accuracy when one root is much smaller than the other. If a is 0 the equation is linear. Everything is worked out in your browser and nothing is uploaded.
Related Tools
[5 suggestions]Fraction Calculator
Add, subtract, multiply and divide fractions, mixed numbers and decimals, simplify to lowest terms and see the steps.
Math & MoneyGCD and LCM Calculator
Find the greatest common divisor and least common multiple of two or more whole numbers, with the Euclidean algorithm steps.
Math & MoneyPrime Factorization Calculator
Break any whole number up to 18 digits into its prime factors, with division steps, all divisors and a prime check.
Math & MoneyStandard Deviation Calculator
Find the standard deviation, variance, mean and more for a list of numbers, as a sample or a population, with the working shown.
Math & MoneyPercentage Calculator
Find a percentage of a number, what percent one number is of another, a percentage increase or decrease, or a number raised or lowered by a percentage.
Math & MoneyAbout the Quadratic Equation Solver
The solutions of ax^2 + bx + c = 0 come from the quadratic formula, x = (-b +/- sqrt(b^2 - 4ac)) / 2a. The part under the root, b^2 - 4ac, is the discriminant. When it is positive there are two different real roots, when it is zero there is one repeated root and when it is negative there are two complex roots that are conjugates of each other, written like -1 + 2i and -1 - 2i. When a, b and c are whole numbers up to 10,000,000, the tool also gives the exact roots: a fraction in lowest terms when the discriminant is a perfect square, or a form such as (3 + sqrt(5)) / 2 with the common factor taken out and the radical simplified, so sqrt(8) becomes 2sqrt(2). The decimal roots use a numerically stable method, so a case such as x^2 - 100000000x + 1 gives the small root accurately instead of losing it to rounding. The vertex is at x = -b / 2a, the lowest point of the parabola when a is positive and the highest when it is negative. The factored form a(x - r1)(x - r2) is shown for real roots. If a is 0 the equation is linear, and the tool says so and solves it. Decimal results are shown to 10 significant digits. The solver was checked on 2,000 random equations by putting each root back into the equation. Nothing is uploaded.
How do you solve a quadratic equation?▾
Put it in the form ax^2 + bx + c = 0, then use the quadratic formula x = (-b +/- sqrt(b^2 - 4ac)) / 2a. For x^2 - 3x + 2 = 0, a is 1, b is -3 and c is 2, the discriminant is 1, and the roots are (3 - 1) / 2 = 1 and (3 + 1) / 2 = 2.
What is the discriminant?▾
It is b^2 - 4ac, the part under the square root. If it is positive, there are two real roots. If it is zero, there is one repeated root. If it is negative, there are no real roots and the solutions are two complex numbers.
What are complex roots?▾
When the discriminant is negative, the square root of a negative number appears, written with i, where i squared is -1. The roots come as a pair like -1 + 2i and -1 - 2i. The parabola does not touch the x-axis in that case.
What happens if a is zero?▾
Then there is no x squared term and the equation is linear, bx + c = 0, with the single solution x = -c / b. If b is also 0, there is either no solution (when c is not 0) or every number is a solution (when c is 0).
What is the vertex of a parabola?▾
It is the turning point, at x = -b / 2a, with y found by putting that x back into the equation. It is the lowest point when a is positive and the highest when a is negative, and the axis of symmetry runs through it.