Quadratic Formula Calculator — Free Online Equation Solver
Solve any quadratic equation ax² + bx + c = 0 instantly with discriminant analysis, vertex form, complex root support, and parabola direction indicators.
Equation
x² - 5x + 6 = 0Quadratic Formula
x = (-b ± √(b² - 4ac)) / 2aSolutions
x₁ = 3.0000000000
x₂ = 2.0000000000
Discriminant (b² - 4ac)
1.0000(Positive — two real roots)
Vertex (h, k)
(2.5000, -0.2500)
Axis of Symmetry
x = 2.5000
Vertex Form
y = (x - 2.5000)² + -0.2500
Parabola Direction
Opens upward (minimum)
How to Use the Quadratic Formula Calculator
- Enter coefficient a (x² term): This is the number in front of x². It determines whether the parabola opens upward (positive) or downward (negative) and how wide or narrow it is. The default value is 1. This coefficient must not be zero — if a = 0, the equation becomes linear, not quadratic.
- Enter coefficient b (x term): This is the number in front of x. It affects the horizontal position of the vertex and the axis of symmetry. The default value is -5. It can be positive, negative, or zero.
- Enter coefficient c (constant): This is the constant term that has no x attached. It is the y-intercept of the parabola (the value of y when x = 0). The default is 6. It can be any real number.
- Review the solutions: The right panel instantly shows the number and nature of roots (two real, one repeated, or two complex), the actual root values, the discriminant, the vertex coordinates, the vertex form of the equation, the axis of symmetry, and whether the parabola opens up or down. All results update in real time as you adjust coefficients.
The default equation x² - 5x + 6 = 0 factors to (x - 2)(x - 3) = 0, giving roots x = 2 and x = 3. Experiment with different coefficients to see how the discriminant, vertex, and root nature change. Try b² - 4ac = 0 for a single repeated root, or make the discriminant negative to see complex conjugate roots.
The Quadratic Formula
Standard Quadratic Formula
x = (-b ± sqrt(b² - 4ac)) / (2a) Discriminant
D = b² - 4ac Vertex Coordinates
h = -b/(2a), k = c - b²/(4a) Vertex Form
y = a(x - h)² + k Variables Explained
- a (Leading Coefficient): Controls the width and direction of the parabola. Larger |a| means a narrower parabola. The sign of a determines whether the parabola opens upward (a > 0, minimum vertex) or downward (a < 0, maximum vertex).
- b (Linear Coefficient): Together with a, determines the axis of symmetry at x = -b/(2a). Changing b shifts the vertex horizontally and affects which direction the parabola is shifted from the y-axis.
- c (Constant Term): The y-intercept of the parabola. When x = 0, y = c. Increasing c shifts the parabola upward; decreasing c shifts it downward.
- D (Discriminant): The value b² - 4ac determines root nature. D > 0 means two distinct real roots, D = 0 means one repeated root, D < 0 means complex conjugate roots.
Step-by-Step Example
Solve 2x² + 3x - 5 = 0:
- Identify coefficients: a = 2, b = 3, c = -5
- Calculate the discriminant: D = 3² - 4(2)(-5) = 9 + 40 = 49
- Since D > 0, there are two distinct real roots
- x = (-3 ± sqrt(49)) / (2 x 2) = (-3 ± 7) / 4
- x₁ = (-3 + 7) / 4 = 4/4 = 1
- x₂ = (-3 - 7) / 4 = -10/4 = -2.5
Verify: 2(1)² + 3(1) - 5 = 2 + 3 - 5 = 0. Also: 2(-2.5)² + 3(-2.5) - 5 = 12.5 - 7.5 - 5 = 0. Both roots check out.
Practical Examples
Example 1: James Models Projectile Motion
James launches a ball upward from a 6-foot height with an initial velocity of 40 ft/s. The height equation is h(t) = -16t² + 40t + 6. He wants to find when the ball hits the ground (h = 0), so he solves -16t² + 40t + 6 = 0:
- a = -16, b = 40, c = 6
- D = 40² - 4(-16)(6) = 1600 + 384 = 1984
- t = (-40 ± sqrt(1984)) / (2 x -16) = (-40 ± 44.54) / -32
- t₁ = (-40 + 44.54) / -32 = -0.14 s (not physical — before launch)
- t₂ = (-40 - 44.54) / -32 = 2.64 s
The ball hits the ground after approximately 2.64 seconds. The negative root is discarded because negative time has no physical meaning in this context. The vertex occurs at t = -40/(2 x -16) = 1.25 seconds, when the ball reaches its maximum height of h(1.25) = 31 feet.
Example 2: Nina Optimizes Product Pricing
Nina's company sells widgets. Through market research, the demand function is q = 100 - 2p (quantity sold at price p). Revenue is R = p x q = p(100 - 2p) = -2p² + 100p. She wants to find the price that maximizes revenue:
- Revenue equation: R = -2p² + 100p (a = -2, b = 100)
- Vertex (maximum, since a < 0): p = -b/(2a) = -100/(2 x -2) = 25
- Maximum revenue: R(25) = -2(625) + 100(25) = -1250 + 2500 = $1,250
Nina should price each widget at $25 to maximize revenue at $1,250 per period. At this price, she sells 100 - 2(25) = 50 units. This is a classic application of quadratic optimization in business.
Example 3: Carlos Designs a Garden
Carlos has 60 meters of fencing to enclose a rectangular garden along a wall (needing only 3 sides). If one side has length x, the other two sides are each (60 - x)/2. The area is A = x(60 - x)/2 = -x²/2 + 30x. He wants to maximize the area:
- Area equation: A = -0.5x² + 30x (a = -0.5, b = 30)
- Maximum at x = -30/(2 x -0.5) = 30 meters
- Other sides: (60 - 30)/2 = 15 meters each
- Maximum area: -0.5(900) + 30(30) = -450 + 900 = 450 m²
Carlos should make the garden 30 meters along the wall and 15 meters deep, yielding a maximum area of 450 square meters. The vertex of the parabola gives the optimal dimensions.
Discriminant Analysis Reference Table
| Equation | a, b, c | Discriminant | Root Type | Solutions |
|---|---|---|---|---|
| x² - 5x + 6 = 0 | 1, -5, 6 | 1 | Two real | 2, 3 |
| x² - 6x + 9 = 0 | 1, -6, 9 | 0 | One repeated | 3 |
| x² + x + 1 = 0 | 1, 1, 1 | -3 | Complex | -0.5 ± 0.866i |
| 2x² + 3x - 5 = 0 | 2, 3, -5 | 49 | Two real | 1, -2.5 |
| x² - 2x + 1 = 0 | 1, -2, 1 | 0 | One repeated | 1 |
| -x² + 4x - 5 = 0 | -1, 4, -5 | -4 | Complex | 2 ± i |
| 3x² - 12 = 0 | 3, 0, -12 | 144 | Two real | 2, -2 |
Tips and Complete Guide
When to Use Each Solving Method
For quadratic equations with small integer coefficients that factor cleanly (like x² - 5x + 6 = 0), factoring is the fastest method. For equations where you need the vertex (optimization problems), completing the square or using the vertex formula h = -b/(2a) is most direct. For all other cases, especially when the discriminant is not a perfect square or when coefficients are decimals, the quadratic formula is the most reliable approach. Our calculator uses the formula internally and displays all relevant information regardless of the equation type.
Understanding the Parabola Graph
Every quadratic equation represents a parabola when graphed. The vertex is the turning point, and the axis of symmetry divides the parabola into two mirror-image halves. The y-intercept is at (0, c), and the x-intercepts (if real roots exist) are the solutions to the equation. If the discriminant is positive, the parabola crosses the x-axis at two points. If zero, it touches at one point. If negative, the parabola never crosses the x-axis. The coefficient a determines the width: smaller |a| means a wider parabola, larger |a| means narrower.
Completing the Square Derivation
The quadratic formula is derived from completing the square on ax² + bx + c = 0. Divide by a: x² + (b/a)x + c/a = 0. Move the constant: x² + (b/a)x = -c/a. Add (b/(2a))² to both sides: (x + b/(2a))² = b²/(4a²) - c/a = (b² - 4ac)/(4a²). Take the square root: x + b/(2a) = ±sqrt(b² - 4ac)/(2a). Solve for x: x = (-b ± sqrt(b² - 4ac))/(2a). Understanding this derivation helps you remember the formula and know when to apply it.
Vieta's Formulas: Quick Root Checking
Vieta's formulas provide a quick way to verify your roots without substituting back into the original equation. For ax² + bx + c = 0 with roots r and s: the sum of roots r + s = -b/a, and the product of roots r x s = c/a. For example, in x² - 5x + 6 = 0 with roots 2 and 3: sum = 2 + 3 = 5 = -(-5)/1, and product = 2 x 3 = 6 = 6/1. Both check out. These formulas are especially useful for quickly verifying answers on exams.
Common Mistakes to Avoid
- Forgetting to set the equation to zero: The quadratic formula requires the form ax² + bx + c = 0. If your equation is 3x² = 12x - 5, you must rearrange to 3x² - 12x + 5 = 0 before identifying a = 3, b = -12, c = 5.
- Dropping the negative sign in -b: The formula starts with -b, not b. If b is already negative (say b = -5), then -b = 5 (positive). If b is positive (b = 3), then -b = -3. Sign errors here are the most common mistake.
- Dividing by 2a instead of the entire denominator: The formula divides the entire numerator (-b ± sqrt(D)) by 2a, not just the square root. Both terms in the numerator are divided by 2a. Writing it as x = -b ± sqrt(D)/(2a) is incorrect — use parentheses: x = (-b ± sqrt(D)) / (2a).
- Forgetting that a cannot be zero: If a = 0, the equation bx + c = 0 is linear, not quadratic. The quadratic formula does not apply (division by zero in the denominator). Use simple algebra instead: x = -c/b.
- Not checking for extraneous solutions: When quadratic equations arise from solving other equations (like rational or radical equations), always substitute roots back into the original equation. Some solutions may be extraneous — they satisfy the quadratic but not the original equation.
Frequently Asked Questions
The quadratic formula solves any equation of the form ax^2 + bx + c = 0, where a is not zero. The formula is x = (-b plus or minus the square root of (b^2 - 4ac)) / (2a). It gives all solutions to a quadratic equation in one expression. The plus-or-minus symbol means there are potentially two solutions: one using addition, the other using subtraction. This formula is one of the most important in all of algebra and has been known since ancient Babylonian times, though the modern symbolic form was developed in the 17th century.
The discriminant is the expression under the square root in the quadratic formula: D = b^2 - 4ac. It determines the nature and number of solutions. If D is greater than 0, there are two distinct real roots. If D equals 0, there is exactly one repeated real root (the parabola touches the x-axis at one point). If D is less than 0, there are no real roots — the solutions are complex conjugate pairs involving the imaginary unit i. Our calculator displays the discriminant value and categorizes the roots automatically.
Vertex form is y = a(x - h)^2 + k, where (h, k) is the vertex of the parabola. To convert from standard form ax^2 + bx + c: find h = -b/(2a) and k = c - b^2/(4a), or equivalently k = f(h). The vertex is the minimum point if a is positive (parabola opens up) or the maximum point if a is negative (parabola opens down). Our calculator automatically computes and displays the vertex form, vertex coordinates, and axis of symmetry.
The sign of the leading coefficient a determines the direction. If a is positive (a > 0), the parabola opens upward like a U shape, and the vertex is the minimum point. If a is negative (a < 0), the parabola opens downward like an inverted U, and the vertex is the maximum point. The larger the absolute value of a, the narrower the parabola. If a equals 0, the equation is linear, not quadratic. Our calculator displays the parabola direction based on your input coefficients.
Complex roots occur when the discriminant (b^2 - 4ac) is negative. Since you cannot take the square root of a negative number in real numbers, the solutions involve the imaginary unit i, where i = the square root of -1. Complex roots always come in conjugate pairs: if a + bi is a root, then a - bi is the other root. For example, x^2 + 1 = 0 has roots x = i and x = -i. Our calculator shows complex roots in the standard a + bi form when they occur.
You must first rearrange your equation into the standard form ax^2 + bx + c = 0 before applying the formula. For example, 3x^2 = 12x - 5 becomes 3x^2 - 12x + 5 = 0, giving a = 3, b = -12, c = 5. Similarly, 2x(x + 3) = 7 expands to 2x^2 + 6x - 7 = 0, giving a = 2, b = 6, c = -7. Be careful with signs when rearranging — every term must move to one side of the equation.
Besides the quadratic formula, quadratic equations can be solved by factoring (when the equation factors into nice integer terms), completing the square (the algebraic technique from which the quadratic formula is derived), and graphing (finding where the parabola crosses the x-axis). Factoring is fastest when applicable but only works for special cases. Completing the square always works but involves more steps. The quadratic formula is the most universal method — it works for any quadratic equation regardless of whether it factors neatly.
The axis of symmetry of a parabola passes through the vertex at x = -b/(2a). This x-value is exactly the average of the two roots (when real roots exist). If the roots are x_1 and x_2, then the axis of symmetry is at x = (x_1 + x_2)/2 = -b/(2a). This means the roots are equidistant from the axis of symmetry — symmetric about it, hence the name. Even when the roots are complex, the real part of both complex conjugate roots equals -b/(2a).
Quadratic equations model many real-world phenomena. Projectile motion follows a parabolic path — the height equation h = -16t^2 + v_0*t + h_0 is quadratic in time. Optimization problems in business (maximizing profit, minimizing cost) often lead to quadratic equations. The area of enclosed regions, braking distance formulas, and the paths of thrown objects are all quadratic. In physics, kinematic equations and potential energy curves involve quadratic relationships. Engineers use them to design bridges, antennas, and satellite dishes.
Related Calculators
Exponent Calculator
Calculate any base raised to any power with explanations.
Root Calculator
Calculate square roots, cube roots, and nth roots of any number.
Log Calculator
Compute logarithms in any base for exponential equation solving.
Scientific Calculator
Perform advanced calculations with algebraic functions.
Percentage Calculator
Calculate percentages for analyzing quadratic model outputs.
Grade Calculator
Calculate weighted averages and GPA using algebraic methods.
Disclaimer: This calculator is for informational and educational purposes only. Results are estimates and may not reflect exact values.
Last updated: February 23, 2026
Sources
- Khan Academy — The Quadratic Formula: khanacademy.org
- Wolfram MathWorld — Quadratic Equation: mathworld.wolfram.com
- NIST Digital Library of Mathematical Functions: dlmf.nist.gov