ExcelReady
CourseMock testsFunction guidesBlog
Start freeStart learning for free
ExcelReady

Be Excel-ready before day one. Hands-on practice in your browser, with instant feedback.

Learn

  • Course
  • Mock tests
  • Function guides
  • Blog

Test prep

  • Excel level test
  • Excel test practice
  • Free screening quiz
  • Certificate

Company

  • About
  • Editorial policy
  • Contact
  • Terms
  • Privacy

© 2026 ExcelReady. All rights reserved.

  1. Blog
  2. Data tools
  3. How to Make a Line Chart in Excel

How to Make a Line Chart in Excel

By ExcelReady Team·Updated November 2, 2026·6 min read

The short answer

To make a line chart in Excel, put dates or months in the first column and values in the next, with headers in row 1. Select the data, go to Insert > Insert Line or Area Chart, and pick Line or Line with Markers. Add a chart title and axis titles, and use one line per series to compare trends over time.

Key takeaways

  • Line charts show how values change over time. Use a column or bar chart to compare separate categories.
  • Put the time periods in the first column and one column per line, with a header on each.
  • If your data is a list of transactions, total it by month with SUMIFS or a PivotTable first.
  • Years typed as numbers can turn into an extra line. Leave the top-left header cell empty to fix it.
  • Format the data as a table so new rows appear in the chart automatically.
On this page+
  1. When to use a line chart
  2. How to set up the data for a line chart
  3. How to make a line chart step by step
  4. How to turn transactions into monthly totals
  5. How to fix common line chart problems
  6. Add a trendline or a sparkline
  7. Keep the chart up to date
  8. Practise it

A line chart in Excel shows how a value changes over time: sales by month, visitors by week, costs by year. You lay out the dates in one column and the values beside them, then insert the chart from the Insert tab in a few clicks. This guide covers the steps, adding a second line, fixing the common date and gap problems, and preparing monthly totals so the chart tells a clear story.

When to use a line chart#

Use a line chart when the horizontal axis is time and you want to show the trend. The line joins each point to the next, which tells the reader the values are connected.

Your questionBest chart
How did sales change month by month?Line
Are we above or below target over the year?Line with two series
Which region sold the most?Bar or column
What share does each product have?Pie, for a few slices only

Don't use a line chart for categories that have no order, such as regions or product names. A line between "North" and "South" suggests a trend that doesn't exist. The guide to making charts in Excel compares all the main chart types.

How to set up the data for a line chart#

A line chart needs the time periods in the first column and one column of values for each line. Put a header on every column, because Excel uses the headers as the legend names.

ABC
1MonthSalesTarget
2Jan8001,000
3Feb9701,000
4Mar1,4401,200
5Apr1,2101,200
6May1,5801,500
7Jun1,7201,500

Keep the periods in order, from oldest to newest, with no blank rows or subtotal rows in the middle. If you have real dates, such as 1 Jan 2026, keep them as dates: Excel can then build a proper date axis.

How to make a line chart step by step#

Once the data is in place, inserting the chart takes four steps:

  1. Select the data, including the headers: A1:C7.
  2. Go to Insert and, in the Charts group, click Insert Line or Area Chart.
  3. Choose Line or Line with Markers. Markers show each data point as a dot, which helps when there are only a few points.
  4. Click the chart title and type a clear one, such as "Monthly sales vs target, Jan–Jun 2026".

Excel draws two lines, Sales and Target, with the months along the bottom. On Windows, Alt+F1 inserts a default chart next to the data. It's usually a column chart, so switch it with Chart Design > Change Chart Type > Line.

Add axis titles and data labels#

Click the chart, then the Chart Elements button (the + next to the chart) and tick Axis Titles or Data Labels. On a Mac, use Chart Design > Add Chart Element instead. Label the vertical axis with the unit, such as "Sales ($)", so nobody has to guess.

How to turn transactions into monthly totals#

Most real data is a list of transactions, not a tidy monthly table. Chart a raw list and you get a jagged line with one point per sale. Total the values by period first.

Say column A holds dates and column B holds sales. Put the first day of each month in column D and use the SUMIFS function to add up everything in that month:

Excel formula
=SUMIFS($B$2:$B$8,$A$2:$A$8,">="&D2,$A$2:$A$8,"<"&EDATE(D2,1))

The first condition keeps dates on or after the start of the month. The second keeps dates before the start of the next month, which EDATE works out. With the sales from the exercise on this page, February 2026 comes to 970 (510 + 460). The dates in criteria lesson practises this pattern, and the guide to summing by month shows more options.

A PivotTable does the same job without formulas: put the date in Rows, group it by Months, and put Sales in Values. Then insert a PivotChart. The pivot-style summary lesson builds this kind of summary with formulas so you understand what the PivotTable is doing.

How to fix common line chart problems#

Most line chart problems come from the data layout. Here are the usual fixes:

ProblemCauseFix
An extra flat line along the bottomYears in column A are numbers, so Excel plots them as a seriesDelete the header in A1 and insert the chart again, or edit the axis labels in Select Data
Points are unevenly spacedExcel uses a date axis and spaces points by real timeFormat Axis > Axis Options > Axis Type: Text axis
The line drops to zeroA formula returns "" or 0 for a month with no dataReturn NA() instead; line charts skip #N/A
Gaps in the lineEmpty cells in the dataRight-click Select Data > Hidden and Empty Cells and choose Connect data points with line
Months in the wrong orderData isn't sorted oldest to newestSort the data by date

Two very different scales#

If one line is in thousands and another is a percentage, the smaller one looks flat. Right-click the smaller series, choose Format Data Series, and select Secondary Axis. Label both axes clearly so readers know which scale goes with which line.

Add a trendline or a sparkline#

A trendline is a straight line Excel fits through the points to show the general direction. Click the chart, open Chart Elements (Mac: Add Chart Element), and tick Trendline. Linear is the default and works for most business data. Treat it as a guide, not a forecast.

A sparkline is a tiny line chart inside one cell, useful in tables and dashboards. Select an empty cell, go to Insert > Sparklines > Line, and pick the data range. Each row of a table can have its own small trend line.

Keep the chart up to date#

Charts follow their source range, so a new month added below the data may be left out. Format the data as a table first (Ctrl+T; Mac: ⌘T). When you add a row, the table grows and the chart includes the new point automatically.

If the chart feeds a report, you can place it next to totals and KPIs. The guide to building a sales dashboard in Excel shows how line charts fit with other summaries on one page.

Practise it#

A good line chart starts with good monthly totals. Practise date-based criteria in a live spreadsheet: you total values between two dates and the sheet checks your formula instantly. Then build a full summary table in the pivot-style summary lesson, and chart it in Excel.

Try it yourself

This is a live spreadsheet. Type the formula in the green cell and press Enter.

Before you chart monthly sales, you need monthly totals. Click E2 and use SUMIFS to total the sales in B2:B8 for February 2026: dates on or after 1 Feb 2026 and before 1 Mar 2026.

fx
ABCDEF
1
Date
Sales
Month
Total
2
46030
420
Feb 2026
3
46044
380
4
46058
510
5
46072
460
6
46085
600
7
46099
540
8
46111
300
9
10
11

Tip: Check the date column twice: ">="&DATE(2026,2,1) and "<"&DATE(2026,3,1).

Practise this in a lesson

LessonPivot-style summary with formulasBuild a summary table like a pivot table with formulas: a sorted UNIQUE list of categories, then SUMIFS and COUNTIFS filled down beside it.LessonDates in criteria: totals by date range and monthCount and total rows between two dates with COUNTIFS and SUMIFS, build a monthly summary, and drive the date range from input cells.Function guideSUMIFSTotal values that meet several conditions with SUMIFS. Examples by region, month and number range, common errors, and live practice.

Frequently asked questions

How do I make a line chart in Excel with two lines?

+

Put each series in its own column next to the dates, such as Sales and Target, and select all the columns before you insert the chart. Excel draws one line per column.

How do I make a line graph with dates in Excel?

+

Put real dates in the first column and insert a line chart. Excel uses a date axis and spaces the points by time. To space them evenly instead, set the axis type to Text axis in Format Axis.

Why does my line chart show an extra line along the bottom?

+

Excel has treated your years or numbers in the first column as a data series. Delete the header in the top-left cell and insert the chart again, or edit the axis labels in Select Data.

How do I skip blank values in an Excel line chart?

+

Right-click the chart, choose Select Data, then Hidden and Empty Cells, and pick Gaps or Connect data points with line. Formulas that return "" plot as zero, so return NA() instead.

When should I use a line chart instead of a bar chart?

+

Use a line chart for a trend over time, such as monthly sales. Use a bar or column chart to compare separate categories, such as sales by region.

Sources

  • Create a chart from start to finish - Microsoft Support
  • SUMIFS function - Microsoft Support

Written and checked by the ExcelReady Team. First published November 2, 2026. The practice exercise runs in the same formula engine as our lessons. Found a mistake? Read our editorial policy or email hello@excelready.app.

On this page

  1. When to use a line chart
  2. How to set up the data for a line chart
  3. How to make a line chart step by step
  4. How to turn transactions into monthly totals
  5. How to fix common line chart problems
  6. Add a trendline or a sparkline
  7. Keep the chart up to date
  8. Practise it

Keep reading

Data tools· 5 min read

Make a Chart in Excel: Column, Bar, Line and Pie

To make a chart in Excel, select your data including the headers, go to Insert and pick a chart, or click Recommended Charts to let Excel suggest one. Use a column or bar chart to compare categories, a line chart for a trend over time, and a pie chart only for a few parts of one whole.

Data tools· 6 min read

How to Make a Bar Chart in Excel

To make a bar chart in Excel, select your labels and numbers with their headers, go to Insert > Insert Column or Bar Chart, and pick Clustered Bar. Excel draws one horizontal bar per row. Add a title and data labels, and sort the data smallest to largest so the biggest bar is at the top.

Data tools· 6 min read

How to Make a Pie Chart in Excel (and When Not To)

To make a pie chart in Excel, put category names in one column and their values in the next, select both, then choose Insert > Pie Chart > 2-D Pie. Add data labels and tick Percentage to show each slice's share. Use a pie only for a few parts of one whole; otherwise use a bar chart.

More on data tools

  • Calculated Fields in a Pivot Table
  • How to Make a Pivot Chart in Excel
  • Show Zero Instead of Blank in a Pivot Table
  • Pivot Table "Show Values As" Explained
  • Pivot Tables in Excel: A Beginner's Guide
  • Count in a Pivot Table: Count vs Distinct Count
All data tools articles →

Don't just read about Excel. Do it.

Practise real formulas in a live spreadsheet with instant feedback, right in your browser. Nothing to download.

Start learning for free