Adding a horizontal line to your Excel graph
A horizontal line in an Excel graph marks a target, average, or threshold — something your data should reach or stay below. Excel calls this a reference line, and you add it by creating a second data series that stays flat across your chart. The simplest method uses a helper column with the same value repeated, then plots that column as a line on top of your existing bars or points.
This takes about three minutes once you know the steps. The line will update automatically if your data changes, and you can format it to be thick, thin, dashed, or any color you need.
Key Takeaways
- A horizontal reference line requires a helper column with the same number repeated in every row, placed next to your existing data.
- You add the helper column to your chart as a second data series, then format it as a line while keeping your original data as bars or points.
- The line will sit on top of your chart and move with your data if you add or change rows.
- You can make the line any color, thickness, or style — dashed lines work well for targets or thresholds.
Set up a helper column with your target value
Open your spreadsheet and look at the data you have already charted. You need a new column next to it that will hold the number where you want the horizontal line to appear. If your chart shows sales by month and you want a line at 50,000 to mark your target, you will create a column with 50,000 in every row.
Click on an empty column header next to your data — usually the column right after your last data column. Type a label like "Target" or "Goal" in the header cell. Then click the cell directly below and type the number where you want the line. For example, if your target is 50,000, type 50000. Now click that same cell and copy it down to match every row of data you have. The fastest way is to click the cell, copy it (Ctrl+C on Windows, Command+C on Mac), then select the range below it and paste (Ctrl+V or Command+V). Every cell in that column should now show the same number.
Select your data range including the new column
Highlight all your data, including the new helper column. Click the first cell of your original data (usually the top-left corner of your table) and drag to the last cell of your helper column. Make sure you include the headers — the row with "Month," "Sales," "Target," or whatever your labels are.
If your data is scattered or you want to be precise, click the first cell, hold Shift, and click the last cell. Excel will select the entire rectangle between them. You should see a blue highlight covering all your data and the new helper column.
Insert a chart or edit your existing one
If you do not have a chart yet, go to the Insert menu and click Chart. Excel will open a dialog and ask what type of chart you want. Choose Column, Bar, or Line — whichever matches your data. Click Next or Finish depending on your Excel version, and Excel will create a basic chart.
If you already have a chart, double-click it to enter edit mode. You will see a gray border around the chart and the spreadsheet cells will show colored outlines marking which data the chart is using. If your helper column is not already in the chart, you need to add it. Right-click the chart and select "Select Data" (or "Data" depending on your version). A dialog will open showing which columns are included. Click "Add" and select your helper column, then click OK.
Change the helper column to a line format
Your chart now shows your original data (bars, points, or lines) and your helper column as the same type. You need to change the helper column to a line. Right-click on one of the bars or points from your helper column — the ones that should become your horizontal line. A menu will appear. Look for "Change Series Chart Type" or "Format Data Series." Click it.
A dialog will open showing different chart types. Find "Line" in the list on the left and click it. You will see line options appear on the right. Choose the basic line option (not a scatter plot or area chart). Click OK. Your helper column should now appear as a line running across your chart at the value you entered.
Format the line to make it visible and distinct
The line may be thin or the same color as your other data, making it hard to see. Right-click the line itself and select "Format Data Series" or "Format Data Point." A panel will open on the right side of your screen (or a dialog, depending on your Excel version).
Look for the line color option and click it. Choose a color that stands out — red for a threshold, green for a target, or black for a neutral reference. Then find the line width or thickness setting and increase it so the line is clearly visible. You can also make it dashed by looking for a line style option and choosing a dashed pattern. Click outside the chart when you are done, and your horizontal reference line is complete.
Troubleshooting common problems
If your line does not appear, check that your helper column has the same number in every row. A single blank cell or a different value will break the line. Also make sure the helper column is included in your chart's data range — if you added it after creating the chart, you may need to manually add it using the Select Data dialog.
If the line is hard to see, it may be behind your bars or points. Right-click the line and look for a "Send to Back" or "Bring to Front" option. Usually you want the line in front so it sits on top of your data. If the line is still invisible, check its color — it may be the same as your chart background. Change it to a contrasting color and increase the thickness.
Frequently Asked Questions
Can I have more than one horizontal line on the same chart?
Yes. Create a second helper column with a different target value, add it to your chart as another data series, and format it as a line. You can have as many reference lines as you need, each a different color or style to show different thresholds or goals.
What if I want the line to cover only part of the chart, not the whole width?
A helper column with the same value in every row will always span the full width. If you need a line that covers only certain months or categories, use a scatter plot instead of a column chart, or manually draw a line using Excel's drawing tools (Insert > Shapes > Line).
Does the line update if I change my data?
The helper column does not update automatically — it stays at the value you entered. If you change your original data, the line stays in the same place. If you want to change where the line appears, edit the numbers in your helper column.
Can I make the line dashed or dotted?
Yes. Right-click the line, select "Format Data Series," and look for the line style option. You will see choices like solid, dashed, dotted, and dash-dot. Dashed lines work well for targets or thresholds because they look different from your actual data.
Why does my line look jagged instead of flat?
This usually means your chart type is set to a scatter plot or XY chart, which connects points based on position rather than category. Change the chart type to Column or Bar, or make sure your helper column is formatted as a line on a column or bar chart, not a scatter chart.