How to add a Horizontal Line to a Scatterplot in Excel

In Microsoft Excel, a horizontal line can be added to a scatterplot by creating a new data series of type ‘XY (Scatter)’ with the x- and y-values of the desired line. This data series should be plotted as a line graph on the same chart as the original scatterplot. This will add a horizontal line to the scatterplot that can be customized further via formatting options.


Occasionally you may want to add a horizontal line to a scatterplot in Excel to represent some threshold or limit.

This tutorial provides a step-by-step example of how to quickly add a horizontal line to any scatterplot in Excel.

Step 1: Create the Data

First, let’s create the following fake dataset:

Step 2: Create the Scatterplot

Next, highlight the data in the cell range A2:B17 as follows:

Along the top ribbon, click Insert and then click the first chart in the Insert Scatter (X, Y) or Bubble Chart group within the Charts group. The following scatterplot will automatically appear:

Step 3: Add a Horizontal Line

Now suppose we would like to add a horizontal line at y = 20.

To do this, we can create a fake data series that shows the minimum and maximum value along the x-axis (0 and 20) as well as two y-values that are both equal to 20:

Next, right click anywhere on the chart and click Select Data. In the window that appears, click Add under the Legend Entries (Series) section.

In the new window that appears, fill in the following information:

Right click on one of the orange dots and click Format Data Series…

In the window that appears on the right side of the screen, click Solid Line:

This will turn the two orange points into a solid orange line:

Add horizontal line to scatterplot in Excel

Feel free to modify the color, thickness, and style of the line to make it more aesthetically pleasing.

If you would like to add multiple horizontal lines to a single chart, simply repeat this process using different y-values.

Related: How to Add Average Line to Bar Chart in Excel

x