Quadratic Formula Calculator
With a (x² coefficient) 1, b (x coefficient) -3, c (constant) 2, quadratic formula comes to 2.0000 — first root. It is reached in 6 steps, the last of which is (--3 + 1) / (2 * 1), and each one is printed on the page with its numbers filled in. The formula is the one published by Wolfram MathWorld, not an approximation fitted to it.
Both roots of ax² + bx + c = 0 from the quadratic formula, with the discriminant that says in advance how many real roots there are.
Formula and sources checked · How we check
a (x² coefficient) 1, b (x coefficient) -3, c (constant) 2
2.0000
First root for the example below. Editing a field recomputes the calculator below; this figure holds the answer the page was loaded with.
It is written into the HTML rather than drawn by a script, so a search engine reading this page without running JavaScript still finds an answer.
- Discriminant, b² − 4ac
-3 ^ 2 - 4 * 1 * 21- Square root of the discriminant
sqrt(max(1, 0))1- First root, (−b + √D) / 2a
(--3 + 1) / (2 * 1)2- Second root, (−b − √D) / 2a
(--3 - 1) / (2 * 1)1- Vertex, x = −b / 2a
--3 / (2 * 1)1.5- Number of real roots
2
Worked example
x² − 3x + 2 has discriminant 9 − 8 = 1, so √D is 1 and the roots are (3 + 1)/2 = 2 and (3 − 1)/2 = 1. A positive discriminant always means two real roots; check it before doing the rest and you know what you are looking for.
How to work it out yourself
- 1.Write the equation as ax² + bx + c = 0 first. A term on the wrong side of the equals sign is the commonest cause of a wrong answer here, not the arithmetic.
- 2.Work out the discriminant, b² − 4ac. Positive means two real roots, zero means one repeated root, negative means none that are real.
- 3.Take the square root of the discriminant and apply it both ways: (−b + √D) / 2a and (−b − √D) / 2a. The two roots sit either side of −b/2a, which is the vertex of the parabola.
The formula
- Discriminant, b² − 4ac
-3 ^ 2 - 4 * 1 * 2 - Square root of the discriminant
sqrt(max(1, 0)) - First root, (−b + √D) / 2a
(--3 + 1) / (2 * 1) - Second root, (−b − √D) / 2a
(--3 - 1) / (2 * 1) - Vertex, x = −b / 2a
--3 / (2 * 1) - Number of real roots
Source: Wolfram MathWorld — quadratic formula, NIST Digital Library of Mathematical Functions
Questions people actually ask
- What does a negative discriminant mean?
- The parabola never crosses the x-axis, so there is no real solution. The roots exist as a complex conjugate pair — −b/2a ± i√(−D)/2a — and this calculator reports zero real roots rather than printing a complex number that most people entering a quadratic did not want.
- Why does a = 0 not work?
- Because the formula divides by 2a. With no x² term the equation is bx + c = 0, a straight line with the single solution −c/b, and the quadratic formula is the wrong tool rather than a failing one.
- Where is the vertex?
- At x = −b/2a, exactly halfway between the two roots. That is why the roots are symmetric about it: the ± in the formula moves the same distance either side, and the distance is √D divided by 2a.
- Can I just factorise instead?
- When the roots are whole numbers, yes, and it is faster. The formula is what you reach for when they are not — and the discriminant tells you which case you are in before you waste time hunting for factors that do not exist.
Related
- Right Triangle CalculatorHypotenuse, area, perimeter and both acute angles of a right triangle from its two legs, with the Pythagorean step shown before the square root.
- Percentage CalculatorWhat X% of a number is, plus the discounted price, the marked-up price and the remainder.
- Exponent CalculatorA number raised to any power, including negative and fractional ones, with the root it is equivalent to and the answer in scientific notation.
- Completing the Square CalculatorTurns ax² + bx + c into a(x − h)² + k, giving the vertex, the axis of symmetry and the roots that fall straight out of the completed form.
- Absolute Value CalculatorThe absolute value of a number, and the two solutions an equation of the form |ax + b| = c always has — which is the part a bare magnitude does not answer.
- Difference of Two SquaresFactors a² − b² into (a + b)(a − b), multiplied back out as a check — and the mental shortcut it gives for products either side of a round number.
Where this one stops
Put this calculator on your site
Free, no attribution required beyond the link.
<iframe src="https://rulecalculators.com/embed/quadratic-formula" width="100%" height="420" style="border:1px solid #e7e4de;border-radius:12px" title="Quadratic Formula Calculator"></iframe>