The basic steps to build a line graph in Excel
A line graph in Excel starts with your data in two columns — one for the labels (like months or dates) and one for the numbers you want to track. Select both columns including the headers, click the Insert tab at the top, find Line Chart in the Charts group, and pick the line chart style you want. Excel will draw the graph automatically. You can then move it, resize it, and change the title by clicking on the chart and typing.
The whole process takes about 30 seconds once your data is arranged. The hardest part is usually getting your data into the right shape first — two columns, no blank rows in the middle, headers at the top.
Key Takeaways
- Arrange your data in two columns: one for labels (dates, months, names) and one for the numbers you want to show.
- Select both columns including headers, go to Insert, click Line Chart, and choose your style.
- Click the chart to select it, then right-click to change the title, axis labels, or data range if you made a mistake.
- If your graph looks wrong, the most common cause is blank rows or extra columns in your data — delete those and the chart will update automatically.
Preparing your data so the chart reads it correctly
Excel needs your data in a specific layout. Put your category labels (the things you are measuring across — months, years, product names, locations) in the first column. Put the numbers you want to graph in the second column. Include a header row at the very top with names like "Month" and "Sales" or "Date" and "Temperature".
Do not leave blank rows between your data. Do not put extra information to the side. If you have multiple sets of numbers to compare (like sales from two different stores), put each set in its own column — so you would have Month, Store A, Store B. Excel will automatically draw multiple lines, one for each store.
Once your data is clean, select from the first cell of your headers all the way down to the last number. You can click the first cell and drag to the last one, or click the first cell, hold Shift, and click the last cell.
Inserting the chart and choosing a line style
With your data selected, click the Insert tab in the ribbon at the top of Excel. Look for the Charts section. You will see a small icon that looks like a line graph — click it or click the small arrow next to it to see options.
Excel offers several line chart types. The most common is Line with Markers, which shows a dot at each data point so you can see exactly where your numbers sit. Line without markers is cleaner if you have many data points. Stacked Line is useful if you want to show how different categories add up to a total. Pick the one that matches what you are trying to show, and click it.
Excel will place the chart on your sheet. It may cover some of your data — that is normal. Click the chart and drag it to a blank area if you need to see your numbers again.
Changing the title and labels so the graph makes sense
Your new chart probably says "Chart Title" at the top. Click directly on those words and type a real title — something like "Monthly Website Traffic" or "Temperature by Week". Press Enter when you are done.
The bottom of the chart shows your category labels (the months or dates from your first column). The left side shows the scale for your numbers. If these are hard to read or wrong, right-click the chart and select Edit Data. A small window will open showing your data range. If the range is wrong, you can fix it there and the chart will update.
To add labels to the axes themselves (like "Month" on the bottom and "Sales in Dollars" on the left), right-click the chart, select Add Chart Element, and choose Axis Titles. Click the axis you want to label and type the label name.
Fixing common problems when your chart looks wrong
If your line graph shows a jagged mess instead of a smooth trend, your data probably has blank cells or text mixed in with numbers. Go back to your data and delete any blank rows. Make sure every cell in your number column contains only a number, not text like "5 units" — just "5".
If the lines are in the wrong order or you are missing a line entirely, right-click the chart and select Edit Data. The data range window shows which columns Excel is reading. If you included an extra column by accident, shrink the range by dragging the blue border. If you forgot a column, expand it.
If your numbers look tiny or huge compared to the scale, the axis range may be set wrong. Right-click the numbers on the left side of the chart and select Format Axis. Under Axis Options, you can set the minimum and maximum values yourself instead of letting Excel guess.
Moving and resizing your chart on the sheet
Click the chart once to select it — you will see a border around it with small squares at the corners and edges. Drag the chart by its border to move it to a different spot on your sheet. Drag one of the corner squares to resize it while keeping the same proportions, or drag an edge square to stretch it in one direction.
If you want to print just the chart without your data, you can copy it and paste it into a new sheet or into another program like Word or PowerPoint. Right-click the chart, select Copy, then paste it wherever you need it.
Saving your chart as part of your file
Your chart is saved automatically when you save your Excel file. The chart stays attached to the sheet it is on — if you delete the data, the chart disappears too. If you want to keep the chart but change the data, make sure to save a copy of your file before you edit the numbers.
If you want to use this chart in a presentation or report, you can right-click it and select Copy, then paste it into Word, PowerPoint, or Google Docs. The chart will paste as an image that you can move and resize, but it will not update if you change the Excel numbers later — it is a snapshot of what the chart looked like when you copied it.
Frequently Asked Questions
Can I make a line graph from data in different sheets?
Yes, but it is easier to copy all your data into one sheet first. If you want to reference another sheet, right-click the chart, select Edit Data, and manually type the range using the sheet name — for example, Sheet2!A1:B10. Most people find it simpler to just copy the data to one place.
How do I add a second line to show two different sets of numbers?
Add a third column to your data with a header and numbers, then select all three columns (labels plus both number columns) before inserting the chart. Excel will draw two lines automatically, one for each number column. You can right-click the chart and select Edit Data to add or remove lines later.
What if my dates are not showing up in the right order?
Excel may be reading your dates as text instead of actual dates. Make sure the date column contains real dates (formatted as dates in Excel, not typed as text like "1/1/2024"). Right-click the chart, select Edit Data, and check that your date range is included. If dates still look wrong, right-click the bottom axis, select Format Axis, and change the axis type from Text to Date.
Can I change the colors of the lines?
Yes. Right-click the line itself (not the chart background), select Format Data Series, and choose a new color under Line Color. You can also change the line thickness or style (solid, dashed, dotted) in the same menu. Each line can have its own color and style.
How do I delete a chart I do not want anymore?
Click the chart once to select it, then press Delete. The chart disappears but your data stays. If you delete it by accident, press Ctrl+Z (or Cmd+Z on Mac) to undo.