# How to Find the Slope of a Trendline in Google Sheets

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: 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: 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.