What a line chart does and when to use one
A line chart in Excel connects data points with lines to show how something changes over time. Each point on the chart represents a value, and the line between points shows the trend — whether something is going up, down, or staying flat. Line charts work best when you have data measured at regular intervals: sales by month, temperature by day, website visitors by week.
Excel calls this a "Line" chart type, and it sits in the Charts section of the Insert menu. You build one by selecting your data first, then telling Excel to turn it into a line chart. The whole process takes about two minutes once you understand the steps.
Key Takeaways
- Select your data before inserting a chart — highlight the cells that contain your labels and numbers, including headers.
- Go to Insert > Charts > Line and pick the style you want (basic line, line with markers, or stacked line).
- Excel will place the chart on your sheet; you can move it, resize it, or edit the data it shows by right-clicking on it.
- Add a title and axis labels so anyone reading the chart understands what the numbers represent.
- If your data is in columns, Excel usually reads it correctly; if it is in rows, you may need to tell Excel to swap the axes.
Preparing your data the way Excel expects it
Excel needs your data organized in columns or rows with a clear structure. Put your time labels (months, dates, weeks) in the first column or row, and your numbers in the columns or rows next to them. Include a header row or column that names what each set of numbers represents.
For example, if you are tracking sales for three products over six months, your sheet might look like this: Column A has the month names (January, February, and so on), Column B has Product A sales, Column C has Product B sales, and Column D has Product C sales. The first row should say "Month," "Product A," "Product B," and "Product C." Do not leave blank rows or columns in the middle of your data — Excel will stop reading when it hits a gap.
If your numbers are formatted as text instead of actual numbers (this happens sometimes when you copy data from a website), Excel may not chart them correctly. You can tell because the numbers will be right-aligned in their cells instead of left-aligned. If this happens, select the cells, right-click, choose Format Cells, and change the format to Number.
Selecting your data and inserting the chart
Click on the first cell of your data (usually the top-left cell with a header) and drag to the last cell that contains data. This selection should include all your labels and all your numbers. If your data is scattered across different areas of the sheet, hold Ctrl (or Cmd on Mac) and click each separate area to select multiple ranges at once.
Once your data is selected, go to the Insert menu at the top of the screen. Look for the Charts section — it usually shows small icons representing different chart types. Click on the Line chart icon. Excel will show you several line chart styles: a basic line, a line with dots at each data point (called markers), a stacked line, and a 3D line. Choose the basic line or line with markers — these are the most common and easiest to read. Click your choice, and Excel will insert the chart directly onto your sheet.
Moving and resizing your chart
The chart appears as a box on your sheet, usually overlapping your data. Click anywhere on the chart to select it — you will see a border around it with small squares at the corners and edges. Drag the chart to move it to a blank area of your sheet where it will not cover your data. Drag one of the corner squares to resize it while keeping the proportions correct, or drag an edge square to stretch it in one direction.
If you want the chart to stay in one place and not move when you scroll or add rows, right-click on the chart, choose Format Chart Area, and look for a Position and Size option. Some versions of Excel let you lock the chart to specific cells so it moves with them.
Adding titles and labels so the chart makes sense
A chart without labels is confusing. Double-click on the chart to enter edit mode — the border will change and you will see the chart more clearly. Right-click on the chart and look for "Add Chart Element" or "Chart Title." Click it and type a title that describes what the chart shows, like "Monthly Sales by Product" or "Website Traffic: January to June."
Next, add axis labels. The horizontal axis (the bottom) usually shows your time periods, and the vertical axis (the left side) shows your numbers. Right-click on the chart again, choose Add Chart Element, and select Axis Titles. Add a title for the vertical axis that describes what the numbers mean — for example, "Sales in Dollars" or "Number of Visitors." The horizontal axis usually does not need a label if it is already clear (like "Month"), but you can add one if it helps.
Click outside the chart when you are done editing. The chart is now part of your sheet and will update automatically if you change the numbers in your data.
Fixing common problems with how Excel reads your data
Sometimes Excel puts your data on the wrong axis. If your months appear on the vertical axis instead of the horizontal one, or your numbers appear as separate lines instead of one line with multiple points, you need to tell Excel to swap the axes. Right-click on the chart, choose Select Data, and look for a button that says "Switch Row/Column" or similar. Click it, and Excel will flip how it is reading your data.
If one of your lines is much taller or shorter than the others and hard to read, the vertical axis may be scaled incorrectly. Right-click on the numbers on the left side of the chart, choose Format Axis, and adjust the minimum and maximum values. For example, if one line shows values between 100 and 200 and another shows values between 10,000 and 12,000, you might want two separate charts instead of one.
If your chart shows a line for every row instead of grouping your data correctly, you may have included extra rows or columns in your selection. Delete the chart, select only the data you want to show, and insert a new chart.
Changing the chart style and colors
Once your chart is created, you can change how it looks. Double-click the chart to enter edit mode. At the top of the screen, you will see a Design tab (or Chart Design tab) with options to change the style. Click one of the preset styles to apply a new color scheme and layout instantly.
To change individual colors, right-click on one of the lines in the chart and choose Format Data Series. You can change the line color, thickness, and whether it shows markers (dots) at each data point. If you want to change the background color of the chart itself, right-click on the white area behind the lines and choose Format Chart Area.
Frequently Asked Questions
Can I create a line chart if my data is in rows instead of columns?
Yes. Select all your data including the row labels, insert the chart, then right-click and choose Select Data. Look for a Switch Row/Column button and click it. Excel will reorganize how it reads the data so the chart displays correctly.
What is the difference between a line chart and a scatter chart?
A line chart assumes your data points are evenly spaced in time and connects them in order. A scatter chart treats each point as independent and does not assume any order. Use a line chart for time-based data like monthly sales; use a scatter chart when you want to see the relationship between two unrelated variables.
How do I update the chart if I change the numbers in my data?
The chart updates automatically. Change any number in the cells you selected when you created the chart, and the line will move to reflect the new value. If you add new rows of data below your original selection, you may need to edit the chart's data range to include them.
Can I show multiple line charts side by side on the same sheet?
Yes. Create the first chart, move it to one side, then select a different set of data and create a second chart. Position them next to each other. Each chart is independent and will update based on its own data range.
What if I want to show two different scales on the same chart?
Right-click on the line that needs a different scale, choose Format Data Series, and look for an option to use a secondary axis. This creates a second vertical axis on the right side of the chart with its own scale, useful when comparing data measured in different units.