# How to Plot an Equation in Excel (6 Easy Ways)

Get FREE Advanced Excel Exercises with Solutions!

Frequently, we need to plot an equation in Excel. Fortunately, it is quite simple and easy to get this in Excel. In this article, I will show you six easy ways on how to plot equations in an Excel graph. Hence, read the article properly and save time.

## 6 Easy Ways to Plot an Equation in Excel

From the Excel graph, you can plot equations for various types of equations. Generally, it includes linear equations, exponential equations, logarithmic equations, polynomials, power equations, and moving averages. However, I will demonstrate to you all of them step by step with a sample dataset as below. ### 1. Plotting Linear Equation

Generally, linear equations are the most common type of equation in Excel. We use them on a regular basis. Moreover, it is best for linear data. For the purpose of demonstration, we have used the following equation.

`y = 5x + 3` Steps:

• Firstly, write down the following formula into the formula bar according to the sample equation.

`=5*B5+3` • Now, press Enter and use the AutoFill tool to apply the formula to the whole column. • Secondly, select any cell within the data and click the Insert tab.
• Next, click on the Scatter command from the Charts group of commands.
• After that, a drop-down menu will appear; select the first one, which is simply the Scatter chart. • As a result, a chart will appear. However, select the chart and click on the + symbol.
• After that, click on the Chart Elements as shown below. • From the Format Trendline, select Linear and Display Equation on Chart. • Finally, you will get the Linear Equation below. ### 2. Making Equation in Excel Graph for Exponential

Another type of equation that we can plot in an Excel graph is the exponential equation. It is not only quite simple but also easy to plot. Hence, follow the equation and sample dataset mentioned below, which I have used to plot the exponential equation.

`y = e^x` Steps:

• Firstly, put the following formula according to the equation we have taken.

`=EXP(B5)` • Then, hit Enter Get the full dataset by using the AutoFill tool. • Now, select any cell within the data.
• Similarly, click the Insert tab and select the Scatter command from the Charts group of commands.
• After that, select the first one, simply the Scatter chart from the drop-down menu. • Then, a chart will appear. However, select the chart and click on the symbol.
• After that, click on the Chart Elements as mentioned below. • Lastly, select Exponential and Display Equation on Chart from the Format Trendline option. • Finally, the Exponential Equation will appear as below. Read More: How to Populate a List Based on Cell Value in Excel (6 Ways)

### 3. Creating Logarithmic Type Equation

In general, logarithmic type equations are quite common to plot data that grows or declines quickly before leveling out. Moreover, both positive and negative values may be present while creating logarithmic equations. For example, I have used the following equation in order to create the logarithmic equation.

`y = 0.4343ln(x) + 2` Steps:

• Firstly, write the formula below and press Enter.

`=LOG10(B5)+2` • Now, use the AutoFill tool to do the same for the rest of the data. • Then, select any cell within the data.
• Secondly, click on the Insert tab.
• Thirdly, from the Charts group of commands, select the Scatter command.
• After that, select the Scatter chart from the Scatter command. • After all, a chart will appear. Again, select the chart and click on the + symbol.
• After that, mark the Chart Elements as shown below. • In addition to this, select Logarithmic and Display Equation on Chart. • Finally, you will get the Logarithmic Equation in the following image. ### 4. Plotting Equation for Polynomials in Excel

A Polynomial is often categorized based on the degree of the biggest exponent. Usually, polynomial equations perform better for big datasets that contain multiple rises and falls. Moreover, it has multiple orders. However, we have selected the below equation in order to plot the polynomial equation.

`y = 3x^2 + 5x - 1`

Similarly, follow the steps mentioned below. Steps:

• First of all, write the following formula in the formula bar and hit the Enter key.

`=3*(B5^2)+5*B5-1` • In addition to this, use the AutoFill tool similarly to generate the total sample dataset. • Now, select a cell from the given data.
• Next, click the Insert tab.
• Similarly, from the Charts group of commands, select the Scatter command.
• After that, a drop-down menu will appear; select the Scatter chart. • Hence, a chart will appear. However, click on the + symbol after selecting the chart.
• After that, click on the Chart Elements as shown in the image below. • Select Polynomial of Order 2 and Display Equation on Chart from the Format Trendline Option accordingly. • Lastly, you will find the Polynomial Equation in the below picture. Read More: How to Use AutoComplete in Excel (4 Easy Ways)

### 5. Drawing Power Equation in Excel

The exponential curve and the power trend line are extremely similar. However, the power curve is more symmetric. But power equation will not work if the data contains zero or any negative values. For the purpose of demonstration, I have picked the following equation and sample dataset. Lastly, you have to go through the following steps.

`y = x^3` Steps:

• Firstly, input the formula below according to the sample equation and press the Enter button.

`=B5^3` • Similarly, use the AutoFill tool to complete the dataset. • Now, select any cell from the data.
• Secondly, click on the Insert tab. Moreover, click on the Scatter command from the Charts group of commands.
• Thirdly, select the Scatter chart. • Above all, a chart will appear.
• Now, select the chart and click on the symbol.
• After that, click on the Chart Elements which are mentioned in the below image. • From the Format Trendline Option, select Power and Display Equation on Chart. • Finally, you will get the Power Y Equation as in the image below. ### 6. Equation Based on Moving Average

In some situations, you may have data that contains several fluctuations. In this case, the moving average trendline helps a lot, though it doesn’t contain any equations. But it smooths the extreme ups and downs in the data set and certainly shows a smooth curve. For example, I have created a random sample dataset mentioned below to plot the curve. Steps:

• At first, click on any cell within the data.
• Now, press the Insert tab.
• Next, from the Charts group of commands, select the Scatter command.
• After that, a drop-down menu will appear. Similarly, select the first one, simply the Scatter chart. • Gradually, a chart will appear. However, click on the + symbol after selecting the chart..
• After that, select some of the Chart Elements as shown below. • Lastly, select Moving Average of Period 2 and Display Equation on Chart from the Format Trendline option. • Finally, you will get the Moving Average Equation as mentioned in the below image. ## Plotting Multiple Equations on a Single Chart

However, we can combine multiple equations into a single chart. It is as simple and quite easy as before. Just follow the steps mentioned below to plot multiple equations on a single chart. For the purpose of demonstration, I have put three different types of equations in the following picture. Steps:

• Firstly, draw the power equation by following the steps in Method 5.
• Now, select the graph and press Select Data from the filter option. • Now, click on the Add option. • After that, select the X values and Y values to the range for the other two equations as in the picture below. Hence, press OK. • Again, press OK. • Finally, you will find the three quotations plotted on the same chart. ## Conclusion

These are all the steps you can follow in Excel to plot an equation in Excel. Hopefully, you can now easily create the needed adjustments. I sincerely hope you learned something and enjoyed this guide. Please let us know in the comments section below if you have any queries or recommendations.

## Related Articles #### Mehedi Hasan

Hi, I am Mehedi. I have completed my B.Sc. from Bangladesh University of Engineering and Technology. I have a strong interest in innovation and research in the field of Data Science and Machine Learning. Gradually, I now understand the value of Data Analysis and I am trying to learn everyday.

We will be happy to hear your thoughts Advanced Excel Exercises with Solutions PDF  