Quadratic Formula Calculator
Type a, b and c and the roots appear with the discriminant beside them, so you can see at a glance whether the answer is two real roots, one repeated root or a conjugate pair. Whole-number coefficients get exact answers: 2x² - 7x + 3 comes back as 3 and 1/2 rather than 3 and 0.5, and x² - x - 1 as (1 ± √5)/2 with the decimal printed beside it. The working is written out line by line, and every root is substituted back into your own equation so the residual is visible instead of assumed. Two cases most pages hide are spelled out here: a = 0 is not a quadratic, so it is solved as the linear equation it is, and the roots are computed in a numerically stable form that keeps the smaller root correct when b² dwarfs 4ac. Switch to vertex form and the same three numbers become a(x - h)² + k with the vertex, the axis of symmetry and a drawing of the curve. The working also gives the factored form and where the curve crosses each axis, and a Start from vertex form panel runs the other way, multiplying a(x - h)² + k back out to ax² + bx + c. It runs in your browser, with no account and nothing uploaded.
- a
- b
- c
- Give me
- x₁
- 2
- x₂
- -3
- Discriminant
- 25
- Form
- Real, distinct
The roots of ax² + bx + c = 0, the discriminant that decides how many there are, and each root put back into the equation.
The working
- x = (-b ± √(b² - 4ac)) / (2a), with a = 1, b = 1, c = -6
- D = b² - 4ac = (1)² - 4(1)(-6) = 25
- √D = 5, so x = 2, -3
- Both roots come from q = -(b + sign(b)√D)/2, read as q/a and c/q. That is the stable form: written as (-b ± √D)/(2a), the smaller root loses digits whenever b² is far larger than 4ac.
- h = -b/(2a) = -1/2 = -1/2
- k = c - b²/(4a) = -6 - 1/4 = -25/4
- Vertex form: (x + 1/2)² - 25/4, vertex (-1/2, -25/4), axis of symmetry x = -1/2
- Factored form: x² + x - 6 = (x - 2)(x + 3)
- Intercepts: the curve crosses the x axis at (2, 0) and (-3, 0), and the y axis at (0, -6).
- Exact: a, b and c are whole numbers, so the discriminant is exact and the roots are given as fractions or surds beside their decimals.
Each root, put back into the equation
A root is only a root if it makes the left-hand side zero. The residual is the left-hand side worked out at the root this page computed, so one marked as rounding is the last-digit error of double arithmetic and not a second answer.
- x₁ = 2: 1(2)² + 1(2) - 6 = 0
- x₂ = -3: 1(-3)² + 1(-3) - 6 = 0
Start from vertex form
Type a, h and k from y = a(x - h)² + k to multiply it out into standard form y = ax² + bx + c. Solve this one sends the result to the solver for its roots, factors and graph.
- a
- h
- k
- Start from y = 2(x - 3)² - 8, so a = 2, h = 3 and k = -8.
- Square the bracket: (x - h)² = x² - 2hx + h², so a(x - h)² + k = ax² - 2ahx + ah² + k.
- b = -2ah = -2(2)(3) = -12
- c = ah² + k = 2(3)² - 8 = 10
- Standard form: y = 2x² - 12x + 10
Three equations worth trying
One of each kind the discriminant allows. Loading one keeps the mode you are in.
- x = 2, -3
- x = -1 (double)
- x = ±i
Common questions
- What is the quadratic formula?
- It is x = (-b ± √(b² - 4ac)) / (2a), the pair of values that make ax² + bx + c equal zero. It comes from completing the square on ax² + bx + c = 0, the same steps Vertex form writes out with your numbers. This page writes that line out with your numbers in it, then the discriminant, then the roots, so the arithmetic is on the screen rather than behind a button. Under the hood it does not evaluate the formula literally: it uses q = -(b + sign(b)√D)/2 and reads the roots as q/a and c/q, which is the same algebra rearranged so that the smaller root does not lose digits.
- What does the discriminant tell you?
- The discriminant is b² - 4ac, and its sign decides the shape of the answer. For x² + x - 6 it is 25, which is positive, so there are two distinct real roots: x = 2, -3. For x² + 2x + 1 it is 0, so the two roots meet at x = -1 and the page labels it a double root. For x² + 1 it is -4, which is negative, so the roots are the conjugate pair x = ±i. The number itself sits in the readout next to the roots, and when your coefficients are whole numbers a perfect square there means the roots are rational, which is why they print as fractions rather than surds.
- How do I solve x² + x - 6 = 0?
- Enter a = 1, b = 1 and c = -6. The discriminant is 1 + 24 = 25, its square root is 5, and the roots are (-1 + 5)/2 and (-1 - 5)/2, so the answer is x = 2, -3. The page shows those steps and then substitutes both roots back: 1(2)² + 1(2) - 6 = 0 and 1(-3)² + 1(-3) - 6 = 0. That equation is also the first of the three worked examples under the calculator, so one press loads it.
- What happens when a is 0?
- The x² term disappears and the equation is linear, so the page says so and solves bx + c = 0 instead, giving x = -c/b. With a = 0, b = 2 and c = -6 that is x = 3, and the discriminant cell reads that this is not quadratic rather than showing a number that would not mean anything. If b is zero as well, the equation is either 0 = 0, which every number satisfies, or a false statement with no solution, and both are named. Vertex form is the one thing declined at a = 0, because a straight line has no vertex.
- How do I convert to vertex form, and what are h and k?
- Choose Vertex form and the same a, b and c are rewritten as a(x - h)² + k, with h = -b/(2a) and k = c - b²/(4a). For x² - 4x + 7 that is h = 4/2 = 2 and k = 7 - 16/4 = 3, so the equation becomes (x - 2)² + 3 with its vertex at (2, 3) and its axis of symmetry at x = 2. When h or k is not a whole number it is given as a fraction, so x² + x + 1 comes back as (x + 1/2)² + 3/4. The parabola is drawn as well, with the vertex marked and any real roots on the x axis.
- Why is a root shown as (1 ± √5)/2 instead of a decimal?
- Because that is the exact answer and the decimal is a rounding of it. When a, b and c are whole numbers up to 10 million the discriminant is an integer, so the roots can be reduced properly: square factors come out of the radical, the fraction is cancelled, and x² - x - 1 prints as (1 ± √5)/2 with 1.618033989 and -0.6180339887 beside it. Rational roots come out as fractions in lowest terms, like 1/2 rather than 0.5. If any coefficient is a decimal, or larger than 10 million, the page drops to double precision and shows decimals only, and it says which of the two you are looking at.
- Can I type fractions, and does it keep my coefficients?
- Fractions like 3/4, decimals like 2.5, scientific notation like 2.5e-3, whole numbers, a leading plus and a pasted typographic minus are all read, and a thousands separator in a number like 1,000 is understood. Coefficients are accepted up to 1e12; past that the squaring step would lose digits, so the page stops and says so instead. With a fraction or a decimal among them, the discriminant is still worked out exactly from what you typed, so 3x² - 2x + 1/3 = 0 gets its one repeated root, 0.3333333333, and not two roots a rounding apart; the roots themselves are given as decimals. The a, b and c you type are kept in your browser's own storage so the page opens where you left it, and clearing your browser data clears it. Nothing is uploaded, there is no account, and the Copy button puts the equation, the discriminant, the roots and the working on your clipboard.
- How do I solve 4x² + 5x - 12 = 0 with the quadratic formula?
- Enter a = 4, b = 5 and c = -12. The discriminant is 5² - 4(4)(-12) = 25 + 192 = 217, and 217 is 7 × 31, which has no square factor, so the roots stay as a surd: x = (-5 ± √217)/8, which is 1.216364983 and -2.466364983. If the equation is 2x² + 5x - 12 = 0 instead, the discriminant is 25 + 96 = 121, a perfect square, so the roots are rational, x = 3/2 and -4, and the working factors it as (2x - 3)(x + 4).
- Can it factor a quadratic?
- Yes, the working gives the factored form. When a, b and c are whole numbers and the discriminant is a perfect square, it factors over the integers, so 2x² - 7x + 3 = (x - 3)(2x - 1). Otherwise it writes a(x - x₁)(x - x₂) with the roots it found, so x² - x - 1 = (x - (1 + √5)/2)(x - (1 - √5)/2), using ≈ when the roots are rounded decimals. A negative discriminant means no factors with real numbers, and the page says so. For cubics and higher powers, use the polynomial factoring calculator.
- How do I change vertex form back to standard form?
- Use Start from vertex form, under the working. Type a, h and k from y = a(x - h)² + k and the page multiplies it out with b = -2ah and c = ah² + k, so 2(x - 3)² - 8 becomes 2x² - 12x + 10. Solve this one sends those coefficients to the solver, which gives the roots 5 and 1 and the factored form 2(x - 5)(x - 1).
- How do I put the quadratic formula into a handheld calculator?
- Work out the discriminant first: b² - 4ac, with b in brackets so a negative b squares to a positive number. Then type (-b + √(discriminant)) ÷ (2a) for one root and the same with a minus in front of the square root for the other. Both bracket pairs matter: without brackets around the whole top line and around 2a, the calculator divides only the square root, or divides by 2 and then multiplies by a. The same rule holds on any scientific or graphing calculator, and the roots here are a quick check on what you typed. Many models also have an equation or polynomial solver, but where it sits differs by model, so the manual is the place to look.
- Does it work on a phone, tablet or Chromebook?
- Yes. It is a web page, so it runs in any current browser on a phone, tablet, Chromebook, Mac or Windows PC, with nothing to download or install. On a narrow screen the graph moves under the answer instead of beside it.
Every answer shows its discriminant, and each root is substituted back so you can see the residual. Whole-number coefficients up to 10 million give exact results: rational roots as fractions, irrational and complex roots in surd form, each with a decimal beside it; other coefficients are solved in double precision, where the last digits can round. With a at zero this is not a quadratic: it is solved as a linear equation, and vertex form is declined.