PDF download Download Article
Learn how to create the perfect line of best fit in Microsoft Excel
PDF download Download Article

This wikiHow teaches you how to create a line of best fit in your Microsoft Excel chart. A line of best fit, also known as a best fit line or trendline, is a straight line used to indicate a trending pattern on a scatter chart. If you were to create this type of line by hand, you'd need to use a complicated formula. Fortunately, Excel makes it easy to find an accurate trend line by doing the calculations for you.

Adding a Line of Best Fit in Excel

To add a trendline in Excel, right-click one of the data points in your chart, then click Add Trendline. If your data isn't formatted as a chart, highlight it and click Insert, then click the scatter chart icon. Choose the first option to create the chart.

Section 1 of 2:

Adding a Best Fit Line

PDF download Download Article
  1. The data you select will be used to create your scatter chart. A scatter chart is one that uses dots to represent values for two different numeric values (X and Y).[1]
  2. It's at the top of Excel.
    Advertisement
  3. It's in the toolbar at the top of the screen. The icon looks like several small blue and yellow squares—when you hover the mouse cursor over this icon, you should see "Insert Scatter (X, Y)" or Bubble Chart (the exact wording varies by version).[2] A list of different chart types will appear.
  4. It's the chart icon at the top-left corner of the menu. This creates a chart based on the selected data.[3]
  5. This can be any of the blue dots on the chart. This selects all of the data points at once and expands a menu.[4]
    • If you are using a Mac and don't have a right mouse button, hold down the Ctrl button as you click a dot instead.
  6. Now you'll see the Format Trendline panel on the right side of Excel.[5]
  7. It's the second option in the Format Trendline panel. You should now see a linear straight line that reflects the trend of your data.[6]
  8. It's toward the bottom of the Format Trendline panel. This displays the math calculations used to create the best fit line.[7] This step is optional, but can be useful for anyone viewing your chart who wants to understand how the best fit line was calculated.[8]
    • Click the X at the top-right corner of the Format Trendline panel to close it.
  9. Advertisement
Section 2 of 2:

FAQ

PDF download Download Article
  1. 1
    How do I make a line of best fit in Google Sheets? First, create a scatter chart with your data. Then, open the Chart Editor and click Customize > Series, then make sure the Trendline box is checked. You can change the trendline type by clicking the "Type" dropdown.
  2. 2
    Can I add a trendline to other types of charts? Yes! You can add a trendline to most chart types, including scatter, bubble, column, bar, line, and area charts. To add a trendline, simply right-click on any datapoint and click Add Trendline to get started.
  3. Advertisement

Expert Q&A

Ask a Question
200 characters left
Include your email address to get a message when this question is answered.
Submit
Advertisement

Video

Tips

  • While your chart is selected, you can customize its colors and other features by experimenting with the options on the Design tab. Click Change Colors in the toolbar to choose a color scheme, and then scroll through the "Chart styles" options to find one that looks good for your data.[9]
Submit a Tip
All tip submissions are carefully reviewed before being published
Name
Please provide your name and last initial
Thanks for submitting a tip for review!
Advertisement

You Might Also Like

Do Trend Analysis in ExcelDo Trend Analysis in Excel
Add Two Trend Lines in ExcelAdd Two Trend Lines in Excel
Make a Line Graph in Microsoft Excel Make a Line Graph From Data in Microsoft Excel
Graph Multiple Lines in ExcelGraph Multiple Lines in Excel
Create an S Curve Pattern in Microsoft ExcelCreate an S Curve Pattern in Microsoft Excel
Show the Max Value in an Excel Graph Show & Highlight the Max Values in an Excel Graph
Create a Graph in Excel Create a Chart in Microsoft Excel: Step-by-Step Guide
Make a Scatter PlotMake a Scatter Plot
Run a Multiple Regression in Excel Run a Multiple Regression in Microsoft Excel: Step-by-Step Guide
Add a Second Y Axis to a Graph in Microsoft Excel2 Easy Ways to Make a Chart with Two Y Axes in Excel
Make a Bar Graph in Excel Make a Bar Graph in Excel
Add a Second Set of Data to an Excel Graph Add Additional Sets of Data to an Excel Graph
Add a Graph to Microsoft Word Make a Graph in Microsoft Word
Make a Pie Chart in Excel Create a Pie Chart in Microsoft Excel: Simple Steps
Advertisement

About This Article

Hannah Dillon
Written by:
wikiHow Technology Writer
This article was co-authored by wikiHow staff writer, Hannah Dillon. Hannah Dillon is a Technology Writer and Editor at wikiHow. She graduated with a B.A. in Journalism from North Dakota State University in 2013 and has since worked in the video game industry as well as a few newspapers. From a young age Hannah has cultivated a love for writing and technology, and hopes to use these passions in tandem to help others in the articles she writes for wikiHow. This article has been viewed 178,360 times.
How helpful is this?
Co-authors: 4
Updated: March 13, 2026
Views: 178,360
Categories: Microsoft Excel
Article SummaryX

1. Highlight the data for your chart.
2. Click the Insert tab.
3. Click the Scatter icon.
4. Click the first Scatter chart.
5. Right-click one of the data points on the chart.
6. Click Add Trendline.
7. Select "Linear."
8. Check the box next to "Display equation on chart."

Did this summary help you?

Thanks to all authors for creating a page that has been read 178,360 times.

Is this article up to date?

Advertisement