What a line graph shows and when to use one

A line graph displays data points connected by lines, making it easy to see how something changes over time. Each point represents a value at a specific moment — a temperature reading on each day of the week, website visitors per month, or test scores across a semester. The line between points shows the trend: whether values are rising, falling, or staying flat.

Line graphs work best when your data has a natural order, usually time. They're less useful for comparing unrelated categories (like "apples versus oranges") where a bar chart would be clearer. If you're tracking something that changes continuously — sales over months, stock prices over years, or rainfall across seasons — a line graph will show the pattern at a glance.

Key Takeaways

  • Arrange your data in two columns: one for the time periods or categories (the horizontal axis) and one for the values you're measuring (the vertical axis).
  • In Excel, Google Sheets, or Numbers, select your data range, insert a chart, and choose the line chart type from the options offered.
  • The horizontal axis shows your time periods or labels, while the vertical axis shows the scale of your measurements.
  • You can add a title, axis labels, and a legend to make your graph clear to anyone reading it.

Organizing your data before you graph it

Before you create the graph, your data needs to be in the right shape. Open a spreadsheet — Excel, Google Sheets, or Apple Numbers all work the same way here. Put your time periods or labels in the first column: dates, months, week numbers, or any category that shows order. Put your measurements in the second column: the actual numbers you're tracking.

For example, if you're graphing daily temperatures, your first column might have "Monday," "Tuesday," "Wednesday" and your second column would have "72," "75," "68." If you're tracking website visitors, the first column has dates like "Jan 1," "Jan 2," "Jan 3" and the second has visitor counts. The data doesn't need to be fancy — just two columns, one label per row, one number per row.

If you have multiple things to track (like temperature and humidity, or sales from two different stores), add a third column, a fourth, and so on. Each column becomes a separate line on your graph. Make sure the first row contains headers — "Date," "Temperature," "Humidity" — so the spreadsheet knows what each column represents.

Creating the graph in Excel

Select all your data, including the header row. Click and drag from the first cell to the last cell that contains data, or click the first cell and then Shift+Click the last cell. The selection should include all your labels and all your numbers.

Go to the Insert menu at the top. Look for a Charts option (in some versions it says "Chart"). Click it. A menu of chart types will appear. Find and click "Line Chart" or "Line Graph." Excel will show you several line chart styles — a basic line graph, a line graph with dots at each point, a stacked line graph. Choose the basic line graph (usually the first option) unless you have a specific reason to use a different style.

Excel will place a chart on your spreadsheet. Right-click the chart and select "Edit Chart" or double-click it to open the editing panel. Add a title by clicking the chart title area and typing what you want it to say. Click the axis labels to add titles like "Date" for the horizontal axis and "Temperature (°F)" for the vertical axis. When you're done, click outside the chart to close the editor.

Creating the graph in Google Sheets

Select your data the same way: click the first cell, then Shift+Click the last cell with data. Make sure you include headers. Go to the Insert menu and click "Chart." Google Sheets will open a chart editor on the right side of your screen.

In the Chart Type section, scroll down until you see "Line chart" and click it. Google Sheets will automatically create a line graph from your data. If the graph doesn't look right — for example, if it's treating your time periods as numbers instead of labels — click the Setup tab in the chart editor and check the data range. Make sure the first column is set as labels, not as a data series.

Click the Customize tab to add a title, axis titles, and other details. Type your chart title in the "Chart & axis titles" section. Scroll down to find "Series" and make sure each line is labeled correctly. When you're satisfied, click Insert to place the chart in your sheet.

Creating the graph in Apple Numbers

Select your data including headers. Go to the Insert menu and click "Chart." Numbers will open a chart gallery. Click "Line" in the left sidebar, then choose the line chart style you want (usually the first option). Numbers will create a chart and open an editor panel on the right.

In the Chart section, you can add a title and axis titles. Click "Chart Title" and type what you want. Click the axis labels to add descriptions like "Month" or "Sales ($)." In the Data section, check that your columns are assigned correctly — your time periods should be the category axis (horizontal), and your measurements should be the value axis (vertical).

Fixing common problems

If your line graph looks wrong, the most common issue is that the spreadsheet is treating your labels as data. For example, if your first column contains dates but the graph shows them as numbers on the vertical axis instead of along the bottom, you need to tell the spreadsheet that column is labels, not values. In Excel, right-click the chart, select "Select Data," and make sure your label column is set as the horizontal axis labels. In Google Sheets, use the Setup tab in the chart editor to assign the correct data range. In Numbers, check the Data section to confirm which column is the category axis.

Another common problem: too many data points make the graph crowded and hard to read. If you have 100 data points, the horizontal axis labels will overlap. You can fix this by selecting fewer data points (for example, showing every other week instead of every day) or by making the chart wider so there's more room for labels.

If one line is much higher or lower than the others, the vertical axis scale might be hiding the pattern. Most spreadsheets let you set the minimum and maximum values on the vertical axis manually. Right-click the vertical axis and look for "Format Axis" or "Edit Axis" to set custom minimum and maximum values that show the variation more clearly.

Adding labels and making your graph readable

A graph without labels is confusing. Always add a title that says what the graph shows — "Daily Temperature for the Week of March 5" is better than "Temperature." Label your axes: the horizontal axis should say what the categories are ("Date," "Month," "Week"), and the vertical axis should say what you're measuring and include the unit ("Temperature (°F)," "Sales ($)," "Visitors").

If you have multiple lines, add a legend so readers know which line represents which measurement. Most spreadsheets add a legend automatically when you have more than one data series. You can usually move it by clicking and dragging, or hide it if it's not needed.

Keep colors simple and distinct. If you have two lines, use two clearly different colors — not two shades of blue that are hard to tell apart. Avoid decorative effects like 3D or shadows; they make the data harder to read, not easier.

Frequently Asked Questions

Can I create a line graph from data that isn't in order by time?

Technically yes, but it usually doesn't make sense. A line graph is designed to show change over a sequence. If your categories don't have a natural order — like "red, blue, green" — a bar chart will communicate better. If you must use a line graph, make sure the order of your categories is meaningful to your reader.

What if I want to show multiple lines on the same graph?

Add more columns to your spreadsheet. Keep your first column as labels (dates, months, etc.), and add one column for each thing you want to track. When you create the chart, select all the data including all columns, and the spreadsheet will create a separate line for each measurement. Make sure each column has a header so the legend is clear.

How do I change the colors of the lines?

Double-click the chart to edit it. In Excel, right-click a line and select "Format Data Series." In Google Sheets, click the line in the chart and use the Format Series options on the right. In Numbers, click the line and use the Format panel. You can then choose a new color from the options provided.

Can I export my graph to use in a document or presentation?

Yes. Right-click the chart and select "Copy" (or use Ctrl+C / Cmd+C). Then paste it into your document, presentation, or email. Most spreadsheets also let you right-click and "Download as image" to save it as a file you can use anywhere.

What's the difference between a line graph and a scatter plot?

A line graph connects points with lines to show a continuous trend. A scatter plot shows individual points without connecting them, useful when you want to see the relationship between two measurements that don't have a natural order. Use a line graph for time-based data; use a scatter plot to explore whether two variables are related.