Excel’s line graphs instantly show trends over time, making data like sales, temperature, or stock prices easy to understand. To create one, you’ll need your data in a table, and Excel’s built-in tools handle the rest—no advanced skills required. Just select your data, choose the line chart type, and format it to match your needs.
What You'll Need
- Microsoft Excel installed (Excel 2016 or newer recommended; older versions may have slightly different menus).
- A dataset with at least two columns: one for time or categories (e.g., months, dates) and another for values (e.g., numbers, percentages).
- Basic knowledge of Excel’s keyboard shortcuts (e.g., Ctrl + C to copy, Ctrl + V to paste) for speed.
Step-by-Step
- Prepare your data
- Arrange your data in two columns. The first column should be your x-axis (e.g., dates, time periods like "Q1 2023"). The second column holds the values you want to track.
- Ensure your data is contiguous (no gaps) and error-free (no text in numeric columns). To confirm, highlight the cells and check for non-numeric values. If needed, delete or correct them.
- Select your data
- Click and drag to highlight both columns. For example, if your data spans rows 2–10 and columns A–B, drag from cell A2 to B10. Excel may automatically include headers (e.g., month names), which is fine.
- If your data includes headers in the first row, press Shift + Spacebar to select the entire row, then drag right to include all columns.
- Insert the line chart
- Go to the Insert tab at the top of the Excel ribbon. In the "Charts" group, click Line and choose a style (e.g., "Line with markers" for clarity). For older Excel versions, the menu may say "Line with data series lines and markers."
- Excel will automatically generate the chart. If your data spans multiple sheets, ensure the correct sheet is active before inserting.
- Customize the chart
- Click anywhere on the chart to activate its design tools. In the "Chart Design" tab, adjust settings:
- Change the chart type in "Change Chart Type" if needed (e.g., to "Line with markers" if the default is too simple).
- Add a title: In the "Chart Elements" group, click "Add Chart Element" > "Title" and type your heading (e.g., "Monthly Sales Trend").
- Modify axes or legends if required:
- Right-click the x-axis and select "Axis Titles" to label your category column (e.g., "Month").
- Use the "Series" tab in the Chart Elements group to rename or format data series (e.g., add colors or change marker shapes).
- Click anywhere on the chart to activate its design tools. In the "Chart Design" tab, adjust settings:
- Final touches
- Add gridlines (optional): In the "Chart Design" tab, click "Add Chart Element" > "Gridlines" > "Major gridlines" to improve readability.
- Adjust the chart’s position: Drag the chart border to place it where you want it (e.g., on a separate sheet).
Common Mistakes
- Incorrect data placement: If your chart shows jagged lines or disconnected points, your x-axis column isn’t properly labeled with time/categories. Verify the first column contains values like dates or month names.
- Missing headers: Excel may not label data series if your first row isn’t selected (e.g., if you only dragged cells A2–B10). Always include headers if you want automatic labels.
- Overlapping series: If lines clutter the chart, simplify by removing unnecessary data series or using a stacked line chart only for comparative trends.
- Excel version quirks: In older versions, use the "Data Series" tab (instead of "Series") to edit markers or colors. For Excel 2010 or earlier, right-click a data point to customize its appearance.
Tips
- Use a consistent y-axis scale: Right-click the y-axis > "Scale" > "Auto" to ensure all values fit. For large ranges, try "Custom" to set minimum/maximum limits.
- Highlight key points: Add data labels by right-clicking a series > "Add Data Labels." Move them outside the line if they obstruct visibility.
- Save as a template: After creating a chart, save the spreadsheet as a template (.xltx) to reuse the same format for future projects.
- Avoid pie charts for trends: Line graphs are ideal for showing progress over time; use pie charts only for proportions (e.g., budget allocation).
- Copy-paste charts: To move the chart to another sheet, select it, press Ctrl + C, switch sheets, then Ctrl + V. This preserves formatting.
Troubleshooting
- Chart appears blank: Ensure you selected both columns (not just one) when inserting the chart. Right-click the chart area > "Select Data" to verify the source ranges are correct.
- Lines are disconnected: The x-axis column isn’t in chronological order. Sort the data by date/month first, then recreate the chart.
- Chart won’t update when data changes: In older Excel versions, click the chart > "Design" > "Change Chart Type," then select "Line" again. In newer versions, right-click the chart > "Select Data" > update the data range.
- Version-specific errors:
- Excel 2013/2016: Use the "Data Labels" option under "Chart Elements" > "Legend & Data Labels."
- Excel 2010: Right-click a data point > "Add Data Label."
- Excel 2007: Click the chart > "Design" > "Add Chart Element" > "Data Label."
- Chart is too small: Right-click the chart > "Size" to adjust its width/height. Alternatively, drag the chart border.
Frequently Asked Questions
How do I create a line graph with dates on the x-axis?
Excel automatically handles dates on the x-axis if your data is formatted correctly. Ensure the first column contains dates (e.g., "2023-01-01"), then insert a line chart. Excel will sort them chronologically. If the dates are text (e.g., "Jan 2023"), right-click the x-axis > "Axis Options" > "Category List" > "Date" to enable the time format.
Can I use Excel to plot a line graph with percentages?
Yes, percentages are treated as numbers in Excel. Just enter your percentage values in the second column (e.g., 85.5, 92.3), then insert a line chart. The chart will display the values correctly.
Why does my line graph have no markers?
To show markers, select the chart > "Design" tab > "Chart Style" > choose a style with markers (e.g., "Line with markers"). Alternatively, right-click a series > "Select Data" > "Series XY (Scatter)" > "Add Data Labels" to see values at each point.
How do I add a trendline to my line graph?
Right-click a series > "Add Trendline." Choose "Linear," "Exponential," or other options based on your data. Add a label by clicking the trendline > right-click > "Add Data Label."
My data has empty cells—how do I fix the line graph?
Empty cells create gaps. Replace them with zeros (0) or merge adjacent rows/columns to fill gaps. Alternatively, select the chart > "Design" > "Change Chart Type," then choose "Line with markers" if gaps persist.
Can I export my line graph to another file?
Yes. With the chart selected, go to "File" > "Save As" > choose a format like "PNG" or "JPEG." For larger charts, "PDF" preserves formatting. In Excel 2016+, press Ctrl + F5 to preview the chart before exporting.