How to Add Trendline in Excel
Adding a trendline to an Excel chart is one of the quickest ways to see the bigger picture hidden in your data. In just a few clicks, you can instantly reveal patterns, make forecasts, and understand the general direction of your sales, website traffic, or project expenses. This guide will walk you through exactly how to add and customize trendlines in Excel, step-by-step.
What Exactly Is a Trendline?
A trendline, also known as a "line of best fit," is a straight or curved line on a chart that illustrates the overall pattern or direction of your data points. Think of it as a statistical flashlight that cuts through the noise of individual data points to show you the underlying trend. For example, while daily sales might bounce up and down, a trendline can quickly tell you if sales are generally increasing, decreasing, or staying flat over the quarter.
You’ll typically use trendlines on charts that show data over time, like line charts, column charts, or scatter plots. They are incredibly useful for:
Spotting Trends: Are your key metrics headed in the right direction? A simple upward or downward slope on a trendline gives you an immediate answer.
Making Forecasts: You can extend a trendline into the future to predict what might happen next, helping you set realistic goals and anticipate business needs.
Identifying Relationships: On a scatter plot, a trendline can show the relationship between two different variables, like ad spend vs. revenue, helping you identify correlations.
Getting Your Data Ready
Before you can add a trendline, you need two things: properly formatted data and a chart. Trendlines work best with numeric data organized in columns that show a relationship. The most common setup is a time series, like dates in one column and a corresponding value (e.g., sales, users, or revenue) in another.
Here’s a sample dataset we can use. Imagine you’re tracking monthly website sessions for the first half of the year.
Column A: Month (Jan, Feb, Mar, Apr, May, Jun)
Column B: Website Sessions (1200, 1500, 1400, 1800, 1950, 2200)
Your first step is to turn this data into a chart. Line charts, scatter plots, and bar/column charts are all excellent choices for displaying this kind of data and adding a trendline.
How to Add a Trendline in Excel: The Step-by-Step Guide
Once you have a chart, adding a trendline is surprisingly simple. Let’s use our website sessions data as an example. First, create your chart:
Highlight your data, including the headers (cells A1 to B7 in our example).
Go to the Insert tab in the Excel ribbon.
In the Charts group, choose an appropriate chart type. A Line Chart or a Clustered Column Chart works perfectly here.
With your new chart on the worksheet, you're ready to add the trendline. Excel gives you a couple of easy ways to do this.
Method 1: Using the Chart Elements (+) Icon (The Fastest Way)
This is the most direct method available in modern versions of Excel (Excel 2013 and later).
Step 1: Select your chart. Click anywhere on the chart object to activate it. You'll see a green plus sign ("+") appear in the top-right corner.
Step 2: Click the "+" icon to open the Chart Elements menu.
3: Check the "Trendline" box. Excel will instantly add a linear trendline to your chart. It's that simple.
4 (Optional): For more options, click the small arrow to the right of the "Trendline" option in the menu. Here, you can immediately choose the type of trendline (Linear, Exponential, Moving Average, etc.). Select More Options... at the bottom of this mini-menu to open the full formatting pane.
Method 2: Using the Excel Ribbon
If you prefer using the ribbon or are using an older version of Excel, this method works just as well.
Step 1: Select your chart. Clicking the chart adds the Chart Design and Format tabs to the main ribbon.
Step 2: Go to the Chart Design tab.
3: On the far left of the ribbon, click the Add Chart Element button.
4: In the dropdown menu, hover over Trendline and select the type you want from the list that appears. For the most detailed options, choose More Trendline Options… to open the full formatting pane.
Choosing the Right Type of Trendline
Excel automatically defaults to a linear trendline, but that's not always the best fit for your data. The Format Trendline pane gives you access to several different models. Choosing the right one helps you accurately represent what your data is actually doing.
Linear
A linear trendline is a straight line, best used for data sets that increase or decrease at a steady, consistent rate. It's the simplest and most common type.
Use When: Plotting simple relationships like total revenue over an 8-week period, where growth is relatively stable.
Example: sales that grow by about $500 each month.
Exponential
This trendline is a curved line used when your data values rise or fall at increasingly higher rates. It shows momentum.
Use When: The values change by a constantly increasing percentage. This is classic "hockey stick" growth, like the number of users for a new popular app or compound interest on an investment.
Logarithmic
This is the opposite of an exponential line. An S-curve that starts very fast and then levels off. The logarithmic trendline is also a curved line used for data that quickly increases or decreases and then flattens out.
Use When: Your data shows rapid change at the beginning before stabilizing. Examples include product adoption curves or tracking the learning rate of a new skill.
Polynomial
A polynomial trendline is a curved line used for fluctuating data that has several peaks and valleys. When your data has more than one major up-or-down swing, a polynomial can be a better fit than a simple straight line.
Use When: Analyzing large datasets with multiple highs and lows, such as monthly revenue over several years (which may show seasonal fluctuations) or the price of a commodity over time.
Power
This is another curved line for datasets that increase at a specific rate. It's best used with datasets that compare measurements that increase at a steady rate — for example, if acceleration on a go-kart doubles every one second, you might use a power curve trendline.
Moving Average
Unlike the other types, a moving average trendline isn't about finding a single line of best fit. Instead, it smooths out fluctuations in the data to show a trend or pattern more clearly. It does this by averaging a specific number of data points (which you set with the "Period" option) and plotting that average.
Use When: Your data is very "noisy" with lots of short-term peaks and valleys, like daily stock prices or website traffic. A moving average helps you see the underlying long-term trend without getting distracted by daily volatility.
How to Customize Your Trendline
Excel’s trendline features don’t stop at just adding a line. In the Format Trendline pane, you have powerful options to customize the visuals and add deeper statistical insights to your chart.
To access this pane, simply right-click your trendline and select Format Trendline.
Forecasting Ahead (and Behind)
This is one of the most valuable features. In the Trendline Options (the icon with a bar chart graphic), you'll see a "Forecast" section.
Forward: Enter a number into this box to extend the trendline into the future. For our monthly data, entering 2 would project the trend for two more months.
Backward: This is less common but works similarly, extending the trendline into the past.
Displaying the Math on Your Chart
At the bottom of the Trendline Options, you'll find two checkboxes that bring statistical context directly onto your chart:
Display Equation on chart: This shows the algebraic formula Excel used to plot the line (like y = 205.36x + 1091.7). This is valuable for more technical users who might want to use that formula to calculate specific future predictions.
Display R-squared value on chart: R-squared (R²) is a number between 0 and 1 that measures how well the trendline fits your actual data. A value of 1.0 means a perfect fit, while a value of 0.7 is generally considered a strong correlation. If your R-squared value is very low (e.g., 0.2), it's a sign that your chosen trendline type isn't a good representation of the data, and you should consider trying a different type.
Changing the Look and Feel
If you just want to change how the trendline looks to match your report or presentation branding, you can:
Navigate to the "Fill & Line" menu (the icon with a paint bucket).
From there, you can adjust the trendline’s Color, Width, Compound type, and Dash type. A good tip is to make it a distinct color or a dashed line so it stands out from your actual data series.
Final Thoughts
Pulling insights out of a table of raw numbers can be hard. By adding a trendline to a chart in Excel, you transform that raw data into a clear story, making it easy to identify key patterns, predict future outcomes, and communicate what’s happening in your business at a glance.
While spreadsheets are great for manual analysis, connecting to all your data sources and building reports every week can drain your time. We built Graphed to automate that entire process. You can connect your marketing and sales platforms and ask for dashboards and reports in plain English. Graphed handles the data wrangling and visualization, giving you live insights in seconds, not hours.