How to Add a Line of Best Fit in Google Sheets


Sanskar Tiwari

Adding a line of best fit, also known as a trendline, in Google Sheets is a fundamental technique for analyzing the relationship between variables in your data.
This guide will walk you through the process of creating a trendline in Google Sheets and discuss how tools like can simplify your data analysis tasks.

What is a Line of Best Fit?

A line of best fit (or trendline) is a straight line that represents the best approximation of the scatter of data points in a scatter plot.
It is used in statistics to depict the direction of a relationship between two variables, helping identify correlations and make predictions.

Step-by-Step Guide to Adding a Line of Best Fit in Google Sheets

Step 1: Prepare Your Data

Before adding a trendline, ensure your data is organized. Typically, you'll need two columns: one for the independent variable (X-axis) and one for the dependent variable (Y-axis).
notion image

Step 2: Create a Scatter Chart

  1. Highlight the data you want to analyze.
  1. Go to the menu, select Insert, and then Chart.
  1. Google Sheets will automatically suggest a chart type. If it doesn’t choose a scatter plot, change it by selecting the Chart type dropdown in the Chart Editor and picking Scatter chart.
notion image

Step 3: Add a Trendline

  1. Click on the chart to bring up the Chart Editor.
  1. Go to the Customize tab.
  1. Under the Series menu, scroll down and find Trendline.
  1. Check the box next to Trendline to add it to your scatter chart. You can further customize the trendline's color, label, and opacity according to your preference.
notion image
notion image

Step 4: Customize and Analyze the Trendline

After adding the trendline, Google Sheets provides several options to customize and interpret it:
  • Type of Trendline: Choose linear, exponential, polynomial, or more depending on the data distribution.
  • Label: Add labels like "None," "Use Equation," or "Custom" to display the trendline equation on the chart.
  • Trendline Transparency: Adjust the transparency slider to make the trendline more or less visible against your data points.

Step 5: Interpret the Results

The equation displayed (if you opted to show it) helps in understanding the relationship between variables. For instance, a positive slope indicates a positive correlation, while a negative slope suggests a negative correlation.
Tip: To make data analysis even easier, try using It allows you to automate many tasks in Google Sheets, such as generating lists, tables, and even filling in data with just a simple prompt. For example, you can quickly create a table summarising sales data, automatically generate a list of email contacts, or fill in missing product descriptions. This can save you a lot of time and effort!
For example, if your analysis requires repetitive calculation of trendlines across various datasets, can automate these tasks, saving time and reducing the potential for human error.


Adding a line of best fit in Google Sheets is an excellent way to visually summarize the relationship between two sets of data. Whether you are in business, academia, or data science, understanding how to create and interpret trendlines is a valuable skill.
For those who regularly work with complex datasets, integrating with a tool like can provide the additional functionality needed to perform sophisticated data analysis efficiently.
Remember, the key to effective data analysis lies in understanding the tools at your disposal and using them to extract meaningful insights from your data.
While Google Sheets offers robust tools for basic data analysis, integrating with advanced platforms like can elevate your data handling capabilities. can automate repetitive tasks, provide deeper insights with advanced statistical tools, and help you manage large datasets more efficiently, all while maintaining the user-friendly interface of Google Sheets.