Home » How to Solve a Quadratic Equation in Excel (Step-by-Step)

How to Solve a Quadratic Equation in Excel (Step-by-Step)

by Erma Khan

A quadratic equation takes the following form:

ax2 + bx + c = y

Often you will be given the value for y and will be asked to solve for the value of x.

For example, suppose we have the following quadratic equation:

4x2 – 20x + 16 = -8

It turns out that setting x = 3 or x = 2 will solve this equation.

To solve quadratic equations in Excel, you can use the Goal Seek function.

The following step-by-step example shows how to use the Goal Seek function in practice.

Step 1: Enter the Equation

First, let’s enter some random value for x and the formula for the quadratic equation for y:

Step 2: Find the First X Value Using Goal Seek

Next, click the Data tab along the top ribbon, then click the What-If Analysis button, then Goal Seek:

In the new window that appears, specify that you’d like to set cell B2 equal to -8 by changing the value in cell A2:

Once we click OK, the Goal Seek function will automatically find the value for x that solves the equation:

Goal Seek finds that the value x=2 (assuming 1.9999 rounds to 2) solves the quadratic equation.

Step 3: Find the Second X Value Using Goal Seek

To find the second x value that solves the quadratic equation, set the initial x-value to a different number.

For example, we could choose to set the initial x-value to 4:

We can then run the Goal Seek function again and see that it finds a new solution of x=3:

Thus, the two x-values that can solve this quadratic equation are x=2 and x=3.

Additional Resources

The following tutorials explain how to perform other common tasks in Excel:

How to Solve a System of Equations in Excel
How to Plot an Equation in Excel

Related Posts