The basic steps to make a line graph
To create a line graph in Excel, you select the data you want to chart, click the Insert tab, choose Line from the Charts group, and pick the line chart style you want. Excel then builds the graph and places it on your sheet. The whole process takes about 30 seconds once your data is ready.
The data needs to be organized in columns or rows. Your first column or row should contain the labels (like months or dates), and the columns next to it should contain the numbers you want to plot. Excel reads this structure automatically and puts labels on the horizontal axis and numbers on the vertical axis.
Key Takeaways
- Select all your data including headers before inserting a chart — Excel uses the first row or column as axis labels.
- Line charts work best when you have one label column (like dates or names) and one or more data columns with numbers to track over time.
- After you insert the chart, you can change the title, axis labels, and colors by right-clicking on each part and selecting Edit.
- If your data is in non-adjacent columns, select the first range, hold Ctrl, and click the other ranges before inserting the chart.
Preparing your data the right way
Line graphs need data arranged in a specific pattern. Put your category labels (the things you're measuring across, like months or dates) in the first column. Put your values (the numbers you want to track) in the columns to the right. Include a header row at the top that names each column.
For example, if you're tracking monthly sales, your first column might be Month (January, February, March) and your second column might be Sales ($5000, $6200, $7100). Excel will use "Month" as the horizontal axis label and "Sales" as the legend label for your line.
If you have multiple data series to show — say, sales for both Product A and Product B — add another column. Each column becomes a separate line on your graph. Keep all the data together in one rectangular block. Do not leave blank rows or columns in the middle of your data, because Excel will stop reading when it hits a gap.
Selecting data and inserting the chart
Click on the first cell of your data (usually the header in the top-left corner) and drag to the last cell that contains data. This selects the entire range. If your data is scattered across non-adjacent columns, click the first range, then hold Ctrl (or Cmd on Mac) and click each additional range you want to include.
Once your data is selected, go to the Insert tab at the top of the ribbon. In the Charts group, click Line. A menu appears showing different line chart styles: Line, Stacked Line, and 100% Stacked Line. Choose the first option (Line) for a standard line graph. Excel inserts the chart on your sheet immediately.
Changing titles and labels
When the chart first appears, it may have a generic title like "Chart Title" and axis labels that are hard to read. To change the title, click on the chart to select it, then click on the title text itself. Type a new title and press Enter.
To change the axis labels, right-click on the chart and select Edit Data. A dialog opens showing your data range. You can adjust which columns are used for labels and which are used for values. If you want to add a label to the vertical axis (like "Sales in Dollars"), click the chart, go to the Chart Design tab, click Add Chart Element, and select Axis Titles.
Adjusting colors and line styles
Right-click on one of the lines in your chart to change its color or thickness. A menu appears with formatting options. You can also double-click a line to open the Format Data Series panel, where you can adjust the line weight (thickness), color, and whether the line has markers (dots) at each data point.
If you have multiple lines and want to change them all at once, right-click on the chart background (not on a line) and select Format Chart Area. This opens options for the overall appearance. To change just one line, make sure you click directly on that line before right-clicking.
Moving and resizing your chart
Click on the chart once to select it. A border with handles appears around the edges. Drag the border to move the chart to a different location on your sheet. Drag any corner handle to resize the chart — drag a corner to keep the proportions, or drag an edge to stretch it in one direction only.
If you want the chart on a separate sheet by itself, right-click the chart, select Move Chart, and choose New Sheet. Excel creates a blank sheet and puts the chart there. This is useful if your chart is large or if you want to print it on its own page.
Common mistakes and how to fix them
The most common mistake is selecting data that includes blank rows or columns in the middle. Excel stops reading at the first gap, so it may miss part of your data. Always select one continuous rectangle of data with no gaps.
Another frequent issue is putting numbers in the label column by accident. If your first column contains years like 2020, 2021, 2022, Excel may try to plot those as data instead of using them as labels. To fix this, right-click the chart, select Edit Data, and make sure the first column is set as Labels, not as a data series.
If your line graph shows a line that goes wildly up and down instead of showing a smooth trend, check whether your data contains text or errors mixed in with numbers. Excel skips cells it cannot read, which can create unexpected jumps in the line.
Frequently Asked Questions
Can I create a line graph from data in different sheets?
Yes. Select your data from the first sheet, insert the chart, then right-click the chart and select Edit Data. In the dialog, you can type in cell references from other sheets using the format SheetName!CellRange. This is useful if your data is split across multiple sheets.
How do I add a second line to an existing chart?
Right-click the chart and select Edit Data. In the dialog, add a new column to your data range that contains the values for the second line. Excel automatically adds a second line to the chart and includes it in the legend.
What's the difference between a line chart and a scatter chart?
A line chart connects points in the order they appear in your data, so it works best for data measured over time (like monthly sales). A scatter chart plots individual points without connecting them, which is better for showing the relationship between two variables that are not ordered by time.
Can I change the chart type after I've created it?
Yes. Click the chart to select it, go to the Chart Design tab, and click Change Chart Type. A menu shows all available chart types. Select the one you want and click OK. Your data stays the same — only the visual style changes.
How do I remove a line from the chart?
Right-click the chart and select Edit Data. In the dialog, uncheck the column you want to remove from the chart, or delete that column from the data range entirely. The line disappears from the chart automatically.