How can I add a regression line to a scatterplot in Google Sheets?

To add a regression line to a scatterplot in Google Sheets, you can follow these simple steps. First, select the data points in your scatterplot by clicking and dragging the cursor over them. Then, click on the “Insert” tab at the top of the screen and select “Chart.” In the “Chart Editor” window, go to the “Customize” tab and click on “Series.” Under “Trendline,” select “Linear” from the dropdown menu. This will automatically add a linear regression line to your scatterplot. You can also customize the appearance of the line by adjusting its color, thickness, and style. This feature in Google Sheets makes it convenient and easy to visually analyze the relationship between two variables in a dataset.

Google Sheets: Add Regression Line to Scatterplot


A represents the line that best “fits” a dataset.

The following step-by-step example shows how to add a regression line to the following scatterplot in Google Sheets:

Google Sheets add regression line to scatterplot

Let’s jump in!

Step 1: Enter the Data

First, let’s enter the values for the following dataset into Google Sheets:

Step 2: Insert a Scatterplot

Next, highlight the cell range A2:B16, then click the Insert tab along the top ribbon, then click Chart:

In the Chart editor panel, click Chart type and then scroll down and click Scatter chart:

The following scatterplot will appear:

Step 3: Add a Regression Line

Next, click the Customize tab within the Chart editor panel.

Then click the dropdown arrow next to Series, then scroll down and check the box next to Trendline.

A regression line will be added to the scatterplot and the equation of the regression line will be shown above the plot:

Google Sheets add regression line to scatterplot

For this particular example, the regression line turns out to be:

y = 0.911x + 4.65

The way to interpret this is as follows:

  • For each additional one unit increase in the x variable, the average increase in the y variable is 0.911.
  • When the x variable is equal to zero, the average value for the y variable is 4.65.

We can also use this equation to estimate the value of y based on the value of x.

For example, when x is equal to 15, the expected value for y is 18.315:

y = 0.911*(15) + 4.65= 18.315

Additional Resources

The following tutorials explain how to perform other common tasks in Google Sheets:

x