To use dates in an Excel graph, enter your dates in one column and your corresponding values in the next, then insert a Line or Scatter chart. Excel automatically recognizes date formats and scales the horizontal axis to represent time chronologically, allowing you to visualize trends, growth, or fluctuations over days, months, or years.
What You'll Need
- Microsoft Excel installed on your computer.
- A dataset containing at least one column of dates and one column of numerical values.
- Dates entered in a format that Excel recognizes (e.g., MM/DD/YYYY or DD/MM/YYYY).
Step-by-Step
- Prepare Your Data: Arrange your data in two adjacent columns. Place the dates in the left column (X-axis) and the values you want to measure in the right column (Y-axis). Ensure there are no blank rows or columns within your data range.
- Format as Dates: Highlight your date column. Go to the Home tab, click the dropdown menu in the Number group, and select Short Date or Long Date. This ensures Excel treats the entries as chronological values rather than plain text.
- Select the Data: Click and drag your mouse to highlight both the date column and the value column, including the headers.
- Insert the Chart: Go to the Insert tab on the top ribbon. In the Charts group, select either the Line Chart icon or the Scatter Chart icon.
- Line Charts: Best for showing continuous trends over time.
- Scatter Charts: Best for plotting data points where the time interval between entries is irregular.
- Verify the Axis: Once the chart appears, Excel usually defaults the horizontal axis to a "Date axis." If the dates look crowded or incorrect, right-click on the horizontal axis (the dates) and select Format Axis.
- Adjust Axis Options: In the Format Axis pane that appears on the right, look for the Axis Options section. Under Axis Type, ensure Date axis is selected. This tells Excel to space the dates based on the actual time elapsed rather than just treating them as labels.
- Customize Date Intervals: In the same Format Axis pane, scroll down to Units. Here you can change the Base unit (Days, Months, or Years) and the Major unit (e.g., set it to "1 Month" to show a tick mark every month).
- Format Date Labels: To change how the dates appear (e.g., changing "1/1/2026" to "Jan-26"), scroll to the bottom of the Format Axis pane to the Number section. Choose the desired date format from the dropdown menu.
Common Mistakes
- Entering Dates as Text: Typing dates like "January 1st 2026" instead of "1/1/2026" often causes Excel to treat the date as text. Text cannot be scaled on a timeline, resulting in a graph that treats every entry as an equal distance apart regardless of the actual date.
- Mixing Date Formats: Using different formats (some as 01/01/26 and others as Jan 1, 2026) in the same column can confuse the chart engine.
- Using the Wrong Chart Type: Using a Column chart for a very long time series can make the X-axis unreadable. Line or Scatter charts are generally better for date-based data.
- Ignoring Blank Cells: Blank cells in a date column can create gaps or "drops" in a line graph, which may misrepresent the data trend.
Tips
- Use Tables: Convert your data range into an official Excel Table (Ctrl + T). When you add new dates to the bottom of a table, the graph will update automatically without you having to re-select the data range.
- Dynamic Date Ranges: If your graph looks too cluttered, use the Minimum and Maximum bounds in the Format Axis menu to zoom in on a specific time period.
- Scatter for Irregular Data: If you have data points from January 1st, January 2nd, and then not again until March 15th, a Scatter chart with straight lines will visually represent that large time gap more accurately than a standard Line chart.
Troubleshooting
If your graph does not display the dates correctly, try these steps in order:
- Check for "Text" Dates: Select a date cell. If it is aligned to the left of the cell by default, Excel thinks it is text. To fix this, select the column, go to the Data tab, select Text to Columns, click Next twice to get to Step 3, select Date, choose the correct format (e.g., MDY), and click Finish.
- Reset Axis Type: If the dates are appearing as numbers (e.g., 45657), right-click the axis, choose Format Axis, and ensure the Axis Type is set to Date axis and not Text axis.
- Update Data Range: If new dates aren't appearing, right-click the chart, choose Select Data, and ensure the "Chart data range" includes your new rows.
Frequently Asked Questions
Why are my dates showing up as numbers like 45291?
Excel stores dates as sequential serial numbers (where 1 is January 1, 1900). This happens when the axis is formatted as "General" or "Number" instead of "Date." Change the number format in the Format Axis pane to a Date format.
Can I make the graph show only every second or third date?
Yes. Right-click the horizontal axis, select Format Axis, and under Units, change the Major unit value. For example, changing "1 Day" to "7 Days" will show labels once per week.
How do I remove the gaps in my line graph where dates are missing?
Right-click the chart, go to Select Data, click the Hidden and Empty Cells button, and choose Connect data points with line. This prevents the line from dropping to zero.
Does the order of dates in my table matter?
Yes. For the most accurate and cleanest visual, sort your date column from Oldest to Newest before creating the chart. While Excel can sometimes handle unsorted dates, it often leads to erratic line crossings.
Can I use a date range that spans across different years?
Yes. Excel handles multi-year ranges automatically. To make it cleaner, use the Format Axis menu to set the Major unit to "1 Year" so the labels don't overlap.