How to Solve for x in Excel (2 Simple Ways)

In Excel, we often need to solve equations for x, which is the root of the equation. Finding the root of an equation can be quite simple for linear equations. But as you try to find the roots of a quadratic equation, cubic equation, or equations with higher degrees of x, it becomes more difficult and, in some cases, almost impossible. However, Excel is here to save you from all of these problems. Excel makes it quite simple for us to solve equations for x. In this article, we will learn 2 simple yet efficient ways to solve for x in Excel.


Download Practice Workbook


2 Simple Methods to Solve for x in Excel

The following dataset has 4 equations, each of which successively increases the power of x. Our goal is to find the value of x in these equations.

Not to mention that we have used Microsoft Excel 365 version for this article, you can use any other version according to your convenience.

how to solve for x in excel


1. Using Goal Seek Feature to Solve for x in Excel

Using the Goal Seek feature, a tool of the What-If Analysis, is one of the easiest ways to solve for x in Excel. It searches for a specified value of a cell by changing the value of one cell. In this case, the Goal Seek feature will try to find for which the value of x, the value of the equation, becomes 0. Let’s follow the steps mentioned below to do this.

Step 01: Formulate the Equation to find F(x) Value  

  • Firstly, enter the following formula in cell C5.
=(20*D5)-307

Here, cell D5 refers to the cell of X Value column.

  • Following that, press ENTER.

Using Goal Seek Feature to Solve For x in Excel

Note: Here, we will be using the cells in Column D as our initial x value. As, in the beginning, there are no values in those cells, the initial x values will be 0 for all the cases.

As a result, you will see the following output in cell C5, as marked in the following image.

Formulating the Equation to find F(x) Value in Excel

  • Now, enter the following formula in cell C6 to find the F(x) Value for the second equation.
=(D6^2)-(7*D6)+2

Here, cell D6 represents the cell of X Value column.

  • Next, hit ENTER.

Consequently, you will get the F(x) Value for the second equation.

  • Following the same process, you can find the F(x) Values for the rest of the equations.

♦ Step 02: Choose Goal Seek Feature

  • Firstly, go to the Data tab from Ribbon.
  • Following that, select the What-If Analysis option.
  • Now, choose the Goal Seek option from the drop-down.

Using Goal Seek Feature to solve for x in excel

Subsequently, the Goal Seek dialogue box will open as shown in the following image.

  • Now, click on the box of Set cell and select cell C5 as marked in the image given below.
  • After that, enter 0 in the To Value box

  • Following that, click on the By changing cell box and choose cell D5.
  • Then, click on OK.

Subsequently, the Goal Seek Status dialogue box will be visible and confirm that it has found a solution.

  • Finally, click OK.

As a result, you will get the x Value for the first equation as demonstrated in the following picture.

  • Now, by following the same procedure, you will get the rest of the x Values for other equations.

final output of method 1 to solve for x in excel

Read More: How to Solve an Equation for X When Y is Given in Excel


2. Utilizing Solver Add-in to Solve for x in Excel

Utilizing the Solver Add-in option of Excel is another efficient way to solve an equation for x. By default, the Solver Add-in feature is not enabled. Let’s use the steps to solve an equation for x in Excel.

♦ Step 01: Enable the Solver Add-in

  • Firstly, use the keyboard shortcut ALT + F + T to open the Excel Options dialogue box from your worksheet.

Utilizing Solver Add-in to Solve For x in Excel

  • After that, go to the Add-ins tab from the Excel Options dialogue box.
  • Then, click on the Go option as marked in the following image.

Enabling the Solver Add-in to solve for x in excel

  • Next, check the box Solver Add-in option.
  • Afterward, click OK.

  • Following that, go to the Data tab and you will see that the Solver option is added to the Analyze group.

♦ Step 02: Formulate the Equation to find F(x) Value

♦ Step 03: Utilizing the Solver Add-in Option

  • Firstly, go to the Data tab from Ribbon.
  • Next, choose the Analyze option.
  • Then, select the Solver option from the drop-down.

Utilizing the Solver Add-in Option  to solve for x in excel

As a result, the Solver Parameters dialogue box will open on your worksheet as shown in the following picture.

  • After that, click on the marked option like in the following image.

  • Subsequently, choose cell C5 under column F(x) Value.

  • Now, in the Solver Parameters dialogue box, choose the Value of option and enter 0 in the marked box.
  • After that, click on the marked option in the following picture.

  • After that, select cell D7 and click on the marked region of the following image.

  • Following that, click on Solve.

Consequently, Excel will give confirmation that the solver has found a solution.

  • Finally, click on OK from the Solver Results dialogue box.

As a result, you will find the x Value for the first equation.

Note: Here, the F(x) Value in cell C5 represents that the value is close to 0.

  • Next, by using the same steps, you can get the x Values for the remaining equations.

final output of method 2 to solve for x in excel

Read More: How to Solve 2 Equations with 2 Unknowns in Excel (2 Examples)


Practice Section

In the Excel Workbook, we have provided a Practice Section on the right side of the worksheet. Please practice it by yourself.

practice section to solve for x in excel


Conclusion

That’s all about today’s session. I strongly believe that this article was able to guide you to solve for x in Excel. Please feel free to leave a comment if you have any queries or recommendations for improving the article’s quality. To learn more about Excel, you can visit our website, ExcelDemy. Happy learning!


Related Articles

Zahid Hasan

Zahid Hasan

Hello and welcome! Thank you for visiting my profile. I am currently employed as an Excel & VBA Content Creator at ExcelDemy. My most recent academic qualification is a BSc (Eng) from the Bangladesh University of Engineering and Technology. Industrial and Production Engineering was my major. I constantly attempt to think creatively and find a simple answer.

We will be happy to hear your thoughts

Leave a reply

5 Excel Hacks You Never Knew

Genius tips to help you unlock Excel's hidden features

FREE EMAIL BONUS

ExcelDemy
Logo