To make an Excel time chart, put each date or time in one column and its measurement in the next, select the data, then choose Insert > Insert Line or Area Chart > 2-D Line. Use a line chart for observations at regular intervals; use an XY scatter chart when the gaps between timestamps are meaningful and should be shown to scale.
What an Excel time chart shows
A time chart displays how a value changes over time. It might show hourly temperatures, daily website visits, weekly sales, or a machine reading recorded every few minutes. In Excel, “time chart” usually means a time-series chart rather than a special chart type: the chart type and axis settings depend on whether your time values represent dates, clock times, or elapsed durations.
Excel stores dates and times as numbers. A date is represented by a serial number, and a time is represented by a fraction of a day. For example, 12:00 noon is one-half of a day. A cell can display a friendly date or time format while retaining its numeric value, which is what lets Excel place it on a chart axis. Formatting a number as a date does not, by itself, turn text into a real Excel date.
The distinction between a category axis and a value axis matters. A line chart normally plots observations in order along a horizontal category axis. An XY scatter chart uses numeric x-values, so the horizontal distance between points reflects the actual time difference. If readings arrive at uneven intervals, that difference can change how a trend looks.
Prepare dates, times, and measurements
Arrange the data in a simple table with one time field and one or more numeric series. For example, column A could contain timestamps and columns B and C could contain indoor and outdoor temperatures. Put descriptive headings in the first row, keep each observation on one row, and sort the timestamps from oldest to newest.
- Use actual Excel date or time values, not text that merely looks like a date. If a value is left-aligned unexpectedly or does not sort chronologically, check whether it was imported as text.
- Keep the time unit consistent. Do not mix dates, text labels such as “Monday,” and elapsed-hour values in the same timestamp column.
- Use one row per observation. Avoid merged cells and blank rows inside the data block, which can make chart selection or series detection less predictable.
- Give each measurement column a clear heading, and check that values intended as numbers are not stored as text.
If the source contains separate date and time columns, Excel may need them combined into a single date-time value for a continuous axis. A simple way is to add the date and time values in a helper column, provided both are real Excel values, then format the result to display both date and time. Check a few rows before charting, especially after importing data from another system.
Create a basic time chart
In Excel for Microsoft 365 on Windows, select the timestamp column and the measurement columns, including their headings. Choose Insert > Insert Line or Area Chart > 2-D Line. Excel creates a chart with a separate line for each selected measurement series. If the chart puts timestamps in the legend or treats the first row as data, use Chart Design > Switch Row/Column or Chart Design > Select Data to correct the series and horizontal axis labels.
For a clearer chart, add a descriptive title and label the axes. Select the chart, then use Chart Design > Add Chart Element to add chart titles or axis titles. A useful title says what is measured and over what period, such as “Hourly Room Temperature, 8–10 June.” Keep the legend when it helps identify multiple series; remove it if there is only one line and the chart is already clear.
On Excel for Mac, the Insert tab also provides chart choices, though ribbon layout and command names can vary slightly by release. Select the data and choose a line chart from the Insert tab. The same general chart-formatting ideas apply; use the chart formatting controls to edit titles, axes, and series.
Choose between line, scatter, and column charts
A line chart is a good default when measurements are recorded at consistent intervals, such as every hour or every day. It connects adjacent observations and makes overall rises, falls, and recurring patterns easy to see. With a date axis, Excel can space dates according to calendar time, but a line chart still treats its horizontal positions as categories in many configurations. For irregular timestamp spacing, a scatter chart gives more control.
- Line chart: Best for showing a continuous trend across ordered dates or regularly spaced readings. It is often the simplest choice for daily or hourly summaries.
- XY scatter chart: Best when the x-values are numeric timestamps and intervals vary. Choose Insert > Insert Scatter (X, Y) or Bubble Chart, then select a scatter option. This plots the actual horizontal time values.
- Column chart: Useful for comparing totals or averages by hour, day, or month. It emphasizes separate periods rather than a continuous trend.
For example, readings taken at 9:00, 9:05, and 10:00 are only five minutes apart between the first two points, then fifty-five minutes apart. A line chart may give the three categories similar visual spacing; an XY scatter chart represents the elapsed intervals. If the objective is to compare the three recorded readings as entries rather than show elapsed time, equal spacing may be acceptable.
Format the horizontal time axis
To adjust the axis, right-click the horizontal axis and choose Format Axis. In the Format Axis pane, review Axis Options and Number. For a line chart with recognized dates, Excel may offer an Axis Type setting that lets you choose a Date axis rather than a Text axis. A date axis can space calendar dates according to the time scale and group the display into days, months, or years where appropriate.
Choose a number format that is readable at the chart’s size. A long date-and-time label on every tick can overlap, so consider showing dates only, showing times only for a single-day chart, or displaying fewer labels. You can change the source cells’ number format or the axis number format in the Format Axis pane. For a chart spanning several days, labels such as “10 Jun” are often easier to scan than full timestamps.
For an XY scatter chart, the horizontal axis is numeric. Set its bounds and units in Axis Options when you need to focus on a particular time window or control the spacing of tick marks. Excel represents date-time values numerically, so scatter axes can use date and time number formats too. Avoid setting a minimum or maximum that accidentally excludes observations you want readers to see.
Plot durations and times that pass midnight
Clock time and elapsed time are not interchangeable. A reading at 1:00 AM is a time of day; a task lasting 25 hours is a duration. If you chart durations, use a duration format such as [h]:mm. The square brackets tell Excel to show accumulated hours instead of restarting the hour display at 24. Without brackets, a 27-hour duration can appear as 3:00, which is misleading.
Suppose A2 contains a start time of 10:00 PM and B2 contains an end time of 2:00 AM, with no dates included. With the start time in A2 and end time in B2, enter =MOD(B2-A2,1) in C2. The result is four hours; format C2 as [h]:mm to display 4:00. The MOD calculation handles a single overnight rollover when only clock times are supplied.
If the interval may span more than one day, record full date-and-time values instead of clock times alone. With the start date and time in A2 and the end date and time in B2, enter =B2-A2 in C2. For a start of 9 June at 8:00 AM and an end of 10 June at 11:30 AM, the result is 27 hours and 30 minutes; applying the [h]:mm format displays 27:30. This approach preserves the number of elapsed days.
Handle gaps, duplicate times, and noisy data
Blank cells can change a line chart’s appearance. Depending on the chart’s settings, Excel may leave a gap, show a zero, or connect points across a blank. Select the chart and choose Chart Design > Select Data > Hidden and Empty Cells to review how empty cells are shown. A gap is often the most honest choice when no measurement exists; connecting across missing readings can imply a continuity that was not observed.
Duplicate timestamps also deserve attention. If two readings share the same time, a line chart can draw a vertical segment or make the order of the readings difficult to interpret. Decide whether the duplicates are separate events, should be averaged, or represent a data-entry issue before charting. For high-frequency data, label density can become a problem; showing fewer tick labels does not remove data points, it simply makes the axis easier to read.
For data that crosses time zones or daylight-saving changes, confirm what the source timestamps mean. Excel date-time values do not carry a time-zone identifier. A repeated local clock time during a daylight-saving transition can therefore be ambiguous unless the source preserves the zone or offset separately. Use a consistent time basis when comparing observations from different locations or dates.
Common chart problems and fixes
- The x-axis shows numbers: The chart may be displaying Excel serial values with a General number format. In Format Axis, choose an appropriate date or time number format.
- The timestamps are out of order: Sort the source table by the actual date-time values. Text-formatted timestamps may sort alphabetically rather than chronologically.
- The chart has one point per row but uneven times look equally spaced: Use an XY scatter chart if the actual elapsed intervals should affect horizontal spacing.
- Time labels overlap: Widen the chart, reduce the number of displayed axis labels, or use a shorter date/time format.
- A duration appears to reset after 24 hours: Apply the custom number format
[h]:mmto the duration cells or axis.
When the chart looks wrong, check the source data before changing chart formatting. Confirm that the timestamp column contains numeric date-time values, that the selected range includes the intended rows, and that each measurement series has the correct values. A formatting change cannot repair text timestamps or incorrect source measurements.
Frequently Asked Questions
Can Excel make a chart with time on the x-axis?
Yes. Select real Excel date-time values with their measurements and insert a line chart or XY scatter chart. Use a scatter chart when the physical spacing between timestamps needs to reflect the actual elapsed time.
Should I use a line chart or an XY scatter chart for time data?
Use a line chart for regularly spaced observations or when you want to show an ordered trend. Use XY scatter when timestamps are unevenly spaced and those time gaps matter to the interpretation.
How do I show hours greater than 24 in Excel?
Format the duration cells or chart axis with [h]:mm. The brackets keep the hour total from restarting at zero after a full day.
Why does Excel show my times as decimals?
Excel stores times as fractions of a day. Apply a time number format to the cells or chart axis to display them as clock times; the underlying numeric values remain available for plotting and calculation.
Can I chart time values without dates?
Yes, if the chart covers a single cycle or a short period where the clock times have an unambiguous order. If the data spans midnight or multiple days, include dates as well so the sequence and elapsed time are clear.
Related
- Color Certain Words in Excel: A Step-by-Step Guide
- How to Make Every Other Line a Color in Excel Quickly
- How to Make Every Other Row a Color in Excel (2 Ways)
Try it: the Percentage Formula Generator: percent of, percent change, increase and decrease, with the formula.
More in Charts & pivot tables
- Excel Pivot Chart: How to Change the Data Source SafelyTo change an Excel PivotChart’s data source, select its associated PivotTable, choose PivotTable Analyze > Change Data Source,…
- Excel Pie Chart: Exclude Zero Values and Empty SlicesExcel pie charts automatically omit zero values as slices, so you usually do not need to change a…
- Excel Line Charts: Ignore Blank Cells or Show Gaps?Yes. In Excel for Microsoft 365 on Windows, select the line chart, choose Chart Design > Select Data…
- Excel Extend Trendline Beyond Data Points?Yes. In Excel for Microsoft 365 on Windows, select the chart, choose Chart Design > Add Chart Element…
- Power Pivot Relationships: How They Work in Excel ModelsPower Pivot relationships connect tables in Excel’s Data Model through matching columns, letting a PivotTable combine fields from…
- Excel Chart Types: How to Choose the Right Chart for DataThere is no single best Excel chart type: choose the one that makes your data’s main message easiest…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.