How to Add a Horizontal Line in an Excel Graph

Adding a horizontal line to an Excel graph is one of those tricks that looks simple but opens up a surprising amount of flexibility depending on what you're trying to show. Whether it's a target value, an average, a threshold, or a benchmark, a horizontal reference line gives your chart immediate visual context — readers can see at a glance whether data is above or below a meaningful mark.

Here's how it works, what factors shape the process, and why the right approach depends on your specific chart setup.

Why Add a Horizontal Line to a Chart?

A horizontal line in a chart acts as a reference marker. Common use cases include:

  • Showing a sales target so actual monthly figures can be compared against it
  • Displaying an average line across a time series
  • Marking a threshold or limit (like a maximum acceptable error rate or minimum performance score)
  • Highlighting a baseline for before/after comparisons

Excel doesn't have a one-click "add reference line" button the way some dedicated BI tools do. Instead, you create the line by adding a secondary data series to your chart and formatting it to appear as a flat horizontal line.

The Core Method: Adding a Constant-Value Data Series

The most reliable and widely compatible approach works across Excel for Windows, Mac, and Microsoft 365.

Step 1: Create the Reference Data

In your spreadsheet, add a new column or row representing your horizontal line value. For every data point on the X-axis, enter the same constant value — the number you want the line to sit at.

For example, if your chart shows 12 months of data and your target is 500:

MonthSalesTarget
Jan420500
Feb480500
Mar510500
......500

Every cell in the Target column holds the same number. This is what creates a flat, horizontal line when plotted.

Step 2: Add the New Series to Your Chart

Click on your existing chart to select it. Then:

  1. Right-click the chart area and choose "Select Data"
  2. Click "Add" in the Legend Entries (Series) section
  3. Set the series name (e.g., "Target") and point the series values to your new Target column
  4. Click OK

Your chart now shows the target as an additional data series — likely as bars or columns matching your original chart type.

Step 3: Change the New Series Chart Type

This is where the line takes shape. Right-click on the new series in the chart and select "Change Series Chart Type."

In the dialog:

  • Set the new series to Line (while your original data stays as Bar, Column, or whatever it was)
  • This creates a combo chart, which Excel handles natively

The result is a flat line running across the chart at your chosen value. 📊

Formatting the Horizontal Line

Once the line appears, you can format it to stand out clearly:

  • Line color: Use a contrasting color — red and orange are common for targets or limits
  • Dash style: A dashed line often signals "reference" rather than "actual data"
  • Line weight: Slightly thicker than default makes it more readable
  • Remove markers: Right-click the line series → Format Data Series → Marker Options → None

To remove the line from the chart legend if it clutters the visual, click the legend entry for that series and press Delete.

Alternative: Using the Average Function Dynamically

If you want the horizontal line to represent the average of your actual data — and update automatically as data changes — skip the manual constant column and use a formula instead.

In your reference column, enter:

(adjusted to your actual data range)

Copy this formula down the entire column. Now every cell in that column holds the same dynamic average, and the horizontal line will recalculate whenever your source data changes. This is especially useful for rolling dashboards or reports that get refreshed regularly.

Factors That Affect How This Works in Practice

Not every setup behaves identically. A few variables that shape your experience:

Chart type compatibility — Combo charts (mixing line and bar/column) work smoothly in most Excel versions, but 3D chart types don't support mixed series types. If your chart is 3D, you'd need to switch to a 2D version first.

Excel version — Older versions (pre-2013) handle combo charts less gracefully. The "Change Series Chart Type" dialog is more fully featured in Excel 2016 and later, and the Microsoft 365 version has the most intuitive interface for this.

Scatter charts — If your original chart is an XY Scatter rather than a Line or Column chart, the method is slightly different. You'd add a two-point series with explicit X and Y coordinates to draw the line, rather than matching every data point in the series.

Dynamic vs. static values — A hardcoded constant works fine for fixed targets, but if your benchmark changes over time, a formula-driven approach (or even a named range) reduces maintenance.

Axis scale — If your reference line value falls outside the default axis range, Excel may auto-scale in a way that makes the line appear at the very top or bottom edge. Manually setting the axis minimum and maximum gives you control over how the line sits visually within the chart.

When the Approach Gets More Complex 🔧

Some scenarios require a different setup entirely:

  • Multiple reference lines (e.g., upper and lower control limits) each need their own data series
  • Horizontal lines that only span part of the chart — like a threshold that applies only to certain months — require truncated series with blank cells outside the relevant range
  • Annotations on the line (like a label showing "Target: 500") are added using data labels on the series, formatted to show only the series name or a custom value

Each of these adds a layer of data preparation before you touch the chart itself.

The right configuration ultimately depends on how your data is structured, which Excel version you're working in, and how much the chart needs to update on its own versus being a one-time visual. What's straightforward for a static monthly report looks quite different for a live dashboard pulling from external data.