Microsoft Excel is mainly used for statistical analysis, keeping and tracking records, making and analyzing reports, etc. Apart from these, users can solve different equations like linear, quadratic, cubic, and others. The process for solving these equations in Excel is slightly different than how we generally do it. In this article, we will show you how to solve cubic equation in Excel.
Download Practice Workbook
You can download the free Excel workbook here and practice on your own.
2 Ways to Solve Cubic Equation in Excel
To illustrate our article, first we need to take a cubic equation. The equation we want to solve in our procedure is Y = X3+8X2+19X+12. In this article, we will use two different methods to solve this cubic equation in Excel. Firstly, we will utilize the Goal Seek feature of Excel to solve the equation, and secondly, we will utilize the Solver add-in of Excel to get a result from this equation. In both procedures, we will assume a value of Y, and then, by using that value, we will calculate a value of X.
For our calculation process, we’ve arranged the equation on a worksheet like the following image. Here, we have shown the variables and the coefficient separately.
1. Utilizing Goal Seek Feature to Solve Cubic Equation in Excel
For our first procedure, we will utilize the Goal Seek feature of Excel. By using this feature, we will set the final result of an equation as an input, and this feature will change the variables depending on this outcome and show the variable as the result of this goal seeking. For detailed steps of this procedure, follow the below description.
- First of all, make a new table under the main data set to show the results after calculation.
- Then, we will set 0 as the initial value of X.
- Secondly, use the following formula to determine the value of Y when the initial value of X is zero.
- Thirdly, press Enter to get the value for Y which is 12.
- Then, after finishing all the calculations, go to the Forecast group of the ribbon.
- From there, choose the What-If Analysis.
- Fifthly, from the dropdown menu, select Goal Seek.
- In this step, we will find the value of X for a predetermined value of Y.
- After choosing the command from the previous step, you will see the Goal Seek dialog box.
- Firstly, in the “Set cell” type box, input the cell address that will be the final output of this goal.
- Then, in the “To value” type box, set the new output for the cell chosen in the previous step.
- Thirdly, in the “By changing cell” type box, select the cell, by altering which we will get the above outcome.
- Lastly, press OK.
- Finally, after pressing OK, the Goal Seek feature will take some time and show the result after calculation.
- Here, to change the value of Y to 20, the value of X will need to be around 0.36304 which is one of the roots of this cubic equation.
Read More: How to Solve 2 Equations with 2 Unknowns in Excel (2 Examples)
2. Using Solver Add-in to Solve Cubic Equation
Another method of solving cubic equations in Excel is the Solver add-in. This add-in is an amazing tool for solving linear and nonlinear equations. Unlike Goal Seek, we can input multiple inputs in Solver to see the final outcome. For a better understanding, go through the following steps.
- First of all, make a data table for showing the results just like the previous method.
- Again, calculate the value of Y from the formula shown in the previous discussion.
- Before going to the calculator we need to activate the add-in.
- For that, go to the File tab of the ribbon.
- Then, select Options from the Home window of Excel.
- Fourthly, go to the Add-ins tab in the Excel Options dialog box.
- Then, in the Manage section, choose Excel Add-ins and then select Go.
- Fifthly, mark the box beside Solver Add-in and press OK.
- Consequently, you will see the Solver command in the Data group.
- Then, click on it.
- In this step, you will see the Solver Parameters dialog box.
- Here, we have to set some parameters.
- First of all, in the Set Objective type box, select cell C13 which is the value of Y.
- Then, set the “Value Of” type box to 20. This sets the value of Y.
- Thirdly, we will get the output 20 by changing the value of X which is in cell B13.
- Fourthly, make sure the solving method is nonlinear as our equation is not linear.
- Lastly, press Solve.
- Finally, after going through all the inputs, the Solver will show the final result.
- In our case, the value of X is 0.36304.
- Consequently, if we enter this value into the equation we will get the value of Y as 20.
- As both the Goal Seek and Solver need to input a value first for the calculation, that’s why you have set the value of Y = 20 in the first place.
- As in many cases, a cubic equation may have a simple root and more than one complex root. So, both the above methods will show the simple root as a result.
Read More: Solve Algebraic Equations with Multiple Variables (3 Ways)
That’s the end of this article. We hope you find this article helpful. After reading the above description, you will be able to solve cubic equation in Excel by using any of the above-mentioned methods. Please share any further queries or recommendations with us in the comments section below.
The ExcelDemy team is always concerned about your preferences. Moreover, you need to keep in mind that the submitted comments need to be approved. Therefore, after commenting, be patient and we will reply to your queries as soon as possible.