How can I plot an equation in Excel?

To plot an equation in Excel, first enter the equation in the desired cell using the appropriate mathematical operators. Then, select the data range including the equation cell. Next, go to the “Insert” tab and click on “Scatter” under the “Charts” section. Choose the desired scatter plot type and a graph will be generated with the equation plotted. Additional formatting options such as adding a trendline or labeling the axes can also be utilized to enhance the visualization of the equation. This process can be repeated for multiple equations to compare and analyze their data on the same graph.

Plot an Equation in Excel


Often you may be interested in plotting an equation or a function in Excel. Fortunately this is easy to do with built-in Excel formulas.

This tutorial provides several examples of how to plot equations/functions in Excel.

Example 1: Plot a Linear Equation

Suppose you’d like to plot the following equation:

y = 2x + 5

The following image shows how to create the y-values for this linear equation in Excel, using the range of 1 to 10 for the x-values:

Plot an equation or function in Excel

Next, highlight the values in the range A2:B11. Then click on the Insert tab. Within the Charts group, click on the plot option called Scatter.

The following plot will automatically appear:

We can see that the plot follows a straight line since the equation that we used was linear in nature.

Example 2: Plot a Quadratic Equation

Suppose you’d like to plot the following equation:

y = 3x2

The following image shows how to create the y-values for this equation in Excel, using the range of 1 to 10 for the x-values:

The following plot will automatically appear:

We can see that the plot follows a curved line since the equation that we used was quadratic.

Example 3: Plot a Reciprocal Equation

Suppose you’d like to plot the following equation:

y = 1/x

The following image shows how to create the y-values for this equation in Excel, using the range of 1 to 10 for the x-values:

Next, highlight the values in the range A2:B11. Then click on the Insert tab. Within the Charts group, click on the plot option called Scatter.

The following plot will automatically appear:

We can see that the plot follows a curved line downwards since this represents the equation y = 1/x.

Example 4: Plot a Sine Equation

Suppose you’d like to plot the following equation:

y = sin(x)

The following image shows how to create the y-values for this equation in Excel, using the range of 1 to 10 for the x-values:

Next, highlight the values in the range A2:B11. Then click on the Insert tab. Within the Charts group, click on the plot option called Scatter with Smooth Lines and Markers.

The following plot will automatically appear:

Plot a sine function in Excel

Conclusion

You can use a similar technique to plot any function or equation in Excel. Simply choose a range of x-values to use in one column, then use an equation in a separate column to define the y-values based on the x-values.

x