Quadratic Formula Calculator
This quadratic formula calculator solves any equation of the form ax² + bx + c = 0: enter a, b and c to get the roots, exact form and every step of the working.
Example: a (coefficient of x²) 2 · b (coefficient of x) -8 · c (constant term) 6 → Roots: x₁ = 1; x₂ = 3. Source: Wolfram MathWorld – Quadratic formula and discriminant. Updated: .
How it is calculated
A quadratic equation ax² + bx + c = 0 is solved with the quadratic formula x = (−b ± √(b² − 4ac)) ÷ (2a). The discriminant D = b² − 4ac tells you how many real roots there are: D > 0 gives two, D = 0 one repeated root, D < 0 none (only complex roots). Example: 2x² − 8x + 6 = 0 has D = 16 and roots x = 1 and x = 3.
Getting the equation into standard form
- Move everything to one side: 3x² = 5x − 2 becomes 3x² − 5x + 2 = 0, so a = 3, b = −5, c = 2.
- A missing term has coefficient 0: x² − 9 = 0 means b = 0; x² + 4x = 0 means c = 0.
- Signs belong to the coefficient: −x² means a = −1.
Exact answers, vertex and factoring
With whole-number coefficients the calculator also gives the exact roots – as fractions (6x² − x − 2 = 0 → −1/2 and 2/3) or as a simplified radical (x² − 3x + 1 = 0 → (3 ± √5) ÷ 2). You also get the vertex (−b/(2a), c − b²/(4a)), the factored form a(x − x₁)(x − x₂) and a check with Vieta’s formulas. If D is negative, the complex roots are shown as well, e.g. 1 ± 2i.
Why the answers stay accurate
Plugging numbers straight into the textbook formula can lose precision when b² is much larger than 4ac. The calculator therefore uses the numerically stable form from Numerical Recipes: q = −(b + sign(b)·√D)/2, x₁ = q/a, x₂ = c/q. The step-by-step working still shows the familiar formula.
Plot the parabola and its x-intercepts with the graphing calculator, check square roots with the exponent calculator and fractions with the fraction calculator.
Frequently asked questions
What is the quadratic formula?
x = (−b ± √(b² − 4ac)) ÷ (2a) for the equation ax² + bx + c = 0. The ± gives the two roots.
What does the discriminant tell you?
D = b² − 4ac. If D > 0 there are two real roots, if D = 0 one repeated root, and if D < 0 no real roots – the parabola does not cross the x-axis.
How do you solve a quadratic with imaginary numbers?
When D < 0, write √D = i·√(−D). For x² − 2x + 5 = 0: D = −16, so x = (2 ± 4i) ÷ 2 = 1 ± 2i.
How do I solve x² − 9 = 0 without the formula?
Isolate x² and take the square root: x² = 9, so x = 3 or x = −3. For x² + 4x = 0, factor out x: x(x + 4) = 0, so x = 0 or x = −4.
How do I write a quadratic in factored form?
Find the roots x₁ and x₂, then write a(x − x₁)(x − x₂). For 2x² − 8x + 6 the roots are 1 and 3, so it factors as 2(x − 1)(x − 3).
Sources and legal basis
- Wolfram MathWorld – Quadratic formula and discriminant
- Wolfram MathWorld – Vieta’s formulas
- Common Core State Standards – HSA-REI.B.4: solve quadratic equations (quadratic formula, complex solutions)
As of:
Related tools
- Online graphing calculatorGraph up to three functions online, zoom and pan, find roots and maxima/minima numerically, save the graph as PNG or SVG. Free, runs in your browser.
- Exponent calculator with stepsCalculate powers, nth roots and logarithms with any base – step-by-step, with negative and fractional exponents, ln, log and scientific notation.
- Fraction CalculatorAdd, subtract, multiply and divide fractions and mixed numbers with step-by-step solutions. Simplify fractions and convert decimals to fractions.
- Scientific CalculatorFree online scientific calculator: sin, cos, tan in degrees or radians, log, ln, roots, powers, factorial and nCr – with step-by-step working and history.
- Pythagorean Theorem CalculatorPythagorean theorem calculator: enter two sides to get the third side, both angles, area and height – with exact square roots, working and a right-angle check.
- Age CalculatorCalculate your exact age from your date of birth in years, months and days, in total days, weeks and months – plus the countdown to your next birthday.