Calcufast

Equation Calculator

Solve linear and quadratic equations. Find real or complex roots and check the discriminant.

Inputs
Enter values to calculate

ax² + bx + c = 0

Use a = 0 for a linear equation. Coefficients must be between −10¹² and 10¹².

Advertisement
Results

Enter the coefficients, then solve the equation.

How to solve a quadratic equation

Move every term to one side to write ax² + bx + c = 0. Enter signed coefficients and use zero for a missing term. For example, x² = 9 becomes a = 1, b = 0 and c = −9.

The discriminant is Δ = b² − 4ac. A positive discriminant gives two real roots; zero gives one repeated real root; a negative discriminant gives two complex conjugate roots. Use x = (−b ± √Δ) / (2a) when a is nonzero.

Step-by-step example

The initial values represent x² − 5x + 6 = 0:

  1. Calculate Δ = (−5)² − 4 × 1 × 6 = 1.
  2. Substitute into the formula: x = (5 ± 1) / 2.
  3. The solutions are x₁ = 2 and x₂ = 3.
  4. Check: 2² − 5 × 2 + 6 = 0 and 3² − 5 × 3 + 6 = 0.

Special cases

When a = 0, solve bx + c = 0. For example, 2x − 8 = 0 gives x = 4. If both a and b are zero, c = 0 means every number satisfies the equation; nonzero c means no solution.

For x² + 1 = 0, the solutions are x = ±i. Results use up to ten significant digits. They are floating-point approximations rather than exact radical expressions. Coefficients with extremely different scales may lose precision.

Sources and related tools

OpenStax on quadratic equations explains the discriminant and real and complex cases. To work with arrays of numbers, use the matrix calculator.

Frequently asked questions

Equations of the form ax² + bx + c = 0, including linear equations when a is zero. This tool does not solve systems or trigonometric equations.

The equation has two complex conjugate roots. The imaginary unit i satisfies i² = −1.