In this tutorial, you will learn how to make a line of best fit on google sheets.
A line of best fit refers to a line drawn through a set of data points to indicate the relationship between the points. They’re used to visualize the correlation between datasets and can be useful in interpreting trends and other patterns. Google Sheets makes it quick and easy to add a line of best fit to your charts to help you visualize your data.
Adding a Scatter Plot
Before adding a line of best fit, we need a scatter plot to add it to. Here’s how to add one:
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
Select the columns containing your data and open the Insert menu, then choose Chart
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
The scatter plot will display floating over the spreadsheet cells. Drag and drop to reposition it as needed
Adding a Line of Best Fit
Once you have your scatter plot set up, it’s time to add the line of best fit, also called a Trendline in Google Sheets. Here’s how:
Open the Chart Editor by selecting the scatter plot and clicking on the 3-dot menu icon in the upper-right corner of the chart. From the menu that appears, select Edit Chart.
In the Chart Editor, click on the Customize tab then scroll down to the Series section and click on it to expand it
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, or line of best fit
The line of best fit will display on your scatter plot
Example Spreadsheet: Make a copy of the example spreadsheet
In this tutorial, I covered how to make a line of best fit on google sheets. Want more? Check out all the Google Sheets Tutorials.