How to Find the Equation of a Trendline in Excel- 5 Steps

 

What Is Trendline in Excel?

A trendline is a linear or curved line in a graph or chart that defines the general pattern of the selected dataset. It is also referred to as the line of best fit.


To find the equation of a line:

Step 1- Prepare Dataset

Create a dataset with information of Item Name, Sold Items, and Sales amount of 6 types of fruits (here).

How to Find the Equation of a Line in Excel

The values in columns C and D act as Y and X axis.


Step 2 – Create a Scatter Chart

  • Select C5:D10.

How to Find the Equation of a Line in Excel

  • Go to Insert and select Scatter Chart in Charts.

  • Choose Scatter.

  • You will see the chart.


Step 3 – Add a Trendline to the Chart

  • Select the chart.
  • Click the Plus (+) icon to open Chart Elements.

How to Find the Equation of a Line in Excel

  • Check Trendline.

  • You will see a trendline.

  • Format the trendline:

Read More: How to Add a Trendline to a Stacked Bar Chart in Excel


Step 4 – Find the Equation of the Line

  • Select the line.
  • Right-click it and choose Format Trendline.

How to Find the Equation of a Line in Excel

  • In the Format Trendline panel, check Display Equation on chart.

  • The equation is displayed beside the line.

Read More: How to Show Equation in Excel Graph


Step 5 – Add Decimal Places to the Equation

  • Select the trendline again.
  • Right-click it and select Format Trendline Label.

How to Find the Equation of a Line in Excel

  • Select Number in Category.

  • Enter a value in Decimal places.

  • Decimal points are displayed in the line equation.

Read More: How to Create Equation from Data Points in Excel


How to Find the Slope of Line Equation in Excel

To get the slope of the equation, use the SLOPE function.

  • Select C12.
  • Enter this formula.
=SLOPE(D5:D10,C5:C10)

How to Find Slope of Line Equation in Excel

  • Press Enter.
  • The value of the slope for the line is displayed.

The SLOPE function was used to calculate the change rate between dependent and independent variables. D5:D10 defined the dependent data points on the Y axis. C5:C10 acts as the independent data points plotted on the X-axis.

Note: You can also apply the LINEST function to count the slope. Press Ctrl + Shift + Enter after inserting this formula. =LINEST(D5:D10,C5:C10)

Download Practice Workbook

Download the sample file.


Related Articles


<< Go Back To Trendline Equation Excel | Trendline in Excel | Excel Charts | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
Sanjida Mehrun Guria
Sanjida Mehrun Guria

Hello! Welcome to my blog. I have completed my Bachelor in Architecture from Ashanullah University of Science & Technology, Dhaka. I am a passionate, goal-oriented person with an immense thirst for knowledge and an attitude to grow continuously. Besides Architectural work, I find it very enthusiastic to work in Excel blogging. Exceldemy is a platform where I have got the opportunity to flourish my skill in Microsoft Excel and therefore, here I will be posting blogs related to... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo