How to Find the Slope of a Trendline in Google Sheets

Finding the slope of a trendline in Google Sheets is easy. First, select the data points that are used to create the trendline, then click the “Chart” button. On the Chart Editor sidebar, select the “Trendlines” tab, then select the type of trendline that best fits the data. Next, select the “Options” tab and look for the “Slope” parameter. The number displayed is the slope for the trendline.


The slope of a trendline represents the average increase in the y-value for a one unit increase in the x-value.

To find the slope of a trendline in Google Sheets, we can use the SLOPE function.

This functions uses the following syntax:

SLOPE(data_y, data_x)

where:

  • data_y: The range of y-values
  • data_x: The range of x-values

The following example shows how to use this function in practice to calculate the slope of a trendline in Google Sheets.

Step 1: Create the Data

First, let’s create a dataset with two variables in Google Sheets:

Step 2: Calculate Slope of Trendline

Next, let’s type the following formula into cell E1 to calculate the slope of the trendline for this dataset:

=SLOPE(B2:B21, A2:A21)

The following screenshot shows how to use this formula in practice:

slope of trendline in Google Sheets

From the output we can see that the slope is roughly 0.917.

This means that the value for y increases by an average of 0.917 for a one-unit increase in x.

Step 3: Visualize Slope of Trendline

To visualize the slope value, we can create a scatterplot and add a trendline.

To do so, highlight the values in the range A2:B21, then click the Insert tab, then click Chart from the dropdown menu:

In the Chart editor window that appears on the right side of the screen, choose Scatter chart as the Chart type.

Then click the Customize tab, then scroll down to Series, then check the box next to Trendline and click Use Equation in the dropdown under Label:

The trendline and the equation for the trendline will be displayed on the chart:

calculate slope of trendline in Google Sheets

From the output we can see the formula for the linear trendline:

y = 0.917x + 12.5

This tells us that the y-intercept for the trendline is 12.5 and the slope is 0.917.

This means that the value for y increases by an average of 0.917 for a one-unit increase in x.

x