To make an Excel graph with dates on the x-axis, put real Excel dates in one column and the values to chart in another, select both columns, then choose Insert > Insert Line or Area Chart > 2-D Line. If the dates are treated as labels rather than a time scale, right-click the horizontal axis, choose Format Axis, and under Axis Options select Date axis.
How Excel handles dates on a chart
Excel stores dates as serial numbers, even though cells display them in calendar form. A chart can use those underlying numbers to position observations along a timeline. The key distinction is whether the horizontal axis is a date axis or a text axis. A date axis places values according to elapsed time; a text axis gives each category an equal amount of space.
For example, imagine a table with readings dated January 1, January 2, and January 10. On a date axis, the gap from January 2 to January 10 is visibly longer than the gap from January 1 to January 2. On a text axis, all three labels are evenly spaced. Neither treatment is inherently wrong: a date axis represents time intervals, while a text axis can be useful when every recorded period should receive equal visual weight.
Excel often recognizes dates automatically in line charts, but the choice can depend on the source data and chart type. A column or line chart uses a category axis that can be configured as a date axis. An XY (scatter) chart instead uses a numeric horizontal value axis, so it positions points by their numeric x-values. Since Excel dates are numbers, scatter charts can also plot dates while giving you more control over numeric spacing.
Prepare the source data
Keep each date in its own cell and place the corresponding measurement in an adjacent column. Use a clear header row, such as Date and Sales, and avoid blank rows within the data. Dates should be actual Excel date values, not text that merely looks like a date. Formatting a text string to look like a date does not convert it into a date value.
To check a suspicious cell, select it and look at the formula bar and number format. You can also temporarily apply a General number format: a genuine date normally displays as a serial number. If dates were imported as text, use Data > Text to Columns and follow the wizard to convert them when the source format is supported, or correct the import settings and reload the data. Be careful with ambiguous strings such as 03/04/2025: depending on regional settings, that can mean March 4 or April 3.
- Put one observation per row, with the date and its value on the same row.
- Use consistent date values and avoid mixing dates with explanatory text in the date column.
- Sort chronologically if the order of observations matters, especially for a text-axis chart.
- Include headers when selecting the range so Excel can use them as series and axis labels.
For example, a table containing Date and Website Visits, with one date per row, can be selected before inserting a line chart. If the dates skip weekends or holidays, decide whether the chart should show the actual gaps or present the observations as evenly spaced reporting periods.
Create a line chart with a date axis
- Select the date column, the value column, and their headers. If the columns are not next to each other, select the first range, then hold Ctrl on Windows while selecting the second range.
- Choose Insert > Insert Line or Area Chart > 2-D Line. A line chart is a common choice for showing how a measure changes over time.
- If Excel places the wrong information on the horizontal axis, select the chart and use Chart Design > Select Data. Under Horizontal (Category) Axis Labels, choose Edit and select the date cells. Check the series entries as well, so the value range excludes the header and date column.
- Right-click the horizontal axis and choose Format Axis. In the Format Axis pane, expand Axis Options and set Axis Type to Date axis if that option is available and Excel has not already chosen it.
- Under Number in the same pane, choose a date format that suits the chart, such as a short month and year for a long timeline.
Ribbon wording can vary slightly across Excel updates. In Excel for Microsoft 365 on Windows, Chart Design appears when the chart is selected. Excel for Mac offers equivalent chart and axis formatting controls, though the pane layout can differ. Excel for the web supports creating and formatting common charts, but some detailed chart controls may be more limited than in the desktop app; open the workbook in desktop Excel if a particular axis setting is unavailable.
Choose between a date axis and a text axis
Use a date axis when spacing should reflect elapsed time. It is appropriate for daily, weekly, monthly, or irregularly timed observations where a longer gap should look longer. A text axis treats every label as a category. That can be a better fit for a report that compares a fixed sequence of periods, especially if the dates are labels for reporting batches rather than measurements taken at regular time intervals.
To switch the category-axis behavior, select the axis, open Format Axis, and choose Date axis or Text axis under Axis Options. If these choices are missing, confirm that you selected the horizontal category axis on a chart type that supports it, such as a line chart. An XY scatter chart does not use the same date-versus-text category-axis switch: its x-axis is numerical by design.
Consider weekly sales recorded only on Mondays. A date axis shows the actual calendar spacing, which is usually appropriate. If a chart compares a sequence of named fiscal periods that have been entered as text, a text axis may be clearer. The axis choice changes spacing, not the source data or the values themselves.
Set the date range, spacing, and labels
If the chart displays too many dates, adjust the axis rather than deleting valid records. In Format Axis, look under Axis Options for the date-axis units and bounds available for that chart. Depending on the axis and Excel build, you can set the major unit in days, months, or years, and specify minimum or maximum bounds. For a multi-year chart, a major unit of one year can reduce label clutter; for a short daily series, a smaller interval may be useful.
Bounds can focus attention on a particular time window, but they can also hide observations outside the visible range. Confirm that the displayed start and end dates communicate the intended scope. For compact charts, reduce label density or widen the chart before shrinking text until it is hard to read.
Date labels are controlled separately from the timeline itself. Under Number in Format Axis, choose a display format—for example, a short date for daily data or a month-and-year format for a long span. This changes how dates appear on the chart, not the underlying cell values. If the labels remain crowded, show fewer labels or use a wider chart area; rotating labels is another option where the formatting controls provide it.
When an XY scatter chart is a better choice
Choose Insert > Insert Scatter (X, Y) or Bubble Chart when the horizontal position must follow exact numeric values, or when observations are irregularly spaced and you need to treat each date as a true x-value. In an XY scatter chart, Excel uses the date serial numbers on the horizontal value axis. You can format that axis to display dates and set numeric bounds, but the controls are value-axis controls rather than category date-axis controls.
Scatter charts are also useful when the x-values are measurements rather than categories, such as elapsed time, temperature, or distance. A line chart is often easier for a familiar timeline with one observation per date. The choice is about how the x-values should work: category sequence or numeric position. A scatter chart can connect points with lines, but that does not make its x-axis a category axis.
Common date-axis problems and fixes
- Dates appear as serial numbers. Select the axis, open Format Axis, and set its Number format to a date format. If the cells themselves show serial numbers, format those cells as dates too.
- Dates appear in the wrong order. Check that the source cells are genuine dates and sort the source table oldest to newest. Text dates can sort alphabetically or inconsistently instead of chronologically.
- There is no visible gap for missing dates. A date axis preserves calendar spacing, but a text axis spaces only the listed categories. Switch to Date axis if the chart type supports it. Also check whether the dates are actual values rather than text.
- Excel plots dates as a separate data series. Open Chart Design > Select Data and check the series ranges. Remove the date column from the plotted values and assign it to Horizontal (Category) Axis Labels, unless you intended to build a scatter chart.
- The chart includes unwanted blank dates or odd labels. Review the selected source range for extra rows, blank cells, or text mixed into the date column. Adjust the chart data range or clean the source table.
When dates come from imported files, inconsistent regional formats are a frequent source of trouble. A value that Excel interpreted as text will not behave like a normal date axis value, even if its appearance resembles a date. Correcting the source data is usually more reliable than trying to repair the chart alone.
Frequently Asked Questions
How do I make dates appear on the x-axis in Excel?
Select the date and value columns, insert a line chart, then use Chart Design > Select Data if needed to assign the date cells to Horizontal (Category) Axis Labels. In Format Axis, choose Date axis when Excel has not selected it automatically.
Why are my dates equally spaced in an Excel graph?
The chart may be using a Text axis, which spaces categories evenly, or the chart may be an XY scatter chart with dates that have equal numeric intervals. For a line chart, choose Date axis to show elapsed-time gaps between dates.
Can an Excel scatter plot use dates on the x-axis?
Yes. Excel dates are numeric serial values, so an XY scatter chart can use date cells as x-values. Format the horizontal value axis with a date number format so the serial values display as calendar dates.
How can I show months instead of every date?
Open Format Axis for the horizontal axis and adjust the major unit or label interval, where available. You can also select a month-and-year number format. The exact controls depend on whether the chart uses a category date axis or a scatter chart’s value axis.
Why does Excel not recognize my dates?
The cells may contain text rather than date values, or the imported date order may conflict with your regional settings. Convert the source values to real dates and verify ambiguous formats before building or correcting the chart.
Make the chart readable and trustworthy
A good date axis communicates both sequence and time scale. Label the horizontal axis if the dates represent a specific measure, use a consistent date format, and choose a chart type that matches the data’s timing. Check the chart against the source table after changing axis settings: the first and last visible dates, gaps, and plotted values should all match the intended story. Most date-axis issues come down to one of three decisions—whether the cells are real dates, whether the chart uses categories or numeric x-values, and whether equal category spacing or actual elapsed time is the right representation.
Related
- Excel Regression Analysis Output: What Each Statistic Means
- Data Analysis in Excel: Methods, Steps, and Examples
- Excel Quick Analysis Button: What It Does and How to Use It
Try it: the Percentage Formula Generator: percent of, percent change, increase and decrease, with the formula.
More in Charts & pivot tables
- Find a Pivot Table in Excel: Locate It Across SheetsTo find an existing PivotTable in Excel, search the workbook for a label or value you know appears…
- Battery Chart in Excel: Build a Clear Charge GaugeYes—Excel can show a battery’s charge as a simple gauge using a 100% stacked bar chart. Enter the…
- Excel Bar Graph Conditional Formatting: Color by RulesExcel does not apply worksheet conditional formatting rules directly to the bars in a chart. To make bar…
- Excel Power Pivot vs Power BI: Which Fits?Excel Power Pivot is Excel’s data-modeling and analysis feature; Power BI is a broader platform for building, publishing,…
- Google Sheets Chart Custom Font: What You Can ChangeYes, you can change a chart’s font in Google Sheets: select the chart, open the Chart editor, choose…
- Excel Solid Line Chart: Create and Format OneTo make a solid line chart in Excel for Microsoft 365 on Windows, select your data and choose…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.