In this article:

How to Create a Line of Best Fit in Google Sheets [Ultimate Guide]

December 5, 2024

A line of best helps visualize patterns to data in a Scatter Plot chart

In this article we will show you how to create a line of best fit in Google Sheets.

What is a Line of Best Fit?

A line of best fit is a type of trendline for scatter plot charts and is used to express a relationship in a scatter plot of different data points. It is an overlay that is superimposed onto the data. It can help discover patterns and upcoming trends for a series of data points within the chart.

If you want to learn how to add trendlines for other types of graphs in Google Sheets, check out our Google Sheets trendline tutorial.

How to Add Line of Best Fit in Google Sheets

A line of best fit is applied to a scatter plot chart therefore it is necessary we create a scatter plot chart first before we can add a line of best fit. 

Creating a Scatter Plot Chart

A scatter plot chart is a mathematical tool that utilizes dots to give a visual representation of the values for two different numeric variables. A scatter plot chart is also referred to as a scatter chart or scatter graph.

Have a look at our scatter chart tutorial for the full tutorial and how to create your own Google Sheets scatter chart.

Sample Sheet

For our example we have created a data set in Google Sheets relating to 20 boxers and their weights. Click here to access this data set was used in our screenshots and examples.

Click on the link to follow along and master your skills.

Adding Line of Best Fit

Step 1: Double Click the Scatter Chart

Double click on the scatter chart, The Chart editor menu will appear on the right hand side.

How to make a line of best fit on Google Sheets: Open the Chart editor menu

Ensure the Customize tab is selected within the Chart editor.

How to make a line of best fit on Google Sheets - Customize

Step 2: Click the Series Section

In the customize section select the section labelled Series , this will open a drop down set of further options.

How to make a line of best fit on Google Sheets - Series options

Scroll down until you can see three checkboxes labelled “Error bars”, “Data labels” and “Trend line

How to make a line of best fit on Google Sheets - Series checkboxes

Step 3: Apply the Line of Best Fit

Select the checkbox labelled Trend line, this will superimpose the line of best fit onto the scatter chart and present further options to customize this. 

How to make a line of best fit on Google Sheets - Application

There you have it, we can now easily see a clear visual representation of the trend of data. You can now customize this to be of a different color, opacity, thickness or with a custom label.

Related Articles

-Add Title and Label Legend Google Sheets Chart

-Add Trendline Google Sheets

-Finding the Slope in Google Sheets

-Flipping X and Y Axes

-Create a chart with Multiple Ranges of Data

Get Google Sheets productivity and automation tips delivered straight to your inbox
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
We'll email you 1-3 times a week — and never share your information.

Work less, automate more!

Use Lido to connect your spreadsheets to email, Slack, calendars, and more to automate data transfers and eliminate manual copying and pasting. View all use cases ->