How to Get Trendline Equation in Excel: A Step-by-Step Guide

How to Get Trendline Equation in Excel

Getting the trendline equation in Excel is as easy as pie. You start by creating a scatter plot with your data points, add a trendline, and then configure the chart settings to display the equation. In just a few clicks, you’ll have the trendline equation right at your fingertips, which you can use for predictive analysis or to better understand your data.

Step-by-Step Tutorial on How to Get Trendline Equation in Excel

In this section, we’ll go through each step involved in getting the trendline equation in Excel. By the end, you’ll know exactly how to add a trendline to your chart and extract its equation.

Step 1: Open Excel and Enter Your Data

First, open Excel and input your data into a spreadsheet.

Make sure your data includes two columns – one for the X-axis and one for the Y-axis. This way, Excel can plot the data points correctly.

Step 2: Highlight Your Data Range

Highlight the range of data you want to include in the scatter plot.

Simply click and drag your mouse over the cells containing your data.

Step 3: Insert a Scatter Plot

Go to the "Insert" tab, click on "Scatter," and choose a scatter plot style.

This will create a basic scatter plot with your data points visible.

Step 4: Add a Trendline

Click on any data point in your scatter plot. Then, click the "Chart Elements" button (a plus sign icon) and check the “Trendline” box.

A trendline will appear on your scatter plot, providing a visual representation of the data trend.

Step 5: Display the Trendline Equation

Right-click on the trendline and select “Format Trendline.”

In the Format Trendline pane, check the box that says “Display Equation on chart.” The trendline equation will now be visible on your scatter plot.

After completing these steps, you’ll see the trendline equation on your chart. This equation can help you understand the relationship between your data points and make predictions.

Tips for How to Get Trendline Equation in Excel

  • Choose the Right Trendline Type: Excel offers several types of trendlines (linear, exponential, logarithmic, etc.). Pick one that best fits your data’s pattern.

  • Format the Equation: You can format the trendline equation for readability. Click on the equation and use the formatting options in the "Home" tab.

  • Use Additional Data: More data points often lead to a more accurate trendline. If possible, include as many relevant data points as you can.

  • Check R-Squared Value: To ensure the trendline fits your data well, check the “Display R-squared value on chart” option. A value close to 1 indicates a good fit.

  • Save Your Work: Don’t forget to save your Excel file after adding the trendline and equation, especially if this data is important for your analysis.

Frequently Asked Questions

How do I choose the best trendline type?

The best trendline type depends on your data pattern. Linear is common, but if your data curves, consider exponential or polynomial trendlines.

Can I add multiple trendlines to a single chart?

Yes, you can add multiple trendlines. Just click on each data series and add a trendline individually.

How do I remove a trendline?

Click on the trendline to select it and press the "Delete" key on your keyboard.

What is the R-squared value?

The R-squared value shows how well the trendline fits your data. A value closer to 1 means a better fit.

Can I use trendlines in Excel for Mac?

Yes, the steps are almost identical, but the interface might look slightly different.


  1. Open Excel and Enter Your Data.
  2. Highlight Your Data Range.
  3. Insert a Scatter Plot.
  4. Add a Trendline.
  5. Display the Trendline Equation.


Mastering how to get the trendline equation in Excel can be a game-changer for anyone dealing with data. Whether you’re a student, a small business owner, or a data analyst, understanding trendlines and their equations helps you make sense of complex data sets. It’s like having a crystal ball that gives you insights into your data trends and future predictions.

So, what are you waiting for? Open Excel, follow these steps, and start exploring the hidden trends in your data. Once you’ve got the hang of it, you’ll wonder how you ever managed without it. Happy data crunching!

Get Our Free Newsletter

How-to guides and tech deals

You may opt out at any time.
Read our Privacy Policy