How to Make a Line Graph in Excel With Data in a Few Steps

Charts & pivot tables · Updated November 18, 2026

To make a line graph in Excel, arrange your data in columns with time periods or other categories in the first column and one or more numeric series in the next columns. Select the data, then choose Insert > Insert Line or Area Chart and pick a line style. Add a title and check that the horizontal axis and data series are assigned correctly. A line graph is useful for showing how values change across an ordered sequence, such as months, dates, or stages.

The steps below are for Microsoft Excel for Microsoft 365 on Windows. Before charting, make sure each column has a clear heading, the values are stored as numbers, and the categories are in the order you want readers to see. Excel for Mac and Excel for the web offer similar chart tools, although ribbon placement and some formatting options can differ.

What You’ll Need

  • An Excel workbook with your data entered in a rectangular table: one column for the horizontal-axis labels and at least one column of numeric values.
  • A clear idea of what the chart should communicate, including the time period or category sequence and which values you want to compare.
  • Excel for Microsoft 365 on Windows, or Excel for Mac or the web. The core process works in all three, though the interface may look slightly different.

Step-by-Step

  1. Lay out the data with labels and series headings. Put the ordered categories in the leftmost column and each set of values in its own column. For example, enter Month in A1, Website visits in B1, and Store visits in C1. Put Jan, Feb, Mar, and Apr in A2:A5, then enter the matching visit counts below each heading. This structure tells Excel that the first column is the horizontal axis and each additional column is a separate line. Use one row per time period or category, and avoid inserting a blank row inside the data.

    Use real Excel dates if the categories are dates, rather than typing date-like text. You can format those cells to show a short month name or another readable date format. Keep the values in each series consistent in meaning and units: comparing visits with revenue on the same axis, for example, may make the lines difficult to interpret.

  2. Check and select the full data range. Click the top-left heading cell, then drag to the bottom-right value cell so the selection includes the headings and every category and value. In the example, select A1:C5. Including the headings helps Excel name the lines in the legend; including the category labels gives the horizontal axis meaningful labels. If your data is in an Excel table, you can select any cell in it, but check that the chart uses all intended columns and rows.

    Look over the selection before continuing. A missing final row can silently leave out the latest period, while selecting a totals row may create a misleading spike. If your data is spread across separated ranges, it is usually easier to copy it into one continuous table first.

  3. Insert a line chart. On the ribbon, select Insert > Insert Line or Area Chart. Under 2-D Line, choose Line for lines without point symbols, or Line with Markers to show a symbol at each data point. For a small number of observations, markers can make individual values easier to identify. For a long series with many closely spaced values, a plain line is often less cluttered. Excel adds a chart to the worksheet based on the selected range.

    On Excel for Mac, use the Insert tab and choose a line chart from the chart options; the exact button layout can vary by window size. Excel for the web also has chart insertion on the Insert tab. If you do not see the full ribbon label, look for the chart menu or its line-chart choices rather than choosing a scatter chart by mistake.

  4. Confirm that Excel has interpreted the rows and columns correctly. The category labels should appear along the bottom, and each numeric column should appear as its own line. If you see one line per row, or the labels and series are reversed, select the chart and choose Chart Design > Switch Row/Column. Review the legend and horizontal-axis labels afterward; the correct arrangement is the one that matches the story your data is meant to tell.

    If the chart is missing labels or lines, select Chart Design > Select Data to inspect the chart data range and series. In the Select Data Source window, you can edit which cells supply the chart, series names, and category labels. This is particularly useful if you added new rows after creating the chart or selected the wrong range at first.

  5. Add a descriptive chart title. Select the chart, then choose Chart Design > Add Chart Element > Chart Title > Above Chart. Click the title box and replace the default wording with a short description, such as Monthly Website and Store Visits. A useful title tells readers what is being measured and, when it is not obvious, the period covered. Avoid leaving the title as Chart Title or using a vague label such as Results.

    For a chart with multiple series, keep the legend visible so readers can identify each line. If only one series is shown, the legend may take up space without adding information; you can select it and remove it. Make sure the title and legend do not overlap the plotted data.

  6. Label the axes when the meaning is not self-evident. With the chart selected, choose Chart Design > Add Chart Element > Axis Titles, then add a primary horizontal or primary vertical title as needed. Use labels such as Month and Number of visits, rather than repeating a long sentence. The vertical-axis title should include units when they matter, such as Dollars or Temperature in °C. Remove an axis title if the chart title and labels already make the meaning unmistakable.

    Excel may treat dates as a date axis and space them according to time. This is usually helpful for a continuous timeline. If the categories are names or evenly spaced stages rather than dates, Excel may show them as equally spaced text labels. Check the axis before assuming the chart represents elapsed time proportionally.

  7. Improve readability with careful formatting. Drag a chart corner to resize it, leaving enough room for its title, axis labels, and legend. Use distinct line colors that are easy to tell apart, and avoid relying on color alone if the graph will be printed in grayscale. To format a line, select it and use the Format Data Series pane. You can adjust its color, width, or marker options without changing the underlying worksheet values.

    Keep the chart background simple and the gridlines subtle. A vertical axis that starts at zero is often suitable for counts and amounts because it shows the scale honestly, but a narrow range can be useful for showing small changes in some measurements. If you change the axis bounds, make the scale clear and avoid exaggerating differences. To adjust bounds, right-click the vertical axis, choose Format Axis, and set the options under Axis Options.

  8. Review the finished graph and keep it connected to the data. Compare each plotted point with the worksheet values and confirm that the earliest and latest categories are present. Check whether the series names, axis units, and date order are correct. If you change a value in the source range, the chart should update automatically. When you add more rows, confirm that the chart range expands; a chart based on an ordinary fixed range may not include new entries automatically. Saving the workbook preserves both the chart and its source data.

    For a chart you will share, place it near the relevant data or move it to its own chart sheet using Chart Design > Move Chart. A separate chart sheet can be useful for presentations or printing, while an embedded chart is convenient when readers need to compare it with the source table.

Common Mistakes

Selecting only the numbers. Without the heading row and category column, Excel may create generic series names and numeric category labels. Select the complete table, including headings, before inserting the chart.

Using a line chart for unordered categories. A line connects points in sequence, so it implies continuity or progression. It works well for time or an ordered process. If you are comparing unrelated groups, such as product types with no meaningful order, a bar or column chart may communicate the comparison better.

Mixing incompatible scales or units. If one series has values in the hundreds and another in the millions, the smaller series may look flat. Check whether the series should be charted separately or whether a secondary axis is appropriate. A secondary axis can be harder to read and should be labeled clearly; do not add one just to make every line look prominent.

Leaving blanks, text, or errors in the values. A number stored as text may not plot as expected, and blank cells can create gaps. Check the source cells, remove accidental spaces, and decide whether a missing observation should remain blank or be represented by a valid value. Do not replace missing data with zero unless zero is genuinely what was measured.

Adding too many series. A chart with many overlapping lines can become unreadable even when all data is correct. Limit the graph to the comparisons that matter, or split the information into separate charts. Use clear series headings rather than depending on a complicated legend.

Tips

Sort time-based data from earliest to latest before charting. A line chart follows the order of the source rows, so dates entered out of sequence will produce a line that moves backward and forward in time. For categories, choose an order that helps explain the comparison, and preserve that order in the worksheet.

Use consistent intervals where possible. If you have one measurement per month, include each month, even if a value is missing, and decide how to show the gap. If observations are irregularly spaced in time and the actual distance between dates matters, a line chart may space categories evenly rather than proportionally. An XY (Scatter) chart can be a better fit when you need the horizontal position to reflect numeric date or measurement intervals.

Keep the number of colors and decorative effects low. A direct, readable title, clear axis units, and a concise legend usually do more for comprehension than shadows, 3-D effects, or heavy borders. If the chart will be printed, check the contrast and make sure each line remains distinguishable without color.

When your source is likely to grow, format it as an Excel table before creating the graph. Select the data and choose Home > Format as Table, then confirm whether the table has headers. Charts based on tables can include added table rows as the table expands, though it is still worth checking the chart range after adding data.

Troubleshooting

The chart appears blank or has no useful lines: Check that the selected range includes numeric values and that those cells are not stored as text. Select the chart, open Chart Design > Select Data, and confirm that the chart data range points to the intended cells. Also check whether a filter or hidden rows are affecting which points are displayed.

The months or category labels are on the wrong axis: Choose Chart Design > Switch Row/Column and inspect the result. If that does not fix it, use Chart Design > Select Data to set the horizontal-axis labels and series ranges directly. Make sure the first column contains the labels you expect, rather than a second numeric series.

The chart does not include new rows: Open Chart Design > Select Data and expand the chart data range to cover the added entries. If the source is an Excel table, add the new data directly below the table and check that the table expanded. A chart based on a fixed cell range will not necessarily include rows entered outside that range.

The horizontal axis shows numbers instead of dates or months: Verify that the source cells contain real dates or the intended category text, and confirm the axis-label range in Select Data. If the dates are valid but the display is too detailed, right-click the axis, choose Format Axis, and review the axis options and number format. If Excel has interpreted the labels as a value series, correct the selected range or switch rows and columns.

The line has gaps or unexpected drops: Inspect the source cells for blanks, zeros, errors, or values entered as text. To control how blanks appear, select the chart and use Chart Design > Select Data > Hidden and Empty Cells. The available options can vary by chart and Excel version. Choose a gap, zero, or connected-line display only when it accurately reflects what the missing observation means.

The series look flattened or hard to compare: Check the vertical-axis bounds and the scale of each series. If the values differ greatly, consider using separate charts or clearly labeled units rather than obscuring the difference. Right-click the vertical axis and select Format Axis to review its bounds. Avoid setting a tight scale without making that choice apparent to readers.

Frequently Asked Questions

What is the difference between a line graph and a scatter plot in Excel?
A line graph connects values in category order, which is useful for showing change over time or across ordered stages. An XY (Scatter) chart positions points according to numeric horizontal values, so it is preferable when the spacing between measurements matters.

Can I show more than one line on an Excel graph?
Yes. Put each series in a separate numeric column with its own heading, select the full range, and insert a line chart. Excel uses the column headings for the legend. If the lines are difficult to distinguish, use fewer series or adjust their formatting.

How do I change the data used by a line chart?
Edit the source cells to update plotted values, or select the chart and choose Chart Design > Select Data to change its range, series, or horizontal-axis labels. If the chart omits added rows, expand the range or use a source formatted as an Excel table.

How do I make a line graph with dates in Excel?
Enter actual dates in the first column and the measurements beside them, then select the complete range and insert a line chart. Sort dates from earliest to latest. If the horizontal axis is confusing, check the label range and use Format Axis to review how Excel displays the dates.

Should a line chart start at zero?
It depends on the data and the message. Starting at zero is often useful for counts and amounts because it shows the full scale. A narrower scale can help reveal small changes, but it may visually exaggerate them; label the axis clearly and use bounds that do not mislead.

Can I make a line graph in Excel for Mac or the web?
Yes. Both versions provide line-chart options on the Insert tab. The ribbon layout and some chart formatting controls may differ from Excel for Microsoft 365 on Windows, but the same data layout and chart-selection principles apply.

Related

Try it: the Percentage Formula Generator: percent of, percent change, increase and decrease, with the formula.

More in Charts & pivot tables

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.