Skip to content

Quadratic Formula Calculator

Find exact roots, calculation steps and the graph of your equation with the quadratic formula calculator.

Set up your equation

ax² + bx + c = 0

Enter a, b and c from ax² + bx + c = 0; use 0 for a missing term. Press Solve equation. Read the roots, then check the steps and graph below.

Numbers: 0.5 or 0,5 · 1/2 · 1e-6

Enter in a field: solve · Ctrl / ⌘ + Enter: solve

Result

Try an example

How do I enter an equation in the quadratic formula calculator?

Before entering numbers in the quadratic formula calculator, put every term on one side of the equation. Enter a, b and c for ax² + bx + c = 0, or switch to Equation and paste an expanded sum. I start by checking the right-hand side: solving x² − 5x + 6 = 1 is different from solving the same expression equal to zero. The tool subtracts the right side before it calculates anything.

Coefficient fields accept signed decimals, a single fraction such as 1/2, and scientific notation such as 1e-6. A decimal comma is accepted too. All three fields need a value; write 0 for a missing term. Each field allows up to 48 characters, exponents with magnitude at most 60, and nonzero coefficients from 1e-60 to 1e60 in magnitude. Zero itself is allowed. These are deliberate input limits, not mathematical limits of quadratics.

Equation mode accepts sums of numeric terms, x and x², with optional multiplication signs between a numeric coefficient and x. You can enter terms on both sides; repeated terms are added. Expand parentheses first: (x + 1)², products of expressions, functions, radicals in the input and powers above two are outside this parser. It does not guess what an unsupported expression means. A bare expanded expression is treated as equal to zero.

How do I read exact roots and decimal answers?

The result shows exact fractions when the square root of the discriminant is rational. Otherwise it keeps a radical expression, reducing common square factors and cancelling shared integer factors. A displayed expression such as (5 − √5)/2 is an exact answer; its decimal underneath is an approximation. The form may be mathematically equivalent to a shorter simplified radical without being printed in that shortest form. I keep that distinction visible because rounding can make close roots look identical.

For a = 1, b = −5 and c = 6, D = (−5)² − 4 × 1 × 6 = 1. Substituting gives x = (5 ± 1)/2, hence 2 and 3. The sum is −b/a = 5 and the product is c/a = 6. Those two quick checks catch many sign errors. The vertex is (−b/(2a), −D/(4a)) = (2.5, −0.25), exactly halfway between the real roots horizontally.

Multiplying the entire equation by a nonzero number does not change its roots. With coefficients 0.000001, −0.000005 and 0.000006, the discriminant is 0.000000000001, but the answers are still 2 and 3. Treating every tiny discriminant as zero would give the wrong repeated root 2.5. The calculator classifies the discriminant with exact rational input arithmetic, not an absolute floating-point threshold.

Discriminant reference: assume a ≠ 0
ConditionRootsReal graph
D > 0Two distinct real rootsTwo x-intercepts
D = 0One repeated real rootVertex touches the x-axis
D < 0Two complex-conjugate rootsNo real x-intercept

The calculation steps substitute your signed coefficients into the formula and show a factored form for real roots. For the default equation that is (x − 2)(x − 3) = 0; a repeated root becomes a squared factor. The leading coefficient is retained, so the factors represent the original collected polynomial. With a negative discriminant there are no real linear factors. Try the examples just below the answer to compare these cases.

How are the roots shown on the graphs?

The green curve is y = ax² + bx + c after collecting the equation onto one side. Copper points mark real roots; the dashed line marks the symmetry axis. The vertex is highlighted separately. The horizontal and vertical scales are independent, so judge coordinates from their tick values rather than the apparent steepness of the curve. Zoom changes the horizontal window, Fit restores it, and Trace x reports a point on the function.

The root plane answers a different question. Its horizontal coordinate is the real part and its vertical coordinate is the imaginary part. For x² + 2x + 5 = 0, D = 4 − 20 = −16 and x = −1 ± 2i. Both points have real part −1; their imaginary parts are 2 and −2. They are not places where the real parabola crosses the horizontal axis. The parabola has vertex (−1, 4) and stays above zero.

Very close roots, or a tiny root beside an enormous one, may overlap visually at the current scale. Read the exact roots when the points overlap. A graph is a coordinate illustration, not a proof of equality. If a numeric range cannot be drawn reliably, the tool says so while retaining the exact calculation. Save graph SVG downloads the current parabola view locally; it does not save the entire page or the complex plane.

Three parabolas with two crossings, one touch and no real crossing
Positive, zero and negative discriminants describe three different relationships with the real x-axis.

Why is one quadratic root so small?

The familiar formula is x = (−b ± √(b² − 4ac))/(2a). It is exact algebra, but direct floating-point evaluation can subtract nearly equal numbers. In x² + 100000000x + 1 = 0, one root is about −100000000 and the other about −0.00000001. Evaluating the small answer through a subtraction of nearly equal large values can erase useful digits.

For two distinct real roots, the calculator evaluates a cancellation-resistant root first and obtains its partner through the root product c/a. It handles c = 0 separately so that the zero root is preserved. That improves the decimal calculation; it does not turn binary floating-point estimates into exact decimals. Input decimals and fractions, the discriminant sign and the symbolic results use rational arithmetic, while plotted coordinates and decimal approximations use numeric arithmetic.

The displayed discriminant belongs to the collected coefficients you entered. Clearing denominators may produce another equation with the same roots but a different discriminant magnitude. For 1/2x² − 3/2x + 1 = 0, D = 1/4; after multiplying by 2, x² − 3x + 2 = 0 has D = 1. Both give 1 and 2. I compare signs and solutions, not discriminant magnitudes from differently scaled equations.

Examples: coefficients and solutions
InputExpected answerWhat it checks
1, −5, 62 and 3; D = 1Ordinary real roots
0.000001, −0.000005, 0.0000062 and 3; D = 1e-12Scale-independent classification
1, 2, 5−1 ± 2i; D = −16Complex roots
1/2, −3/2, 11 and 2; D = 1/4Exact fractions
0, 2, −84, a linear solutiona = 0 fallback

What happens when a is zero?

If a = 0, the quadratic formula is not available because its denominator would be zero. The tool solves bx + c = 0 when b is nonzero: 2x − 8 = 0 gives x = 4. If both a and b are zero, 0 = 0 is an identity and every real or complex x satisfies it; a nonzero constant equal to zero is a contradiction and has no solution. These cases are labeled explicitly instead of being shown as a failed parabola calculation.

Use Copy solution for a text record of the exact roots and steps. Inputs are not stored as a local history, and the calculator does not send them away. Clear removes both input modes and the old result; invalid input also hides the previous solution immediately. Enter while a coefficient or equation field is focused solves it immediately. Ctrl or Command plus Enter also solves the active input mode. Clear resets the inputs; Escape keeps them. The example buttons give real, repeated, complex and numerically awkward examples without requiring you to type them again.

Standard form transformed into vertex form with symmetry axis and minimum
Completing the square exposes the vertex; setting the same expression equal to zero exposes the roots.

How do I check a quadratic solution?

For homework, read the discriminant and roots guide before deciding whether a graph should cross, touch or miss the x-axis. For turning coefficients into a vertex, follow completing the square. For applied questions, use the word-problem walkthrough and check each answer against the meaning and domain of the variable.

The conventions here follow OpenStax’s quadratic-equation treatment and its discussion of quadratic functions and vertex form. The examples above are worked directly from their coefficients. No graph or calculator removes the need to check units, restrictions and the original equation when the numbers come from a real situation.

Guides

Quick answers

Can I enter a full equation?

Yes, an expanded sum of x², x and numbers, on one or both sides. Expand parentheses first; products, functions and higher powers are unsupported.

Why are there two roots but no x-intercepts?

A negative discriminant gives two complex-conjugate roots. They appear on the root plane, while the real parabola has no x-intercept.

Does a tiny discriminant count as zero?

Only an exactly zero rational discriminant is classified as a repeated root. Small nonzero values retain their sign.

What happens when a is zero?

The tool solves the remaining linear equation, or identifies an identity or a contradiction. It does not divide by zero.

Are my equations saved or uploaded?

The calculator processes them on your device without uploads or a stored input history. Copy and SVG download happen only when you request them.

Updated