How to Find Slope of Trendline in Google Sheets (4 Simple Ways)

You might be familiar with the idea of a slope and trendline if you frequently show research reports, or financial data, or need to perform mathematical puzzles. The term “slope” refers to calculating the steepness and direction of a line. A rising line will have a positive slope (lower to the left and higher to the right). A line with a negative slope is one that slopes downward (higher to the left and lower to the right). In this article, I’ll demonstrate 4 simple ways to find the slope of a trendline in Google Sheets. Here is an overview of what we will achieve:

Overview of Finding Slope of Trendline in Google Sheets


4 Simple Ways to Find Slope of Trendline in Google Sheets

We will use the dataset below to demonstrate 4 simple ways to find the slope of a trendline in Google Sheets. The dataset contains a list of years and a company’s profit for each year. We now need to construct a trendline for this dataset, sometimes referred to as a line of best fit or a regression line, which visually depicts patterns in data series. Next, we’ll calculate the slope of the trendline for our dataset.

Dataset of Finding Slope of Trendline in Google Sheets


1. Using Chart Feature

We can use a chart to find the slope of a trendline in Google Sheets. For this, you have to create a chart first. And Google Sheets make it very easy and fast to create a chart. First, we will use the chart to get the trendline. Then, from the trendline, we will get the slope of the trendline.

Steps:

  • First, select the entire dataset to create a chart. In our case, we selected Cell B4:C11. Next, go to the Insert tab from the top menu bar and select Chart.

Using Chart Feature to Find Slope of Trendline in Google Sheets

  • As a result, a line chart will appear on your screen. Along with the chart, a dialog box named Chart editor will also pop up on your screen for editing the chart. Next, go to the Customize section and click on the Series field.

Customize Series of the Chart

  • After that, click on the Trendline section.

Clicking Trendline

  • It will create a trendline on your chart. You may choose color and opacity for your trendline. In our case, we choose red as the trendline color and choose line opacity 100%. Now, to get the trendline equation, select Use Equation from the Label section.

Selecting Use Equation from the Label section

  • Thus, you will get the trendline equation on top of your chart which is y=mx+c, where m is the slope of the trendline. Therefore, the slope of our trendline is 8000.

Output after Using Chart Feature

Read More: How to Find Slope of Graph in Google Sheets (With Easy Steps)


2. Applying SLOPE Function

To get the slope of the trendline for our dataset, we may even utilize a function. The SLOPE function assists in determining the gradient of two separate provided arrays in Google Sheets. The advantage of this approach is that you can determine the slope’s value without having to draw a chart or trendline. It is one of the easiest and fastest ways to find the slope of the trendline.

Steps:

  • First, select a cell where you want to apply the formula. In our case, we selected Cell C13. Next, type the formula below and press Enter
=SLOPE(C5:C11,B5:B11)

Applying SLOPE Function to Find Slope of Trendline in Google Sheets

  • As a result, you will get the slope of the trendline of your dataset.

Output after Applying SLOPE Function

Read More: How to Find P-Value in Google Sheets (With Quick Steps)


Similar Readings


3. Employing FORECAST Function

By utilizing the FORECAST function, you can also determine the trendline’s slope. The FORECAST function in Google Sheets applies linear regression to determine the linear connection between the value series and timeline series in order to predict future values.

Steps:

  • Firstly, choose a cell where you’re going to apply the formula. In our case, we chose Cell C13. Next, enter the following formula and press Enter
=FORECAST(1,C5:C11,B5:B11)-FORECAST(0,C5:C11,B5:B11)

Employing FORECAST Function to Find Slope of Trendline in Google Sheets

Formula Breakdown

  • FORECAST(1,C5:C11,B5:B11)

Here, the FORECAST function returns the value of slope(m) and y-axis intersect(c).

  • FORECAST(0,C5:C11,B5:B11)

Then, this returns the value of the y-axis intersect(c) only.

  • FORECAST(1,C5:C11,B5:B11)-FORECAST(0,C5:C11,B5:B11)

Finally, it calculates (m+c)-c and returns the value of slope(m) only.

  • Thus, you will get the trendline’s slope for your dataset.

Output after Employing FORECAST Function

Read More: Easy Guide to Replace Formula with Value in Google Sheets


4. Embedding TREND Function

The slope of a trendline can also be calculated using a different function called the TREND function. You may determine the data pattern in a collection of data points using Google Sheets’ TREND function. It also provides the predicted value of the dependent variable in the future, based on a predefined value for the independent variable.

Steps:

  • First, pick a cell where you’ll apply the formula. In this instance, we chose Cell C13. After that, input the formula below and hit Enter
=TREND(C5:C11,B5:B11,1,true)-TREND(C5:C11,B5:B11,0,true)

Embedding TREND Function to Find Slope of Trendline in Google Sheets

Formula Breakdown

  • TREND(C5:C11,B5:B11,1,true)

Here, the TREND function returns the value of slope(m) and y-axis intersect(c).

  • TREND(C5:C11,B5:B11,0,true)

Later, this returns the value of the y-axis intersect(c) of the trendline.

  • TREND(C5:C11,B5:B11,1,true)-TREND(C5:C11,B5:B11,0,true)

Finally, it returns the value of slope(m) only by calculating (m+c)-c.

  • As a result, you will obtain the trendline’s slope for your dataset.

Output after Embedding TREND Function

Read More: How to Search in All Sheets in Google Sheets (An Easy Guide)


How to Find Equation of Trendline in Google Sheets

We may even wish to find the equation of the trendline in Google Sheets because it doesn’t get visible by default. Here, I’ll demonstrate how to accomplish this.

Steps:

  • Firstly, you have to create a chart for your dataset. To do so, select the entire dataset. We selected Cell B4:C11.
  • Next, go to the Insert tab from the top menubar and select Chart.

Finding Equation of Trendline in Google Sheets

  • A line chart will therefore show up on your screen. A dialog window titled Chart editor will also appear on your screen along with the chart to allow you to change it.
  • Next, go to the Customize section and click on the Series field.

Customize Series of the Chart

  • Click on the Trendline section after that. Your chart will develop a trendline as a result.
  • You may choose your trendline’s color and opacity. In this instance, we decide to use 100% line opacity and the color red for the trendline.
  • Now choose Use Equation from the Label section to obtain the trendline equation.

Choosing Use Equation in the Trendline section

  • Thus, you’ll obtain the trendline’s equation on top of your chart.

Output after Finding Equation of Trendline in Google Sheets


Conclusion

That’s all from this article. Here, I’ve covered 4 simple ways to find the slope of a trendline in Google Sheets. I’ve also shown how to find the equation of a trendline in Google Sheets. I hope this will meet your requirements. Please feel free to any queries or suggestions in the comment section below. To explore more, visit our site Officewheel.com.


Related Articles

Sishir Roy

Sishir Roy

Hello, I'm Sishir Roy. I currently work for the SOFTEKO company at officewheel.com as a technical writer and content developer. I completed my BSc degree in civil engineering from BUET. I like using my talents as a creative problem-solver and thinker to come up with innovative solutions to problems. I have a great interest in the research and development of data science. Please follow my blog at Officewheel.com for more Google Sheets solutions.

We will be happy to hear your thoughts

Leave a reply

OfficeWheel
Logo