How To Add Line Of Best Fit In Google Sheets

In this tutorial, you will learn how to add a line of best fit in Google Sheets.

How To Add Line Of Best Fit In Google Sheets

Scatter plots are useful to display the correlation between two data sets, especially when the data comes from noisy measurements so the points do not line on a smooth curve.

Scatter plots display individual data points so it’s sometimes helpful to add a line of best fit to the scatter plot to help interpret the data.

If you have a scatter plot in Google Sheets, you can easily add a line of best fit to the plot.

When your data updates, the line of best fit will automatically update to reflect the change.

Insert a Scatter Plot in Google Sheets

If you don’t already have a scatter plot, you’ll have to insert one in order to add a line of best fit. To insert a Scatter Plot in Google Sheets, follow these steps:

Step 1

Select the data range you want to plot. Be sure to include the headers as these will be used to label the axes in the plot

Step 2

Open the Insert menu, and select the Chart option

Step 3

A new chart will be inserted as a floating element above the cells, and the Chart Editor sidebar will appear with options to edit the chart.

To turn this chart into a scatter plot, click on the Chart Type dropdown menu and select the Scatter Chart option:

Step 4

Your chart will update to a scatter plot:

Adding the Line of Best Fit

Once you have a scatter plot in Google Sheets, it’s time to add the line of best fit:

Step 1

Open the Chart Editor for the scatter plot by selecting the scatter plot and clicking on the 3 dot menu icon in the corner.

From the menu that appears, select Edit Chart. The Chart Editor for the graph will open:

Step 2

Switch to the Customize tab of the Chart Editor by clicking the word Customize at the top of the editor. Once selected, the text will highlight green and underline.

Click on the Series section of the menu to expand it:

Step 3

Scroll down in the Series menu section and till you find the checkbox labeled Trendline and check:

A trendline will appear on the scatter plot:

Summary

Example Spreadsheet: Make a copy of the example spreadsheet

In this tutorial, I covered how to add a line of best fit in Google Sheets. Want more? Check out all the Google Sheets Tutorials.