How to Add a Line to a Graph in Excel
Adding a line to an existing Excel graph is one of those tasks that sounds simple but branches into several different techniques depending on what you're actually trying to accomplish. Whether you want to overlay a target value, add a trend line, or combine a line chart with a bar chart, Excel gives you multiple paths — and choosing the wrong one leads to frustration fast.
What "Adding a Line" Actually Means in Excel
Before clicking anything, it helps to clarify what kind of line you need. Excel treats these very differently:
- A data series line — plotted from actual data points in your spreadsheet
- A trendline — calculated automatically by Excel based on existing data
- A constant reference line — a flat horizontal line marking a target, average, or threshold
- A combo chart line — a line series layered on top of a bar or column chart
Each method follows a different process, and mixing them up is the most common source of confusion.
Method 1: Add a New Data Series as a Line 📊
This is the foundational approach. If you have data you want to display as a line alongside existing chart data, you add it as a new series.
Steps:
- Enter your new data in a column adjacent to or separate from your existing data
- Click on your chart to select it
- Right-click the chart area and choose "Select Data"
- Click "Add" under Legend Entries (Series)
- Define the Series name and Series values by selecting the relevant cells
- Click OK
At this point, the new series will likely appear as the same chart type as the rest of your data. If your chart is a bar chart and you want the new series to appear as a line:
- Right-click the new data series in the chart
- Select "Change Series Chart Type"
- Choose Line for that specific series
- Click OK
This creates a combo chart — one of Excel's most useful but least understood features.
Method 2: Add a Trendline to Existing Data
A trendline doesn't require new data. Excel calculates it based on the series already in your chart.
Steps:
- Click on the data series you want to analyze
- Right-click and select "Add Trendline"
- In the Format Trendline panel, choose your trendline type:
| Trendline Type | Best Used For |
|---|---|
| Linear | Steadily increasing or decreasing data |
| Exponential | Data that rises or falls at increasing rates |
| Moving Average | Smoothing out noisy or volatile data |
| Polynomial | Data with curves and fluctuations |
| Power | Data that increases at a consistent rate |
You can also check "Display Equation on chart" or "Display R-squared value" for analytical purposes.
Trendlines are read-only overlays — they don't create editable data points and won't appear in your spreadsheet.
Method 3: Add a Constant Horizontal Reference Line 🎯
This is the method people most often search for and least often find explained clearly. A reference line — say, a sales target of $50,000, or an average value — requires a helper column in your data.
Steps:
- In a new column next to your data, enter the same constant value for every row (e.g., if your target is 100, enter 100 in each row corresponding to your chart's X-axis range)
- Add this column as a new data series using the "Select Data" method described above
- Change that series' chart type to Line
- Format the line (color, dash style, weight) to distinguish it visually — right-click the line and choose "Format Data Series"
This creates a perfectly flat horizontal line across your chart. For an average line, instead of a constant, use Excel's AVERAGE() function repeated across the column, or a single average value referenced with an absolute cell reference like =$B$2.
Method 4: Using the Chart Elements Menu (Faster for Trendlines)
Excel's Chart Elements button (the + icon that appears when you click a chart) offers a shortcut:
- Click your chart
- Click the + icon in the top-right corner
- Check "Trendline"
- Hover over it and click the arrow to choose the trendline type
This is quicker than right-clicking but gives you less control over formatting at the outset.
Variables That Change How This Works
The method that works smoothly for one user can behave differently for another based on several factors:
Excel version — The interface for "Change Series Chart Type" and combo chart creation changed meaningfully between Excel 2013, 2016, and Microsoft 365. Older versions may require navigating through the Design tab rather than right-click menus.
Chart type — Some chart types, including 3D charts, bubble charts, and pie charts, don't support trendlines or additional series in the same way. Combo charts are only available on 2D chart types.
Data structure — If your data is in a non-contiguous range or formatted as an Excel Table, the "Select Data" dialog behaves differently. Tables may auto-extend series, which is helpful or disruptive depending on your layout.
Mac vs. Windows — Excel for Mac follows the same logic but menus are positioned differently. "Select Data" lives under the Chart Design tab on Mac rather than the right-click context menu in some versions.
Formatting the Line Once It's Added
Once your line is in the chart, right-clicking it opens "Format Data Series" — your control panel for:
- Line color and weight
- Dash type (solid, dashed, dotted — useful for distinguishing reference lines from real data)
- Markers (adding data point markers on a line series)
- Smoothing (curves vs. sharp angles between points)
For reference lines or target lines, a dashed style in a contrasting color is standard practice — it signals to the reader that this line represents a benchmark rather than measured data.
When the Results Look Wrong
A few common issues and their causes:
- Line appears as bars — You added the series but didn't change its chart type to Line
- Line only spans part of the chart — Your helper column doesn't cover all rows in the X-axis range
- Two separate charts appear — You accidentally created a new chart instead of adding a series to the existing one; always start by clicking the existing chart first
- Trendline option is greyed out — Your chart type doesn't support trendlines, or you haven't selected a specific series
The right approach depends on whether you're working with dynamic data, a static target value, a calculated trend, or a mixed chart type — and those distinctions matter more than they first appear.