📐
Math

Quadratic Equation Calculator

Solve quadratic equations and find roots using the quadratic formula.

JM
James Mitchell
Content Editor
6 min read
Updated

Inputs

The coefficient of x² (cannot be zero)

The coefficient of x

The constant term

Results

Discriminant (Δ)
Root 1 (x₁)
First solution to the equation
Root 2 (x₂)
Root Type
Vertex x-coordinate
Vertex y-coordinate
Formula
x = (-b ± √(b² - 4ac)) / 2a
Request plugin

The Quadratic Equation Calculator is a powerful tool for solving any quadratic equation of the form ax² + bx + c = 0. Whether you're a student tackling algebra homework, an engineer designing systems, or anyone working with polynomial equations, this calculator instantly computes both roots and provides detailed mathematical insights. Simply enter your coefficients a, b, and c, and the calculator uses the quadratic formula to determine whether you have two distinct real roots, one repeated root, or complex roots. It also calculates the vertex of the parabola and the discriminant, giving you a complete picture of your equation's behavior.

How it works

The quadratic equation calculator uses the quadratic formula, one of mathematics' most fundamental tools. The formula x = (-b ± √(b² - 4ac)) / 2a computes the two potential solutions to any quadratic equation. The discriminant, Δ = b² - 4ac, is crucial because it tells you the nature of the roots: if positive, you get two distinct real roots; if zero, you get one repeated real root; if negative, the roots are complex conjugates. The calculator also determines the vertex coordinates of the parabola using the formulas x = -b/2a and y = c - (b²/4a). These calculations are all performed with high precision to ensure accuracy across a wide range of coefficient values, from very small decimals to very large numbers.

Formula
x = (-b ± √(b² - 4ac)) / 2a
Where a, b, c are coefficients of the quadratic equation ax² + bx + c = 0, and the discriminant (b² - 4ac) determines whether roots are real or complex.
💡

Worked example

Consider the equation x² - 7x + 12 = 0. Here a=1, b=-7, c=12. The discriminant equals (-7)² - 4(1)(12) = 49 - 48 = 1, which is positive, indicating two distinct real roots. Using the quadratic formula: x = (7 ± √1) / 2 = (7 ± 1) / 2, giving us x₁ = 4 and x₂ = 3. The vertex x-coordinate is -(-7)/(2·1) = 3.5, and the vertex y-coordinate is 12 - 49/4 = -0.25. This tells us the parabola opens upward, crosses the x-axis at x=3 and x=4, with its minimum point at (3.5, -0.25).

Understanding the Quadratic Formula

The quadratic formula is derived from completing the square and provides a universal solution method for any quadratic equation. Rather than attempting to factor or use other methods that may not always work, the quadratic formula guarantees a solution (or tells you none exists in the real numbers). The formula handles all possible coefficient values, including negative numbers, decimals, and very large values. Each term in the formula serves a purpose: the -b shifts the solution, the ± creates two solutions, the √(b² - 4ac) provides the adjustment for different root separation, and the 2a in the denominator normalizes the result. Understanding each component helps you interpret why certain equations have different types of roots.

The Discriminant and Root Types

The discriminant (Δ = b² - 4ac) is the mathematical gatekeeper determining root behavior. When the discriminant is positive, the square root produces a real number, giving two distinct real solutions. When exactly zero, the ± becomes irrelevant—both solutions collapse into one repeated root. When negative, the square root of a negative number produces imaginary numbers, resulting in complex conjugate roots (numbers with real and imaginary parts). These complex roots, while not on the traditional number line, are perfectly valid mathematical solutions used extensively in engineering, physics, and advanced mathematics. Understanding discriminant values helps you predict root behavior before calculating.

Finding the Vertex of a Parabola

Every quadratic function represents a parabola, and the vertex is its turning point. The x-coordinate of the vertex is found at x = -b/2a, which represents the axis of symmetry. Once you have the x-coordinate, substitute it back into the original equation to find the y-coordinate. The vertex provides crucial information: if the parabola opens upward (a > 0), the vertex is the minimum point; if it opens downward (a < 0), the vertex is the maximum point. This calculator automatically computes vertex coordinates, helping you visualize the parabola's shape and position without needing graphing tools. The vertex is particularly useful in optimization problems where you need to find minimum or maximum values.

Practical Applications

Quadratic equations appear everywhere in real-world applications. In physics, they describe projectile motion—determining where and when an object lands. In business, they model profit functions and revenue optimization. In engineering, quadratic equations help design parabolic antennas and suspension bridges. In finance, they calculate break-even points. In biology, they describe population growth models. Students encounter them constantly in algebra classes as foundational mathematical concepts. Engineers use them for structural analysis. The ability to quickly and accurately solve quadratic equations is valuable across numerous disciplines, making this calculator a practical tool for anyone working with mathematical models.

Complex Roots and Imaginary Numbers

When the discriminant is negative, you encounter complex roots involving imaginary numbers (numbers involving i = √(-1)). For example, if discriminant equals -4, the roots would be expressed as a ± 2i/2a. While these roots don't correspond to x-intercepts on a standard graph, they're legitimate mathematical solutions with significant applications in electrical engineering (AC circuits), signal processing, and quantum mechanics. Complex numbers follow their own arithmetic rules and are essential in advanced mathematics. This calculator identifies when roots are complex and indicates the root type, helping you understand whether your equation has real solutions or ventures into the complex number system.

Tips for Using This Calculator

Enter your coefficients a, b, and c carefully—remember that a cannot be zero (otherwise it's not a quadratic equation). Pay attention to signs; a negative coefficient should be entered as negative. The calculator shows the discriminant value, which you can verify manually using b² - 4ac. Check the root type indicator: 1 means two real roots, 0 means one real root, -1 means complex roots. If you get complex roots but expected real ones, double-check your coefficients. The vertex information helps you understand the parabola's shape. For verification, substitute your calculated roots back into the original equation—both should equal zero (within rounding error). This self-checking method confirms accuracy.

Frequently asked questions

What if coefficient a equals zero?
If a=0, the equation becomes bx + c = 0, which is linear, not quadratic. This calculator specifically solves quadratic equations, so a must be non-zero. You'll receive an error message prompting you to enter a non-zero value for coefficient a.
Can this calculator handle complex roots?
Yes. When the discriminant is negative, the roots are complex conjugates. The calculator displays them as real numbers (-b/2a) representing the real part, with the root type showing -1. The imaginary components arise from √(negative discriminant) but are handled mathematically, indicating complex roots exist.
How do I know if my equation has real solutions?
Calculate the discriminant b² - 4ac. If it's positive or zero, you have real solutions. If negative, you have complex roots. This calculator computes the discriminant automatically and indicates the root type, making it immediately clear whether real solutions exist.
What does the vertex represent?
The vertex is the turning point of the parabola. If a>0, it's the minimum point; if a<0, it's the maximum. The x-coordinate (-b/2a) is the axis of symmetry, and it's always located midway between the two roots (when they're real).
Can I use decimals for coefficients?
Absolutely. This calculator accepts any real number—integers, decimals, and negative values. Decimals are handled with full precision, making this useful for scientific and engineering applications requiring high accuracy.
How accurate are the results?
The calculator uses standard mathematical algorithms and JavaScript's floating-point arithmetic, providing accuracy to approximately 14-15 significant digits. Results are displayed to 4 decimal places for roots, which is sufficient for most practical applications.
What if I get one root as the answer?
When the discriminant equals zero, you have one repeated root (also called a double root). Both root 1 and root 2 show the same value. This occurs when the parabola just touches the x-axis at one point, which is also the vertex x-coordinate.