Excel Line Chart With Two X-Axes: Setup and Alternatives

Charts & pivot tables · Updated November 3, 2026

Excel Line Chart With Two X-Axes: Setup and Alternatives

Excel can display a secondary horizontal axis on some charts, but a standard line chart does not give each series its own independent set of X-values. To show a second horizontal axis, put a series on the secondary axis and add the secondary horizontal axis; if the two series have different numeric X-values, use an XY scatter chart instead.

What two X-axes mean in Excel

People usually mean one of two things when they ask for a line chart with two X-axes. They may want the same categories or dates shown along both the bottom and top of the chart, perhaps in a different format. Or they may want two genuinely different horizontal scales, such as elapsed days along the bottom and measurement numbers along the top. Those are different charting problems.

A line chart uses a category axis horizontally. Its categories might be dates, months, product names, or numbered steps, but Excel spaces them as categories rather than treating their values as measured distances. Each line series is plotted against the chart’s category positions. Adding a secondary axis can display another horizontal axis, but it does not automatically give each line an independent numeric X scale.

Excel’s secondary axes are useful when the data needs a second scale or when you want a second axis displayed. For example, assigning one series to a secondary axis typically adds a secondary vertical axis, and the chart can then show a secondary horizontal axis as well. The axes should not be mistaken for a guarantee that Excel is plotting two unrelated X-value sets.

When a secondary horizontal axis is useful

A second horizontal axis is most useful when it clarifies the same underlying positions. Imagine monthly revenue plotted as a line, with the months labeled along the bottom. A top axis that repeats those months in a different style may help a particular audience, but it does not add new data. Another example is a chart where the top axis displays an alternate numbering scheme that maps directly to the same categories below.

Secondary axes are also commonly used in combination charts when series have different vertical units, such as units sold and conversion rate. The secondary vertical axis makes the two series readable at different scales. A secondary horizontal axis may be available as part of that setup, but it is not what makes the series’ horizontal values independent.

  • Use a second displayed category axis when both axes describe the same ordered categories.
  • Use a secondary vertical axis when a series has a substantially different vertical scale or unit, and explain that scale clearly.
  • Use an XY scatter chart when the X-values are actual numbers and the series have different X positions.

How to add the secondary horizontal axis

In Excel for Microsoft 365 on Windows, start with a chart that contains at least two series. Assigning one series to the secondary axis is a common way to make the secondary-axis options available. These steps add a second axis where the chart type and data configuration support it:

  1. Select the chart, then click the data series that should use the secondary axis. Confirm that only the intended series is selected.
  2. Right-click the selected series and choose Format Data Series. In the Format Data Series pane, open Series Options and select Secondary Axis.
  3. With the chart selected, choose Chart Design > Add Chart Element > Axes > Secondary Horizontal. If the option is unavailable, check that a series is assigned to the secondary axis and consider whether the chart type supports the axis you need.
  4. If the new axis labels appear in an inconvenient position, select the secondary horizontal axis, open Format Axis, and look under Labels for Label Position. Choose High to position its labels at the top of the plot area.
  5. Add an axis title if the second axis communicates something beyond a duplicate set of categories. Select the chart, then use Chart Design > Add Chart Element > Axis Titles and choose the relevant horizontal axis title.

In Excel for Microsoft 365 on Mac, select the series and use the Format Data Series pane to choose a secondary axis; the pane and ribbon layout can differ slightly from Windows. The chart-design controls are also available, though their placement may vary by window size. Excel for the web has fewer chart-formatting controls than the desktop apps, so use the Windows or Mac desktop version if you cannot add or format the secondary axis there.

Why a line chart may not plot two X-value sets

The key distinction is between category labels and numeric X-values. In a line chart, Excel generally treats the horizontal positions as an ordered list of categories. For example, January, February, and March occupy consecutive category positions even if the dates are not evenly spaced in time. A line chart is therefore appropriate when the order matters and equal category spacing is acceptable.

An XY scatter chart treats the horizontal values as numbers. A point at X = 10 is placed farther from X = 20 than from X = 15, reflecting the numeric distance. This lets each scatter series have its own X-value range. It is the better choice for measurements taken at different times, irregular dates, or two datasets whose horizontal values are not the same list of categories.

For instance, a line chart could compare two teams’ monthly results across the same six months. Both series share the months as categories. If one sensor records readings at 0, 5, and 20 minutes while another records at 0, 10, and 20 minutes, an XY scatter chart can plot each series at its actual times. A line chart would instead place each series at category positions and could imply equal spacing where there is none.

Use an XY scatter chart for separate numeric X scales

To create a chart with genuinely different horizontal numeric scales, arrange each series with its own X and Y columns. Select the data and choose Insert > Insert Scatter (X, Y) or Bubble Chart, then choose a scatter subtype with straight lines if you want connected points. If the series are not laid out in adjacent columns, create the chart first, then use Chart Design > Select Data > Add to add a series and specify its series X values and series Y values.

To put one scatter series on a secondary axis, select that series, open Format Data Series, and choose Secondary Axis. Excel can then provide secondary horizontal and vertical value axes for that series. Use Chart Design > Add Chart Element > Axes to show the secondary horizontal axis if it is not visible. Format both horizontal axes so their minimum, maximum, and units make sense for the data.

Be careful when interpreting two scales. A point’s apparent alignment or crossing with another line can change when either axis limits or units change. Label each axis with its quantity and unit, and avoid suggesting that a visual intersection proves a meaningful relationship. If the audience would struggle to read two scales, separate charts may communicate the results more honestly.

Common problems and how to fix them

  • The secondary horizontal axis command is missing. Assign a series to the secondary axis first, then check Chart Design > Add Chart Element > Axes again. Some chart types do not offer the combination of axes you expect.
  • The top labels duplicate the bottom labels. That is normal when both horizontal axes represent the same category positions. A line chart does not turn those labels into an independent numeric scale just because a second axis is visible.
  • Labels overlap or crowd the chart. Select an axis and adjust its label position, font size, or interval in Format Axis. You can also widen the chart or remove redundant labels if the second axis adds little information.
  • The series looks misplaced after switching chart types. Check the series’ X and Y ranges in Select Data, then confirm which axis it uses. A scatter chart needs numeric X-values; text labels or dates stored as text may not behave as intended.
  • The lines look misleadingly different after formatting. Review the axis bounds and units on both sides. Automatic scaling can make a small change look large or make two series appear similar despite different values.

Line chart, combo chart, or scatter chart?

Choose the chart based on what the horizontal values mean, not simply on the desire to see two axes. A line chart is usually right for a shared sequence of categories, such as weeks or product stages. A combo chart is useful when different series need different chart types or vertical scales, for example columns for monthly sales and a line for a rate. An XY scatter chart is the natural choice when horizontal position represents a numeric measurement.

A second axis can make a chart harder to interpret, especially if both vertical and horizontal axes have different scales. If the goal is only to compare trends, consider putting the series in separate aligned charts with the same date range. If the goal is to compare changes rather than raw magnitudes, a carefully labeled indexed chart may help, but state how the index is calculated. These alternatives are often clearer than adding axes that readers must continually cross-reference.

Frequently Asked Questions

Can Excel have two horizontal axes on one chart?
Yes, Excel can display a primary and secondary horizontal axis in supported chart configurations. A secondary axis is often enabled by assigning a series to the secondary axis first. Whether this gives you the independent scale you want depends on the chart type.

Can each line in an Excel line chart have different X-values?
Not as independent numeric X-values in the way an XY scatter chart supports. A line chart generally plots series against shared category positions. Use an XY scatter chart when each series has its own numeric X range.

How do I put the second X-axis at the top?
Add the secondary horizontal axis through Chart Design > Add Chart Element > Axes > Secondary Horizontal. Select that axis, open Format Axis, and set Label Position to High if its labels are not already at the top.

Why are my two horizontal axes showing the same labels?
They likely represent the same category positions, which is typical of a line chart. A second visible axis does not automatically create a second set of independent category or numeric values.

Should I use a secondary axis or make two charts?
Use a secondary axis when the relationship is meaningful and both scales can be labeled clearly. Use two aligned charts when dual scales would confuse readers or make the comparison look stronger or weaker depending on axis limits.

Choose the chart that matches the data

If you need two horizontal rows of labels for the same categories, try the secondary horizontal axis in a supported chart and treat it as an additional display of those categories. If you need separate numeric X-values for separate series, build an XY scatter chart and configure its primary and secondary value axes. The distinction between a category axis and a numeric value axis is the practical answer to most Excel questions about a line chart with two X-axes.

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.