What you need before you start

A line graph in Excel shows how something changes over time — sales by month, temperature by day, website visitors by week. You need two columns of data: one for the time periods (the horizontal axis) and one for the values you're measuring (the vertical axis). Excel will connect the dots with a line, making trends straightforward to spot at a glance.

Open the spreadsheet with your data already entered. The data doesn't have to be in any special format, but it should be in adjacent columns with headers at the top — for example, "Month" in column A and "Sales" in column B. If your data is scattered across the sheet or mixed with other information, move it to two clean columns first.

Key Takeaways

  • Select both columns of data including the headers, then go to Insert and choose Line Chart to create a basic graph in three clicks.
  • Excel automatically puts time periods on the horizontal axis and values on the vertical axis, but you can swap them if the graph looks wrong.
  • Right-click the chart to add a title, change the axis labels, or adjust the scale if the line looks too flat or too steep.
  • Save your spreadsheet after creating the chart — the graph is part of the file and will update if you change the data.

Selecting your data and inserting the chart

Click on the first cell of your first column (the header cell) and drag to select all the data in both columns. You should highlight the headers and every row of data you want to include. If your columns are far apart, hold Ctrl while clicking to select multiple non-adjacent ranges, but for a line graph you almost always want two columns next to each other.

With the data selected, go to the Insert tab at the top of the ribbon. Look for the Charts section — you'll see icons for different chart types. Click on Line Chart (it shows a small graph with a line going up and down). Excel will show you several line chart styles: a basic line, a line with dots at each point, a stacked line, and others. Choose the first option, which shows a straightforward line connecting your data points. Excel will insert the chart right into your spreadsheet.

Reading what Excel created

The chart appears as a box on top of your data. The horizontal axis (left to right) shows your time periods — months, dates, or whatever is in your first column. The vertical axis (bottom to top) shows your values, with numbers automatically scaled to fit your data. A line connects each point, showing the trend.

If the line looks backwards or the axes are swapped, right-click the chart and select Edit Data. A dialog box opens showing which column Excel assigned to which axis. Swap them if needed and click OK. This usually only happens if your data is arranged in an unusual way.

Adding a title and labeling the axes

Right-click the chart and select Add Chart Element. A menu appears with options including Chart Title, Axis Titles, and Legend. Click Chart Title and choose where you want it — usually "Above Chart" is clearest. Type a title that describes what the graph shows, like "Monthly Sales 2024" or "Daily Temperature."

Go back to Add Chart Element and select Axis Titles. Choose Primary Horizontal to label the time axis (for example, "Month") and Primary Vertical to label the value axis (for example, "Sales in Dollars"). These labels help anyone reading the graph understand what they're looking at without having to guess.

Adjusting the scale and appearance

If your line looks almost flat even though your data changes, the vertical axis scale might be too wide. Right-click the numbers on the vertical axis and select Format Axis. You can set a minimum and maximum value to zoom in on your data. For example, if your sales range from $8,000 to $12,000, set the minimum to 7,000 and maximum to 13,000 instead of letting Excel use 0 to 15,000.

If you want to change colors, line thickness, or the style of the dots, right-click the line itself and select Format Data Series. A panel opens on the right side with options for line color, width, and marker style. Keep changes subtle so the graph stays straightforward to read — a thicker line and a single solid color usually work better than multiple colors or patterns.

Moving and resizing the chart

Click the chart once to select it (you'll see a border around it). Drag it to move it to a different part of the sheet. Grab one of the corner handles and drag to resize it — make it wider if the axis labels are crowded, or taller if the line is hard to see.

If you want the chart on its own page, right-click it and select Move Chart. Choose "New sheet" and Excel will create a blank sheet with just the chart on it. This is useful if you're printing the graph separately or sharing it with someone who only needs to see the chart, not the raw data.

Updating the chart when data changes

If you edit the numbers in your original columns, the chart updates automatically. Add a new row of data to the bottom of your columns, and the line extends to include it. Delete a row, and the line adjusts. This live connection means you can build a spreadsheet that tracks something over time and watch the trend update as you add new information.

If you add data to the right of your original columns and want to include it in the chart, right-click the chart, select Edit Data, and expand the data range to include the new columns. Excel will add another line to the graph so you can compare multiple trends on the same axes.

Frequently Asked Questions

Can I show multiple lines on the same graph?

Yes. Select three or more columns — one for time periods and two or more for different values. When you insert the line chart, Excel creates a line for each value column. Each line gets a different color, and a legend on the side identifies which line is which. This is useful for comparing sales across regions or tracking multiple metrics over the same time period.

What if my data is in rows instead of columns?

Select the data anyway and insert the chart. Right-click the chart, select Edit Data, and look for a button that says "Switch Row/Column." Click it and Excel will flip the orientation so rows become columns. Your chart should then display correctly.

How do I remove the legend if I only have one line?

Right-click the chart and select Add Chart Element, then Legend. Choose "None" and the legend disappears. A single line doesn't need a legend since there's nothing to distinguish it from, so removing it gives you more space for the actual graph.

Can I change the line to a bar chart or area chart later?

Yes. Right-click the chart and select Change Chart Type. Pick a different style — bar, area, column, or others — and the same data displays in the new format. You can experiment with different chart types to see which one makes your trend easiest to understand.