The quickest way to add a horizontal line
To add a horizontal line to an Excel graph, right-click on the chart, select Edit Data, then add a new data series with the same value repeated for each category. Alternatively, you can insert a line shape directly onto the chart by going to the Insert tab, choosing Shapes, and drawing a line manually. The data series method is more precise if you need the line to align with specific values on your axis.
Excel does not have a built-in "add reference line" button, so most users choose between these two approaches depending on whether they want the line to move automatically if data changes (data series) or stay fixed in place (shape).
Key Takeaways
- A data series with constant values creates a horizontal line that updates if your chart data changes.
- Drawing a line shape gives you more control over placement but does not adjust automatically.
- The line's position depends on your chart's axis scale, so check your minimum and maximum values first.
- Horizontal lines are useful for showing targets, averages, thresholds, or benchmarks on your chart.
Adding a line using a constant data series
This method works in Excel 2016, 2019, 2021, and Excel Online. Start by preparing your data: in a blank column next to your existing data, enter the value where you want the horizontal line to appear. For example, if you want a line at 50, type 50 in every row of that column that corresponds to your chart categories.
Right-click on your chart and select Edit Data (or Select Data in some versions). Click Add under the data series section, then browse to the column you just created. Excel will add this as a new series to your chart. Right-click the new series and choose Change Chart Type, then select Line with no markers. The line will now appear horizontally across your chart at the value you specified.
If the line appears as a jagged series instead of a straight horizontal line, check that every cell in your reference column contains the exact same number. Even a single different value will cause the line to shift.
Drawing a line shape directly on the chart
For a quicker visual approach, use Excel's shape tools. Click on your chart to select it, then go to the Insert tab in the ribbon. Click Shapes and choose the line tool (usually labeled as a simple line or straight connector). Click and drag across your chart horizontally to draw the line where you want it.
Once drawn, right-click the line to format it. You can change the color, thickness, and style (solid, dashed, dotted). This method gives you complete freedom to place the line anywhere, but it does not adjust if your chart's scale changes or your data updates. You will need to redraw or reposition the line manually if that happens.
Positioning the line at the right value
Before adding your line, know exactly where it should sit on your chart's vertical axis. If you are showing a target of $100,000 and your axis runs from $0 to $200,000, the line should appear halfway up. If you are using the data series method, enter 100000 in your reference column. If you are drawing a shape, position it visually at that same spot.
Check your axis scale by clicking on the vertical axis numbers on your chart. Right-click and select Format Axis to see the minimum and maximum values. This ensures your line lands at the correct position relative to your data. A line that is off by even a small amount can mislead readers about what your data actually shows.
Formatting your horizontal line
Whether you used a data series or a shape, you can customize how the line looks. For a data series line, right-click it and choose Format Data Series. Adjust the line color under Line, increase the width to make it more visible, and choose a style (solid, dashed, or dotted). A dashed line often works well for reference lines so it does not compete visually with your actual data.
For a shape line, right-click it and select Format Shape. The options are similar: you can change the color, width, and dash style. You can also add a label by right-clicking the line and choosing Add Text, which lets you type something like "Target" or "Average" directly on the line.
Common uses for horizontal lines in charts
Horizontal lines help readers understand context. A line showing your sales target makes it clear whether actual sales exceeded or fell short of the goal. A line at the average value shows which months or regions performed above or below typical. A line at a regulatory threshold (like a safety limit or compliance standard) shows whether you are within acceptable bounds.
In financial charts, a break-even line at zero helps distinguish profit from loss. In performance dashboards, a line at your company's benchmark lets viewers see at a glance which teams are ahead or behind. The line does the work of explanation so your audience does not have to calculate it themselves.
Troubleshooting horizontal lines that do not appear straight
If your line appears diagonal or jagged instead of horizontal, the most common cause is inconsistent data in your reference column. Open your data table and verify that every cell contains the exact same number with no typos or extra spaces. Even 50 and 50.0 might display differently depending on your cell formatting.
Another cause is a secondary axis. If your chart uses both a primary and secondary vertical axis (common in combination charts), your line might be plotted against the wrong one. Right-click the line series and check Format Data Series to confirm it is on the correct axis. If it is on the secondary axis and should be on the primary, change it there.
Frequently Asked Questions
Can I add multiple horizontal lines to the same chart?
Yes. Using the data series method, create multiple reference columns with different constant values and add each as a separate series. Using shapes, draw as many lines as you need. Multiple lines work well for showing a range (upper and lower limits) or comparing several benchmarks at once.
Will the line move if I change my chart's axis scale?
A data series line will stay at its original value, so if you rescale the axis, the line position relative to the axis will change. A shape line stays in the same visual position on the chart regardless of axis changes. Choose the method that matches your needs.
How do I add a label to my horizontal line?
For a shape line, right-click it and select Add Text, then type your label. For a data series line, add a text box near the line by going to Insert > Text Box, then type and position it manually next to the line.
Can I make the line extend beyond my data range?
A data series line only extends as far as your data categories go. A shape line can extend as far as you draw it. If you need a reference line that spans the full chart width but your data does not, the shape method is simpler.
What if my chart is a bar chart instead of a line chart?
Both methods work on bar charts. A data series line will appear on top of the bars, making it easy to see which bars exceed or fall short of the reference value. This is actually one of the most common uses for horizontal lines in business reporting.