Line Graph With 2 Lines in Excel: Create and Compare Data

Charts & pivot tables · Updated November 22, 2026

A line graph with two lines shows two data series across the same ordered categories or time periods, making their trends easy to compare. In Excel for Microsoft 365 on Windows, arrange the category labels in one column and the two series in neighboring columns, select the table, then choose Insert > Insert Line or Area Chart > 2-D Line.

What a Two-Line Graph Shows

Each line represents a separate series of related values. The horizontal axis shows shared categories, such as months, years, or measurement stages, while the vertical axis shows the values. Comparing the lines can reveal whether the series move together, diverge, cross, or remain consistently different.

For example, a shop might chart monthly sales for two product ranges. One line represents Range A and the other Range B; the months appear once along the horizontal axis. A reader can then see seasonal rises and falls and compare the ranges without examining two separate charts.

A two-line chart is most useful when both series have values for the same categories and the values can sensibly share one vertical scale. It is not automatically the right choice just because there are two columns of numbers: the categories, units, and purpose of the comparison matter too.

Arrange the Data Before Charting

Excel needs to know which values belong to each line and which labels belong on the horizontal axis. A simple table makes that relationship clear. Put the categories in the first column, followed by one column for each series, with a descriptive heading at the top of each column.

Month Range A Range B
January 42 35
February 48 39
March 45 44
April 57 50

Here, January through April are the shared categories, and Range A and Range B are the two series. The headings usually become the chart legend labels. Include the headings when selecting the data so Excel can use them rather than generic names such as Series 1 and Series 2.

Keep the table rectangular, with one row per category and no blank rows or columns separating the data. If the categories are dates, enter real Excel dates and format them as needed; text that merely looks like a date may not behave like a date axis. If one series has a missing observation, leave the corresponding cell blank rather than entering a misleading zero. A zero means the measured value was actually zero.

Create the Chart in Excel

On Windows in Microsoft 365, create the chart from the selected table using these steps:

  1. Select the category labels, both series headings, and all their values. In the example, select the full three-column table, including the header row.
  2. Open the Insert tab on the ribbon.
  3. Choose Insert Line or Area Chart in the Charts group, then select a standard option under 2-D Line. A regular Line chart is a straightforward starting point; Line with Markers adds a symbol at each plotted value.
  4. Check that the chart contains two lines and that the legend names match the column headings. Add a descriptive chart title and axis titles if they help explain the measure and units.

If the chart displays months as lines and the two series as categories, Excel has interpreted the rows and columns in the opposite direction from what you intended. Select the chart, open Chart Design, and choose Switch Row/Column. Review the result rather than assuming the switch is correct: the legend should identify the two measured series, while the horizontal axis should show the categories.

On Excel for Mac, the ribbon layout and some labels may differ slightly by release, but the usual approach is to select the data, open Insert, and choose a 2-D line chart. Excel for the web also offers chart insertion, though available formatting controls can differ from the desktop app. If a command is not visible, check the Insert tab’s Charts options.

Choose a Clear Line Style and Labels

Formatting should help readers distinguish the series and understand the chart, not decorate it at the expense of clarity. Give the chart a specific title, such as Monthly Sales by Product Range, rather than leaving the default Chart Title. If the vertical axis is not self-explanatory, add a title that names the measure and unit, such as Units Sold.

Use visibly different line colors with adequate contrast. If readers may print the chart in grayscale or have difficulty distinguishing colors, combine color differences with distinct markers or line styles. A legend is useful when the series are named, but labels placed directly at the ends of the lines can sometimes make a small chart easier to read. Avoid using too many markers or labels when there are many observations, since they can crowd the display.

In Excel, select the chart and use Chart Design > Add Chart Element to add items such as a chart title, axis titles, legend, or gridlines. Available choices depend on the chart and Excel version. You can also select a chart element and use its formatting options to adjust its appearance. Keep gridlines light enough that they do not compete with the data, and avoid unnecessary 3-D effects, which can make values harder to judge.

Set the Axes for a Fair Comparison

A two-line chart usually puts both series on the same vertical axis. That makes their heights directly comparable when they use the same unit and a reasonably similar scale. For example, comparing two sets of monthly sales in dollars on one axis is usually meaningful. Comparing temperature in degrees with rainfall in millimeters is not a like-for-like comparison, even if both series fit on a chart.

Excel chooses axis bounds automatically, but automatic bounds are not always ideal. A vertical axis that starts above zero can make small differences look dramatic; that may be appropriate for examining variation, but the scale should be clear and should not mislead. A zero baseline is not compulsory for every line chart, particularly when the important information is change over time, but readers should be able to see the axis values and interpret the visual scale.

If the categories are genuine dates, Excel may space them according to time. If they are text labels, such as stages named First, Second, and Final, Excel generally treats them as equally spaced categories. That is appropriate when each step is a comparable stage. It can be misleading if the actual time gaps vary substantially and the spacing itself matters. In that case, consider a chart that represents the numeric spacing of the observations.

Fix Common Two-Line Chart Problems

If Excel creates only one line, check that the selected range includes both series columns and their headings. Then use Chart Design > Select Data to inspect the chart’s data range and listed series. You can add or remove a series there and verify the cell ranges assigned to each one.

  • The lines are reversed: Use Chart Design > Switch Row/Column, then verify the axis labels and legend.
  • The legend says Series 1 and Series 2: Include heading cells in the selected range or edit the series names through Select Data.
  • A line drops to zero at a missing value: Check whether the source cell contains 0, a formula returning 0, or a genuinely blank cell. The chart cannot infer that a recorded zero means data is missing.
  • The chart looks cluttered: Reduce unnecessary markers and labels, widen the chart, or show fewer time periods. If the lines overlap closely, use contrasting markers or inspect the values in a table as well.
  • The horizontal axis looks wrong: Check that the category labels are included and appear in the intended order. For dates, confirm that the source cells contain dates rather than text.

Be cautious with blanks and formulas that return an empty text string: depending on the chart settings and data, Excel may treat them differently. To inspect how a chart handles gaps, select the chart and use Chart Design > Select Data, then look for Hidden and Empty Cells. The available gap options can let you display empty cells as gaps, zeros, or connected points. Choose based on what the missing data means; connecting across an unobserved interval may imply continuity that was never measured.

When to Use Another Chart Type

A line chart is designed to emphasize order and trends. If the horizontal values are measurements with meaningful numeric distances, such as elapsed time of 2, 5, and 20 minutes, a line chart’s equally spaced categories can distort the spacing. An XY scatter chart is often a better fit because it positions points according to numeric x-values. It can also show two data series, each with its own x-values.

If the goal is to compare separate totals for a few categories rather than follow a continuous sequence, a clustered column chart may be easier to read. If the two series use different units or very different magnitudes, do not simply force them onto one scale. You might use separate charts, or in some situations a secondary axis; however, secondary axes can make apparent relationships easy to overstate. Label both axes clearly and explain why the scales differ.

For a large number of series, a single chart may become difficult to interpret. Two lines are often manageable, but adding many more can create crossings and a confusing legend. Consider highlighting the most relevant series, splitting the data into small multiples, or using an interactive filter if readers need to examine different groups.

Frequently Asked Questions

How do I add a second line to an existing Excel chart?
Select the chart, choose Chart Design > Select Data, and add the cell range for the second series. Include its heading if possible so the legend uses a meaningful name. Check that its category values align with the categories already shown.

Can two lines have different scales?
A standard line chart uses one value axis for both series. You can assign a series to a secondary axis through the chart’s formatting options, but that changes how the lines appear relative to each other. Use a secondary axis only when the units or magnitudes justify it, label both axes, and do not treat line crossings as proof that the underlying values are equal.

Should a line graph with two lines have markers?
Markers are helpful when there are only a few observations or when readers need to identify individual values. With many points, markers can clutter the chart; a plain line may be easier to follow. Choose based on the density of the data and how precisely readers need to locate each observation.

Why are my two lines shown as one?
The series may have identical values, may overlap for some or all categories, or may not both be included in the chart. Inspect the source data and use Chart Design > Select Data to confirm that Excel has two separate series. If the values genuinely match, different markers can reveal the overlapping observations.

Is a line graph the same as an XY scatter chart?
No. A line chart typically treats its horizontal labels as categories and spaces them evenly. An XY scatter chart uses numeric x-values and places points according to their actual distances. Use a line chart for ordered categories or regular time periods; use a scatter chart when numeric spacing between x-values matters.

Related

Try it: the Percentage Formula Generator: percent of, percent change, increase and decrease, with the formula.

More in Charts & pivot tables

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.