To add a horizontal target or reference line to an Excel chart, add a data series whose value is repeated across the chart’s categories, then display that series as a line. For a column chart, use Chart Design > Change Chart Type > Combo and set the target series to Line; for an existing line chart, adding the constant-value series is usually enough.
Why add a horizontal line to a chart?
A horizontal reference line makes it easier to compare changing values with a fixed benchmark. It can show a sales target, budget limit, service threshold, average, capacity, or pass mark. For example, a chart of monthly sales can include a line at 100 units so readers can see which months met the target.
The most reliable approach is to make the reference line part of the chart’s data. Excel then positions it according to the value axis, and it moves appropriately if the chart’s scale or plotted data changes. This is different from drawing a line over the chart with a shape: a shape is a visual overlay, not a data point, and can become misaligned when the chart is resized or its axis changes.
Prepare the source data
Add a separate column for the reference value, with one value for every category shown on the horizontal axis. The values must be the same if the line is meant to be level. For instance, if the categories are months and the target is 100 units, enter 100 beside every month:
| Month | Sales | Target |
|---|---|---|
| January | 82 | 100 |
| February | 108 | 100 |
| March | 95 | 100 |
| April | 121 | 100 |
Use a clear heading such as Target or Threshold for the new column. Keep the target values in the same units as the plotted measurements. If the chart shows percentages, for example, enter the target as a percentage rather than as a whole-number count. When the category list grows, add a target value for each new row so the line continues across the full chart.
Add the series to an existing chart
In Excel for Microsoft 365 on Windows, use these steps to add the target column to a chart that already exists:
- Click the chart to show its chart tabs.
- Choose Chart Design > Select Data.
- In the Select Data Source window, select Add under Legend Entries (Series).
- Enter or select the target column heading for Series name, then select the target values, excluding the heading, for Series values.
- Choose OK. If the category labels are not aligned with the new series, use Edit under Horizontal (Category) Axis Labels and select the same category cells used by the other series.
- Choose OK again to return to the chart.
Excel may add the new series using the chart’s existing type. On a line chart, that can already create the desired level line. On a column chart, the target may appear as another set of columns, so change its chart type as described next. If the chart is based on an Excel Table, adding a new adjacent column may sometimes update the chart automatically; check the result, and use Select Data if the series does not appear.
Show the target as a line on a column chart
A combo chart lets the actual values remain columns while the target is drawn as a line. After adding the target series, select the chart and choose Chart Design > Change Chart Type. Select Combo in the chart-type options, then set the actual series to Clustered Column and the target series to Line. Confirm the change. The exact choices shown depend on the chart and Excel build, but the key is to assign Line to the target series rather than to the measured data.
For a target and actual values that use the same units and scale, keep both series on the primary axis. A secondary axis is generally unnecessary and can make the line’s position misleading: the same visual height may represent a different value on each axis. Use a secondary axis only when the series genuinely have different scales, and make both axes visible and clearly labeled so readers can interpret the chart.
If you are creating a new chart, you can select the category, actual-value, and target columns together before inserting a chart, then choose a combo chart and assign the series types. You can also create the basic column chart first and add the target series afterward. The latter approach is often easier when Excel guesses the chart types incorrectly.
Adding a line to a line chart or an XY scatter chart
For a standard line chart with categories such as months, add the repeated target values as a new series. Excel plots those equal values at the same height across the categories. If it adds markers that clutter the chart, format the target series and remove its markers while leaving the line visible.
An XY scatter chart is different because both axes are numeric. To draw a horizontal line across a chosen x-range, create a small helper series with two points: one at the left end of the desired x-range and one at the right end, using the same y-value for both. Add that series through Chart Design > Select Data > Add, assigning the two x-values as Series X values and the two equal y-values as Series Y values. Then use Change Chart Type to make that series an XY (Scatter) chart with straight lines and no markers, if those options are available for the chosen chart setup. A scatter chart uses numeric x-values; simply repeating a target value in a category-based table may not produce the intended result.
Format the reference line so it is easy to read
Click the target line to select the series, then right-click and choose Format Data Series. In the formatting pane, adjust the line color, width, dash style, and marker options. A contrasting color and a modestly heavier line can make the benchmark visible without competing with the data. If the line has markers, set the marker option to None when markers are not useful.
Give the series a meaningful name, because that name appears in the chart legend. You can rename the source-data heading or edit the series name through Select Data. A text label such as Target: 100 can be clearer than a generic label, especially if the chart contains several reference series. Consider adding a short note or chart subtitle to explain the benchmark and its units.
Check the value axis after formatting. Excel may choose an axis maximum that leaves little room above the line, or a minimum that makes differences look more dramatic than intended. You can right-click the value axis, choose Format Axis, and review its bounds. Avoid setting bounds in a way that hides relevant data or exaggerates small changes.
Common problems and what to check
- The target appears as columns: The series inherited the chart’s column type. Open Change Chart Type and assign Line to the target series.
- The line stops early: The target series probably has fewer values than the category list, or the chart’s source range omits later rows. Check Select Data and extend the series values and category labels together.
- The line is diagonal: The target values are not all equal, or they are in the wrong order. Check the source cells and confirm each category has the intended benchmark.
- The line seems to be missing: It may be outside the visible axis bounds, hidden behind another series, formatted with no line, or plotted on a secondary axis with a different scale. Check the target values, axis bounds, series formatting, and axis assignment.
- The line does not match the category labels: In Select Data, verify that the target values align row by row with the same category labels as the actual series. Blank rows or an incorrectly selected range can shift the apparent alignment.
- The chart is a PivotChart: PivotCharts are controlled by their PivotTable field layout, so adding a regular series through Select Data may not work as it does on a standard chart. Add a suitable field or data to the PivotTable source, or make a regular chart from a separate summary range if you need a freely defined target series.
A frequent misconception is that the chart’s built-in trendline is the right way to show a fixed target. A trendline estimates a pattern in the plotted data; it is not a set-value benchmark. Likewise, a chart title or axis maximum does not create a reference line. Use a constant data series when the line must represent a specific value.
When a drawn shape is a reasonable alternative
For a quick presentation annotation that does not need to track a value, choose Insert > Shapes > Line and draw across the chart. Holding Shift while drawing can help constrain the line to a horizontal direction. This is useful for a one-off visual mark, but it does not connect to cells. If the chart is resized, its data range changes, or the axis scale is adjusted, the shape may no longer indicate the intended value. For a line that must remain accurate, use a data series instead.
Frequently Asked Questions
Can I add a horizontal line to an Excel chart without changing the source data?
You can draw a line with Insert > Shapes > Line, but it is only an overlay and is not tied to a numeric value. For an accurate reference line that responds to chart changes, add a target series to the chart data.
How do I add a horizontal line to a bar chart?
In Excel, a bar chart has horizontal bars, so its value axis is usually horizontal. A constant value on that axis appears as a vertical reference line, not a horizontal one. If you want a horizontal benchmark across categories, a column chart or line chart may match that visual goal better.
Why is my target line sloping?
Check that every target cell contains the same numeric value and that the values line up with the correct categories. A blank, different number, or misaligned range can make the series slope or appear discontinuous.
Can the target line have a label?
Yes. Give the series a descriptive name so it appears correctly in the legend. You can also add a data label to a point in the series, but label options and layout can vary; avoid labeling every point if repeated labels make the chart hard to read.
Do the steps differ on Mac or Excel for the web?
Excel for Mac has chart design and data-selection controls with similar purposes, although some dialog layouts and labels can differ. Excel for the web supports common chart editing, but if a required combo-chart or series-formatting option is unavailable, open the workbook in the desktop version of Excel.
Related
- Change Date Format in Excel: General Format Explained
- Excel Date Format: Change Defaults and Cell Settings
- How to Change Date Format in an Excel Column Easily
Try it: the Percentage Formula Generator: percent of, percent change, increase and decrease, with the formula.
More in Charts & pivot tables
- Excel Pivot Chart Multiple Lines: How to Create ThemYes. To show multiple lines in an Excel PivotChart, create a PivotChart from your PivotTable, choose a line…
- Excel Chart Legend Icons: How to Make Symbols BiggerYes—Excel can make chart legend icons look bigger, but it does not provide a separate control for setting…
- Excel Pivot Chart Slicers: How to Add and Use ThemAn Excel PivotChart slicer is a set of clickable filter buttons for a PivotTable and its connected PivotChart.…
- Excel Chart Axis Range: Set Minimum and Maximum ValuesTo change an Excel chart’s numeric axis range in Microsoft 365 for Windows, select the chart axis, right-click…
- Google Sheets: How to Create and Customize a GraphTo create a graph in Google Sheets, select the cells containing your data, including their labels, then choose…
- Excel Pie Chart: Display Percentages on Your ChartTo create an Excel pie chart that shows percentages, select the category names and values, choose Insert >…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.