How To Add Equation To Graph In Google Sheets

In this tutorial, you will learn how to add equation to graph in google sheets.

The trendline of a scatter plot says a lot about the data in the graph, specifically, the relationship between the dependent and independent variables is defined by the slope of the trendline. By default, Google Sheets doesn’t display the equation of trendlines, but that doesn’t mean you’ll have to estimate the slope or calculate it yourself. There’s an option hidden in the Chart Editor settings that makes it easy to add a trendline equation to a graph in Google Sheets. Just follow the steps below.

Adding a Graph with Trendline

Before adding the trendline equation, we need a graph with a trendline, here’s how to add one in Google Sheets:

Step 1

First, you’ll need to set up your data in two columns in Google Sheets, one for the independent variable or X axis of the plot and one for the dependent variable or Y axis. We’ll use mock width and height measurements for this example

Step 2

Select the columns containing your data and open the Insert menu, then choose Chart

Step 3

Google Sheets will attempt to interpret your data and guess what sort of chart will be most helpful, but if it picks the wrong chart type, simply choose the Scatter Plot option from the Chart Type menu at the top of the Chart Editor sidebar

Step 4

The scatter plot will display floating over the spreadsheet cells, but will not yet have a trendline

Step 5

To add a trendline, click on the Customize tab of the Chart Editor then scroll down to the Series section and click on it to expand it

Step 6

Scroll to the bottom of the Series section and check the box for Trendline. A new section will appear where you can adjust the look and feel of the trendline

Step 7

The trendline will immediately display on the scatter plot

Step 8

To add the trendline equation, scroll down past the trendline line opacity and thickness settings to the Label dropdown and select Use Equation from the dropdown

Step 9

The trendline equation will display at the top of the graph

Summary

Example Spreadsheet: Make a copy of the example spreadsheet

In this tutorial, I covered how to add equation to graph in google sheets. Want more? Check out all the Google Sheets Tutorials.