How to Make and Format a Line Graph in Excel

When you just need a line, there are simple tips to use

What to Know

  • Highlight the data you want to chart. Go to Insert > Charts and select a line chart, such as Line With Markers. Click Chart Title to add a title.
  • To change the graph's colors, click the title to select the graph, then click Format > Shape Fill. Choose a color, gradient, or texture.
  • To fade out the gridlines, go to Format > Format Selection. Click a horizontal gridline, then change the transparency to 75%.

This article explains how to add a line graph to a Microsoft Excel sheet or workbook to create a visual representation of the data, which may reveal trends and changes that might otherwise go unnoticed. Instructions cover Excel 2019, 2016, 2013, 2010, and Excel for Microsoft 365.

Make a Basic Line Graph

The steps below add a simple, unformatted graph that displays only the lines representing the selected series of data, a default chart title, a legend, and axes values to the current worksheet.

Excel spreadsheet with a data table and a line chart.
  1. Enter the data in cells A1 to C6.

    Table of data in Excel.
  2. Highlight the data, including row and column headings.

  3. Click on the Insert tab of the ribbon.

    Excel's Insert tab on the Ribbon.
  4. In the Charts section of the ribbon, click on the Insert Line Chart icon to open the drop-down list of available chart and graph types.

  5. Hover your mouse pointer over a chart type to read a description.

    Excel's line chart type drop-down menu.
  6. Click 2D line.

  7. The chart will appear on your spreadsheet. Click and hold to move the chart to the right, away from the data table.

Add the Chart Title

When you insert a chart, its default title is "Chart Title." It doesn't carry over the title from your table, but you can easily edit the chart title.

  1. Click once on the default chart title to select it. A box should appear around the words Chart Title.

    Excel line chart with Chart Title selected.
  2. Click a second time to put Excel in edit mode, which places the cursor inside the title box.

  3. Delete the default text using the Delete or Backspace keys on the keyboard.

    Excel line chart with new title.
  4. Enter the chart title into the title box.

Change the Chart's Colors

You can change the chart's colors including the background color, text color, and graph lines.

  1. Click next to the chart title to select the entire graph.

  2. Click the Format tab of the ribbon.

  3. Click the Shape Fill option to open the Fill Colors drop-down panel. Choose a color, texture, gradient, or texture to fill the background.

    Excel's shape fill options.
  4. Stay on the Format tab and click the Text Fill option to open the Text Colors drop-down list. Choose the color you want to use. All the text in the title, x- and y-axes, and legend should change.

    Excel's text fill options.
  5. You can change the color for each line in the graph individually.

  6. Click once on a line to select it.

    Excel line graph with one line selected.
  7. Small highlights should appear along the length of the line. On the Format tab click the Format Selection option to open the Formatting task pane.

  8. Then click the Fill icon (the paint can) in the task pane to open the Line options list.

    Format Data Series pane with fill icon (bucket).
  9. Scroll down to color and click the down arrow next to it to open the Line Colors drop-down list.

    Excel line color options.
  10. Click on the color you want to use for the line. Repeat for the other lines, if desired.

Fade out the Gridlines

Finally, you can also change the formatting of the gridlines that run horizontally across the graph.

The line graph includes these gridlines by default to make it easier to read the values for specific points on the data lines.

They do not, however, need to be quite so prominently displayed. One easy way to tone them down is to adjust their transparency using the Formatting Task pane.

By default, their transparency level is 0%, but by increasing that, the gridlines will fade into the background where they belong.

  1. Click on the Format Selection option on the Format tab of the ribbon to open the Formatting Task pane.

  2. In the graph, click once on one of the horizontal gridlines running through the middle of the graph. There should then be blue dots at the end of each gridline.

    Format Gridlines options in Excel.
  3. In the pane change the transparency level to 75% – the gridlines on the graph should fade significantly.

Avoid Clicking on the Wrong Part of the Chart

There are many different parts to a chart in Excel – such as the chart title and labels, the plot area that contains the lines representing the selected data, the horizontal and vertical axes, and the horizontal gridlines.

All of these parts are considered separate objects by the program so that you can format them separately. You tell Excel which part of the graph you want to format by clicking on it with the mouse pointer to select it.

If your graph doesn't look like those pictured in this article, it is likely that you did not have the right part of the chart selected when you applied the formatting option.

The most common mistake is clicking on the plot area in the center of the graph when the intention is to select the entire chart.

The easiest way to select the entire graph is to click in the top left or right corner away from the chart title.

If you make a mistake, it can be quickly corrected using Excel's undo feature. Then, click the correct part of the chart and try again.

Was this page helpful?