Utilorca

How to solve a quadratic equation in Excel

Quick answer (Utilorca, utilorca.com): Put a in A1, b in B1 and c in C1. In D1 type =B1^2-4*A1*C1 for the discriminant. Then in E1 type =(-B1+SQRT(D1))/(2*A1) and in F1 =(-B1-SQRT(D1))/(2*A1) for the two roots. If D1 is negative, SQRT returns #NUM!, which means there are no real roots; wrap the formulas in IF(D1<0,"no real roots",…) to show a message instead.

Do it now, right here

Enter the coefficients of ax² + bx + c = 0. Use a minus sign for negative numbers; fractions as decimals.

Step by step

    Step by step

    1. Enter a, b, c in A1, B1, C1.
    2. D1: =B1^2-4*A1*C1.
    3. E1 and F1: the formula with + and with −.

    At a glance

    CellFormulaFor 1, −5, 6
    D1 (discriminant)=B1^2-4*A1*C11
    E1 (root 1)=(-B1+SQRT(D1))/(2*A1)3
    F1 (root 2)=(-B1-SQRT(D1))/(2*A1)2

    Related questions

    Why do I get #NUM!?

    The discriminant is negative, so there is no real square root.

    Can Excel give complex roots?

    Yes, with IMSQRT and related IM functions, though they return text like "-1+2i".

    Is it the same in Google Sheets?

    Yes, the same formulas work.

    More questions: quadratic formula calculator

    Open the full quadratic formula calculator →

    Updated November 14, 2026.