Skip to content
TheCalcUniverse

Equation Solver

Solve linear (ax + b = 0) and quadratic (ax² + bx + c = 0) equations instantly. Shows discriminant, roots, and step-by-step solutions.

The leading coefficient (of x, x², x³ or x⁴). If it is 0 the equation drops to a lower degree.

The next coefficient: the constant for linear, the x coefficient for quadratic, the x² coefficient for cubic.

Results

Equation

2x − 8 = 0

Solution (x)
4
Nature
One real root (linear)

The formula

Linear: x = −b/a | Quadratic: x = (−b ± √(b² − 4ac)) / 2a | Cubic and quartic: all real and complex roots (multiple roots detected exactly)

a
Leading Coefficient
b
Linear Coefficient
c
Constant Term
Discriminant (Δ)
b² − 4ac

Worked example — Coefficient a 2, Coefficient b -8, Coefficient c 6, Coefficient d -1

Equation = 2x − 8 = 0

Full explanation ↓

How Equation Solver Works

Linear: x = −b/a | Quadratic: x = (−b ± √(b² − 4ac)) / 2a | Cubic and quartic: all real and complex roots (multiple roots detected exactly)

For linear equations in the form ax + b = 0, the solution is simply x = −b/a, representing the point where the line crosses the x-axis. For quadratic equations in the form ax² + bx + c = 0, the quadratic formula provides the universal solution. The discriminant (Δ = b² − 4ac) classifies the roots before computation: Δ > 0 yields two distinct real roots, Δ = 0 yields one repeated real root, and Δ < 0 yields two complex conjugate roots involving the imaginary unit i.

a
Leading Coefficient — The coefficient of x (linear) or x² (quadratic). For linear equations, a is the slope. For quadratics, a determines the parabola's opening direction and width. Must be non-zero in both cases.
b
Linear Coefficient — The coefficient of the x term. In linear equations, b is the constant term shifted to the right side. In quadratics, b influences the vertex position and root symmetry around the axis of symmetry.
c
Constant Term — The constant term in quadratic equations (not used in linear form ax + b = 0). Determines the parabola's y-intercept at (0, c).
Discriminant (Δ)
b² − 4ac — The discriminant determines the nature and number of roots in a quadratic equation. A positive discriminant (Δ > 0) means two distinct real solutions, a zero discriminant (Δ = 0) means one repeated solution, and a negative discriminant (Δ < 0) means two complex conjugate solutions.
Left: linear equation solution where x = -b/a gives one real root. Right: quadratic equation solution using the quadratic formula, with discriminant determining three possible root types.

Understanding the Result

Equation solving is one of the most fundamental operations in algebra and appears across virtually every technical field. Linear equations (ax + b = 0) are the simplest — they represent a straight line crossing the x-axis at exactly one point. Solving them requires only basic algebraic manipulation: subtract b from both sides and divide by a. Quadratic equations (ax² + bx + c = 0) are more nuanced. Their solutions are given by the quadratic formula x = (−b ± √(b² − 4ac)) / 2a, which has been known since at least 2000 BCE when Babylonian mathematicians solved quadratic-like problems.

The formula was refined over centuries by Greek, Indian, and Persian mathematicians including al-Khwarizmi, whose 9th-century work "The Compendious Book on Calculation by Completion and Balancing" gave us the word "algebra." The key to understanding quadratics is the discriminant (Δ = b² − 4ac). When Δ > 0, the parabola crosses the x-axis twice, giving two real roots. When Δ = 0, the vertex sits exactly on the x-axis, producing a single repeated root.

When Δ < 0, the parabola never touches the x-axis, and the roots are complex numbers of the form p ± qi, where i² = −1. This pattern reveals a deep connection between algebraic formulas and geometric graphs — the discriminant is not just a computational shortcut but a window into the behavior of the entire system. Understanding these relationships is essential for higher mathematics including calculus, differential equations, and linear algebra, where the same discriminant-like concepts reappear in more abstract forms.

How to Use

  1. Select the equation type — Linear (ax + b = 0), Quadratic (ax² + bx + c = 0), Cubic (ax³ + bx² + cx + d = 0) or Quartic (ax⁴ + bx³ + cx² + dx + e = 0) — from the dropdown menu.
  2. Enter the coefficient a (required): the leading coefficient. If a = 0 the equation drops to a lower degree (a linear equation with a = 0 has no solution, or infinitely many when b = 0 as well).
  3. Enter the remaining coefficients in order of decreasing power (b, then c, d, e as the chosen type needs). Fields appear automatically.
  4. The calculator displays the equation in standard form, the discriminant (for quadratics), the roots, and the nature of the roots — real distinct, real repeated, or complex conjugates.

Quick Reference

Linear: ax + b = 0x = −b/a (a ≠ 0)
Quadratic: ax² + bx + c = 0x = (−b ± √(b²−4ac)) / 2a (a ≠ 0)
Δ > 0Two distinct real roots
Δ = 0One repeated real root
Δ < 0Two complex conjugate roots

Frequently Asked Questions

What happens if a = 0 in a quadratic equation?
If a = 0 the equation is no longer quadratic: it becomes linear (bx + c = 0), and the calculator says so and gives that linear solution. For a linear equation with a = 0, there is no solution when b is not 0 (the equation reads b = 0) and infinitely many solutions when b = 0 as well (0 = 0).
Can the quadratic formula solve all quadratic equations?
Yes, the quadratic formula is a universal solver for every quadratic equation regardless of whether the coefficients are integers, fractions, decimals, or irrational numbers. Unlike factoring (which only works for special cases) or completing the square (which is more labor-intensive), the quadratic formula always works. It is derived directly from completing the square on the general form ax² + bx + c = 0.
How do I interpret complex roots?
Complex roots come in conjugate pairs: p + qi and p − qi. The real part p = −b/(2a) is the x-coordinate of the parabola's vertex. The imaginary part is q = √(−Δ)/(2|a|). Complex roots mean the parabola never crosses the x-axis — it either stays entirely above (if a > 0) or entirely below (if a < 0).
What is the geometric meaning of the discriminant?
The discriminant Δ = b² − 4ac has a direct geometric interpretation for the parabola y = ax² + bx + c. If Δ > 0, the parabola intersects the x-axis at two distinct points. If Δ = 0, the parabola is tangent to the x-axis at the vertex. If Δ < 0, the parabola does not intersect the x-axis at all. The magnitude of Δ relates to how far apart the two intersection points are.

Common Uses

  • •Physics: Solve projectile motion equations where height = −½gt² + v₀t + h₀ to find time of flight, max height, and landing time.
  • •Engineering: Calculate break-even points, stress-strain relationships, and circuit analysis where equations arise from Ohm's law and Kirchhoff's rules.
  • •Economics: Find equilibrium points where supply equals demand, or profit maximization where marginal revenue equals marginal cost.
  • •Computer Graphics: Solve ray-surface intersection problems, collision detection, and curve parameterization in game development and 3D rendering.
  • •Education: Learn fundamental algebra concepts, practice solving equations, and verify homework or exam answers step by step.

Sources

Was this calculator helpful?
Cite this calculator

TheCalcUniverse. "Equation Solver — Solve Linear & Quadratic Equations." TheCalcUniverse, 2026, https://thecalcuniverse.com/math/equation-solver/. Accessed October 25, 2026.

Embed this calculator on your site

Free to embed. Paste this into any HTML page — it stays up to date automatically.

Open embed ↗

You may also like