how to make a trendline in excel

How to Create a Trendline in Excel

By Olivia Garcia
AD

Creating a trendline in Excel helps visualize data patterns and make predictions based on historical data. It's an essential tool for identifying trends and making data-driven decisions. Here's a step-by-step guide on how to make a trendline in Excel, along with some useful tips and tricks.

I'll assume you're using the latest version of Excel (2019 or 365), but the process is similar in older versions. Before we start, ensure your data is organized in columns, with dates or consecutive numbers in the first column and the corresponding values in the second column.

Adding a Trendline to a Basic Scatter Plot

Let's begin by creating a simple scatter plot and adding a trendline to it.

AD
How to add Trendline in Excel Charts | MyExcelOnline
How to add Trendline in Excel Charts | MyExcelOnline
How To Add Trendline In Excel Chart Tutorial
How To Add Trendline In Excel Chart Tutorial
How to Use Trendline Equation in Excel: 8 Suitable Examples - ExcelDemy
How to Use Trendline Equation in Excel: 8 Suitable Examples - ExcelDemy

Excel automatically generates a linear trendline, which is suitable for most data. Here's how to add a trendline:

Step 1: Create a Scatter Plot

Select your data, then click on the 'Insert' tab in the ribbon. Click on 'Scatter' in the 'Charts' group, then choose 'Scatter with Smooth Lines' or 'Scatter with Straight Lines'.

How to Create a Polynomial Trendline in Excel - 2 Methods - ExcelDemy
How to Create a Polynomial Trendline in Excel - 2 Methods - ExcelDemy
How to Visualize Trends in Excel (3 Effective Ways) - ExcelDemy
How to Visualize Trends in Excel (3 Effective Ways) - ExcelDemy
How to Find Slope of Polynomial Trendline in Excel (with Detailed Steps) - ExcelDemy
How to Find Slope of Polynomial Trendline in Excel (with Detailed Steps) - ExcelDemy

Excel will create a scatter plot of your data. The X-axis will be your independent variable (e.g., dates, time) and the Y-axis your dependent variable (e.g., sales, prices).

Step 2: Add the Trendline

With the chart selected, click on the trendline. A set of formatting tools appear. Click on the 'Format Selection' button (it has an arrow pointing to the right). In the 'Arrange' group, click on 'Add a Trendline eliciting a menu. Choose 'Linear' or other trendline options based on your data.

AD

The trendline appears in your chart. If you hover over the trendline, you'll see its equation and the coefficient of determination (R-squared), which indicates how well the data follows the trendline.

How to Add Trendline in Excel Online (with Easy Steps) - ExcelDemy
How to Add Trendline in Excel Online (with Easy Steps) - ExcelDemy
How to Make a Lineweaver Burk Plot in Excel (with Easy Steps) - ExcelDemy
How to Make a Lineweaver Burk Plot in Excel (with Easy Steps) - ExcelDemy
How to Find the Equation of a Trendline in Excel- 5 Steps - ExcelDemy
How to Find the Equation of a Trendline in Excel- 5 Steps - ExcelDemy
How to Find the Slope of a Line in Excel - 5 Methods - ExcelDemy
How to Find the Slope of a Line in Excel - 5 Methods - ExcelDemy
How to Extrapolate Trendline in Excel (4 Quick Methods) - ExcelDemy
How to Extrapolate Trendline in Excel (4 Quick Methods) - ExcelDemy
How to Make a Line Graph in Excel
How to Make a Line Graph in Excel

Customizing Your Trendline

You can customize your trendline to make it more visible or accurate.

Here's how to display the equation and R-squared value directly on the chart:

AD

Showing Equation and R-Squared Value

Right-click on the trendline, choose 'Format Trendline'. In the 'Format Trendline' pane, under 'The line', check 'Display Formula on chart'. To show R-squared, check 'Display R-squared value on chart' under 'The line'.

How to Extend Trendline in Excel (with Easy Steps) - ExcelDemy
How to Extend Trendline in Excel (with Easy Steps) - ExcelDemy
Variation Analysis With Trend Indicator in Excel Chart - Excel Tips and Tricks
Variation Analysis With Trend Indicator in Excel Chart - Excel Tips and Tricks
How to Create Trend Charts in Excel (4 Methods) - ExcelDemy
How to Create Trend Charts in Excel (4 Methods) - ExcelDemy

Now, you'll see the trendline equation and R-squared on your chart.

Adding Data Points to the Trendline

Sometimes, you might want to see exactly where the trendline passes through your data points. Here's how to do it:

AD

Right-click on the trendline and choose 'Add a Trendline'. Select 'More Options' and check 'Pass through plot points'. Click 'OK'. Now, you'll see how the trendline interacts with your data points.

As Excel updates your data, your trendline will also update automatically, reflecting the new trend in your data.

AD