# Solving Equations in Excel (5 Useful Examples)

Excel has many features that can perform different tasks. Besides performing different statistical, and financial analyses, we can solve equations in Excel. In this article, we will analyze a popular topic which is Solving Equations in Excel in different ways with proper illustrations.

## How to Solve Equations in Excel

Before starting to solve equations in Excel, let’s see which kind of equation will be solved with which methods.

Types of Solvable Equations in Excel:

There are different kinds of equations exist. But all are not possible to solve in Excel. In this article, we will solve the following types of equations.

• Cubic equation,
• Linear equation,
• Exponential equation,
• Differential equation,
• Non-linear equation

Excel Tools to Solve Equations:

There are some dedicated tools to solve equations in Excel like Excel Solver Add-in and Goal Seek Feature. Besides, you can solve equations in Excel numerically/manually, using Matrix System, etc.

## 5 Examples of Solving Equations in Excel

### 1. Solving Polynomial Equations in Excel

A polynomial equation is a combination of variables and coefficients with arithmetic operations.

In this section, we will try to solve different polynomial equations like cubic, quadrature, linear, etc.

#### 1.1 Solving Cubic Equation

A polynomial equation with degree three is called a cubic polynomial equation.

Here, we will show two ways to solve a cubic equation in Excel.

##### i. Using Goal Seek

Here, we will use the Goal Seek feature of Excel to solve this cubic equation.

Assume, we have an equation:

Y= 5X3-2X2+3X-6

We have to solve this equation and find the value of X.

📌 Steps:

• First, we separate the coefficients into four cells. • We want to find out the value of X here. Assume the initial value of X is zero and insert zero (0) on the corresponding cell. • Now, formulate the given equation of the corresponding cell of Y.
• Then, press the Enter button and get the value of Y.
`=C5*C7^3+D5*C7^2+E5*C7+F5` • Then, press the Enter button and get the value of Y. Now, we will introduce the Goal Seek feature.

• Click on the Data tab.
• Choose the Goal Seek option from the What-If-Analysis section. • The Goal Seek dialog box appears. We have to insert cell reference and value here.

• Choose Cell H5 as the Set cell. This cell contains the equation.
• And select Cell C7 as the By changing cell, which is the variable. The value of this variable will change after the operation. • Put 20 on the To value box, which is a value assumed for the equation. • Finally, press the OK button. The status of the operation is showing. Depending on our given target value, this operation calculated the value of the variable on Cell C7.

• Again, press OK there. It is the final value of X.

##### ii. Using Solver Add-In

Solver is an Add-in. In this section, we will use this Solver add-in to solve the given equation and get the value of the variable.

Solver add-ins do not exist in Excel default. We have to add this add-in first.

📌 Steps:

• We set the value of the variable zero (0) in the dataset. • Go to File >> Options.
• The Excel Options window appears.
• Choose Add-ins from the left side.
• Select Excel Add-ins and click on the Go button. • Add-ins window appears.
• Check the Solver Add-in option and click on OK. • We can see the Solver add-in in the Data tab.
• Click on the Solver. • The Solver Parameters window appears. • We insert the cell reference of the equation on the Set Object box.
• Then, check the Value of option and put 20 on the corresponding box.
• Insert the cell reference of the variable box.
• Finally, click on Solver. • Choose Keep Solver Solution and then press OK. • Look at the dataset. We can see the value of the variable has been changed.

#### 1.2 Solving Quadratic Equation

A polynomial equation with degree two is called a quadratic polynomial equation.

Here, we will show two ways to solve a quadratic equation in Excel.

We will solve the following quadratic equation here.

Y=3X2+6X-5
##### i. Solve Using Goal Seek Feature

We will solve this quadratic equation using the Goal Seek feature. Have a look at the below section.

📌 Steps:

• First, we separate the coefficients of the variables. • Set the initial value of X zero (0).
• Also, insert the given equation using the cell references on Cell G5.
`=C5*C7^2+D5*C7+E5` • Press the Enter button now. We get a value of Y considering X is zero.

Now, we will use the Goal Seek feature to get the value of X. We already showed how to enable the Goal Seek feature.

• Put the cell reference of variable and equation on the Goal Seek dialog box
• Assume the value of equation 18 and put it on the box of the To value section. • Finally, press OK. We get the final value of variable X.

##### ii. Using Solver Add-In

We already showed how to add Solver Add-in in Excel. In this section, we will use this Solver to solve the following equation.

📌 Steps:

• We put zero (0) on Cell C7 as the initial value of X.
• Then, put the following formula on Cell G5. • Press the Enter button. • Enter the Solver add-in as shown before.
• Choose the cell reference of the equation as the object.
• Put the cell reference of the variable.
• Also, set the value of the equation as 18.
• Finally, click on Solve option. • Check the Keep Solver Solution option from the Solver Results window. • Finally, click the OK button. ### 2. Solving Linear Equations

An equation that has any variable with the maximum degree of 1 is called a linear equation.

#### 2.1 Using Matrix System

The MINVERSE function returns the inverse matrix for the matrix stored in an array.

The MMULT function returns the matrix product of two arrays, an array with the same number of rows as array1 and columns as array2.

This method will use a matrix system to solve linear equations. Here, 3 linear equations are given with 3 variables x, y, and z. The equations are:

3x+2+y+z=8,

11x-9y+23z=27,

8x-5y=10

We will use the MINVERSE and MMULT functions to solve the given equations.

📌 Steps:

• First, we will separate the coefficients variable in the different cells and format them as a matrix.
• We made two matrices. One with the coefficients of the variable and another one of the constants. • We add another two matrices for our calculation. • Then, we will find out the inverse matrix of A using the MINVERSE function.
• Insert the following formula on Cell C7.
`=MINVERSE(C5:E7)` This is an array formula.

• Press the Enter button. The inverse matrix has formed successfully.

• Now, we will apply a formula based on the MMULT function on Cell H9.
`=MMULT(C9:E11,H5:H7)` We used two matrices of size 3x3 and 3x1 in the formula and the resultant matrix is of size 3x1.

• Press the Enter button again. And this is the solution of the variables used in the linear equations.

#### 2.2 Using Solver Add-In

We will use the Solver add-in to solve 3 equations with 3 variables.

📌 Steps:

• First, we separate the coefficients as shown previously. • Then, add two sections for the values of the variables and insert the equations.
• We set the initial value of the variables to zero (0). • Insert the following three equations on cells E10 to E12.
`=C5*C10+D5*C11+E5*C12`
`=C6*C10+D6*C11+E6*C12`
`=C7*C10+D7*C11+E7*C12` • Now, go to the Solver feature.
• Set the cell reference of the 1st equation as the objective.
• Set the value of equation 8.
• Insert the range of the variables on the marked box.
• Then, click the Add button. • The Add Constraint window appears.
• Put the cell Reference and values as marked in the below image. • Insert the second constraint.
• Finally, press OK. • Constraints are added. Press the Solve button. • Look at the dataset. We can see the value of the variables has been changed.

#### 2.3 Using Cramer’s Rule for Solving Simultaneous Equations with 3 Variables in Excel

When two or more linear equations have the same variables and can be solved at the same time are called simultaneous equations. We will solve the simultaneous equations using Cramer’s rule. The function MDETERM will be used to find out the determinants.

The MDETERM function returns the matrix determinant of an array.

📌 Steps:

• Separate the coefficients into LHS and RHS. • We add 4 sections to construct a matrix using the existing data. • We will use the data of LHS to construct Matrix D. • Now, we will construct Matrix Dx.
• Just replace the coefficients of X with the RHS. • Similarly, construct Dy and Dz matrices. • Put the following formula on Cell F11 to get the determinant of Matrix D.
`=MDETERM(C10:E12)` • Press the Enter button. • Similarly, find the determinants of Dx, Dy, and Dz by applying the following formulas.
`=MDETERM(C14:E16`)
`=MDETERM(C18:E20)`
`=MDETERM(C22:E24)` • Move to Cell I6.
• Divide the determinant of Dx by D to get calculate the value of X.
`=F15/F11` • Press the Enter button to get the result. • In the same way, get the value of Y and Z using the following formulas:
`=F19/F11`
`=F23/F11` Finally, we solve the simultaneous equations and get the value of the three variables.

### 3. Solving Nonlinear Equations in Excel

An equation with a degree of 2 or more than 2 and that does not form a straight line is called a non-linear equation.

In this method, we will solve non-linear equations in Excel using the Solver feature of Excel.

We have two non-linear equations here.

📌 Steps:

• We insert the equation and variables into the dataset. • First, we consider the value of the variable zero (0) and insert that into the dataset. • Now, insert two equations on Cell C5 and C6 to get the value of the RHS.
`=C9^2+C10^2-25`
`=C9-C10^2` • We add a new row in the dataset for sum.
• After that, put the following equation on Cell C12.
`=SUM(C5:C6)` • Press the Enter button and the sum of the RHS of both equations. • Here, we will apply the Solver feature of Excel.
• Insert the cell references on the marked boxes.
• Set the Value of 0.
• Then, click on Add button to add constraints. • We add the 1st constraints as shown in the image.
• Again, press the Add button for 2nd constraint. • Input the cell references and values.
• Finally, press OK. • We can see constraints are added in the Solver.
• Click the Solver button. • Check the Keep Solver Solution option and then click on OK. • Look at the dataset now. We get the value of X and Y successfully.

### 4. Solving an Exponential Equation

The exponential equation is with variable and constant. In the exponential equation, the variable is considered as the power or degree of the base or constant.

In this method, we will show how to solve an exponential equation using the EXP function.

The EXP function returns e raised to the power of a given number.

We will calculate the future population of an area with a target growth rate. We will follow the below equation for this. Here,

Po= Current or initial population

R= Growth rate

T= Time

P= Esteemed for the future population.

This equation has an exponential part, for which we will use the EXP function.

📌 Steps:

• Here, the current population, target growth rate, and the number of years are given in the dataset. We will calculate the future population using those values. • Put the following formula based on the EXP function on Cell C7.
`=ROUND(C4*EXP(C5*C6),0)` We used the ROUND function, as the population must be an integer.

• Now, press the Enter button to get the result. It is the future population after 10 years as per the assumed growth rate.

### 5. Solving Differential Equations in Excel

An equation that contains at least one derivative of an unknown function is called a differential equation. The derivative may be ordinary or partial.

Here, we will show how to solve a differential equation in Excel. We have to find out dy/dt, differentiation of y concerning t. We noted all the information in the dataset. 📌 Steps:

• Set the initial value of n, t, and y from the given information. • Put the following formula on Cell C6 for t.
`=C5+\$G\$5` This formula has been generated from t(n-1).

• Now, press the Enter button. • Put another formula on Cell D6 for y.
`=D5+(C5-D5)*\$G\$5` This formula has been generated from the equation of y(n+1).

• Again, press the Enter button. • Now, extend the values to the maximum value of t, which is 1.2. We want to draw a graph using the value of t and y.

• Go to the Insert tab.
• Choose a graph from the Chart group. • Look at the graph. It is a y vs. t graph.

• Now, double-click on the graph and the minimum and maximum values of the graph axis. Resize the horizontal line. • After that, resize the vertical line. • After customizing the axis, our graph looks like this. Now, we will find out the differential equation.

• Calculate the differential equation manually and put it on the dataset. • After that, make an equation based on this equation and put that on Cell E5.
`=-1+C5+1.5*EXP(-C5)` • Press the Enter button and drag the Fill Handle icon. • Again, go to the graph and press the right button on the mouse.
• Choose the Select Data option from the Context menu. • Select Add option from the Select Data Source window. • Choose the cells of the t column on X values and cells of the y_exact column on Y values in the Edit Series window. • Again, look at the graph. ## Conclusion

In this article, we described how to solve different types of equations. I hope this will satisfy your needs in solving several equations in Excel. Please have a look at our website Exceldemy.com and give your suggestions in the comment box. #### Siam Hasan Khan

Hello! Welcome to my Profile. Here I will be posting articles related to Microsoft Excel. I have completed my BSc in Electrical and Electronic Engineering from American International University-Bangladesh. I am a diligent, goal-oriented engineer with an immense thirst for knowledge and an attitude to grow continuously. Continuous improvement and life-long learning are my mottoes.

1. Reply why have stooped “Download Article in PDF Format option”

• Reply Thanks for asking. It was creating more indexed pages in Google that was bad for us. What you can do is: just you can copy the whole article and paste into a word document and then convert it into a PDF file. There is little chance of getting back of that button.
Best regards

2. Reply Shawn S Fahrer Nov 9, 2019 at 7:57 AM

I have a few points that when graphed LOOK like a quadratic equation. How do I go from the set of points to get EXCEL to deliver an EQUATION for the quadratic function given those points (like it can do for LINEAR equations)?

• Reply Osman Goni Ridwan Aug 23, 2022 at 4:48 PM

Hello SHAWN S FAHRER!
You can get a quadratic equation from a graph with a few points that you have mentioned here. Follow the steps below for this
First, create a graph with the points you have.
Then, Go to the Chart Elements clicking the Plus icon.
Click on the arrow beside the “Trendline” option.
Go to the “More Options”
1 Here, you will go to a window named “Format Trendline”.
Select the “Polynomial” option of order 2.
Mark the checkbox saying “Display Equation on Chart”. As a result, you will there will create a trend line following a quadratic equation which is also shown in the graph. Try this method and let us know the outcome! Thank You!

3. Reply Hi thanks for posting this article. Can you please elaborate on why did you assume 15 as the value of Y? By definition, shouldn’t we be solving for 3 values of x as the equation is cubic?

• Reply Osman Goni Ridwan Aug 23, 2022 at 4:28 PM

Hello MANUJ! You have to insert a value as the set value for cell G3 to use Goal Seek feature.. suppose you have an equation like 5x^3 – 2x^2 + 3x – 21 = 0 then you can change the equation like 5x^3 – 2x^2 + 3x – 6 = 15. Here, we have done this.

And, yes! you are right that the cubic function gives 3 root values. But using the Goal Seek Feature, you will get only one root. and, in many times, the cubic function may have one real root and 2 complex roots. In these cases, the goal seek feature will give the value of the real root.

Try these examples and let us know the output. Thank You! 