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

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.

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.

Sample Dataset for How to Plot an Equation in Excel


1. Plotting a Linear Equation in Excel

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

Now, follow the steps accordingly.

Sample Dataset for How to Plot Linear Equation in Excel

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.

How to Plot Linear Equation in Excel


2. Generating an Exponential Equation in Excel

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

Sample Dataset for How to Make Exponential Equation in Excel

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.

Exponential Equation on Excel Chart


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

Sample Dataset for Creating Logarithmic Type Equation in Excel

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.

Logarithmic Equation in Excel Graph


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.

Sample Dataset on How to Plot Equation for Polynomials in Excel

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.

Polynomial Equation on Excel Chart


5. Drawing Power Equation

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

Sample Dataset For Drawing Power Equation in Excel

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.

How to Plot Power Equation on Excel Graph


6. Making an 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.

Sample Dataset on How to Plot an Equation in Excel by Using Moving Average Trendline

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 Moving Average Equation in Excel


How to Plot Multiple Equations on a Single Chart in Excel

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.

Sample Dataset for Applying Multiple Equation on Excel Chart

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.

Multiple Equations on Excel Chart

Read More: How to Graph Two Equations in Excel 


Download Practice Workbook

You can download the workbook used for the demonstration from the download link below.


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.


Plot an Equation in Excel: Knowledge Hub


<< Go Back to Excel Charts | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!

Tags:

Mehedi Hasan
Mehedi Hasan

Mehedi Hasan, a BSc graduate in Naval Architecture & Engineering from Bangladesh University of Engineering and Technology, plays a pivotal role as an Excel & VBA Content Developer at ExcelDemy. Fueled by a profound passion for research and innovation, he actively engages with Excel. In his capacity, Mehedi not only adeptly tackles intricate challenges but also showcases enthusiasm and expertise in navigating tough situations with finesse, underscoring his unwavering dedication to consistently delivering exceptional and high-quality content. He... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo