Excel · worked task guide
Plot Irregular Time Intervals in an Excel Chart
For unequal timestamp gaps, use an XY scatter chart with straight lines and markers. Assign real Excel dates and times as the Series X values and your measurements as the Series Y values. A line chart with a Date axis can handle calendar days; a Text axis spaces labels equally.
A log recorded at 08:00, 14:00 and two days later should show those different gaps. If all three points sit the same distance apart, the chart is showing observation order instead of elapsed time. Start by checking both the chart type and the underlying timestamp cells.
Choose the horizontal axis for your data
| Chart and axis | How X is positioned | Use it for |
|---|---|---|
| Line chart, Text axis | Each category receives an equal step, regardless of its label. | Named periods or observations where equal category spacing is intentional. |
| Line chart, Date axis | Calendar scale with day, month or year base units. | Date-based series when calendar-day resolution is enough. |
| XY scatter, value axis | The numeric X value determines the position, including fractions of a day. | Unequal hours, minutes, timestamps or other numeric intervals. |
Changing a line chart from a Text axis to a Date axis can restore calendar spacing. For the six-hour gap in this example, choose XY so the time within each day participates in the horizontal position. Microsoft documents this distinction in its scatter-versus-line chart guide.
Copy three readings with unequal gaps
On a blank worksheet named Readings, paste the following two-column data into A1. The timestamps are formulas so the example does not depend on interpreting a typed date such as 09/01/2026. These formulas use English function names and commas; use your Excel language’s names and argument separator if required.
Timestamp Reading
=DATE(2026,9,1)+TIME(8,0,0) 10
=DATE(2026,9,1)+TIME(14,0,0) 18
=DATE(2026,9,3)+TIME(2,0,0) 12Format A2:A4 using Format Cells → Custom with dd mmm yyyy hh:mm. Formatting changes the display while keeping the numeric value.
| Row | Timestamp | Reading | Gap from previous reading | Hours from first reading |
|---|---|---|---|---|
| 2 | 01 Sep 2026 08:00 | 10 | First reading | 0 |
| 3 | 01 Sep 2026 14:00 | 18 | 6 hours / 0.25 days | 6 |
| 4 | 03 Sep 2026 02:00 | 12 | 36 hours / 1.5 days | 42 |
Check =ISNUMBER(A2), then repeat for A3 and A4: each should return TRUE. In unused cells, =24*(A3-A2) should return 6 and =24*(A4-A3) should return 36. Format those check cells as General or Number.
Excel stores dates as day serials and times as fractions of a day: six hours is 6/24, or 0.25. See Microsoft’s DATE, TIME and IS functions references. A cell that merely looks like a timestamp can still contain text; applying a date format does not convert that text.
Assign the real timestamp range to X
- Select
A1:B4. In desktop Excel, choose Insert → Scatter (X, Y) → Scatter with Straight Lines and Markers. - Open Chart Design → Select Data. Select the Reading series and choose Edit.
- Set Series name to
=Readings!$B$1, Series X values to=Readings!$A$2:$A$4and Series Y values to=Readings!$B$2:$B$4. Exclude the header cells from X and Y. - Confirm the dialogs. Select the horizontal axis, open Format Axis → Number, and use a date-time format such as
dd mmm hh:mm. Clear Linked to source if you want a different axis format. - Keep the horizontal value axis linear. Leave its bounds automatic initially. If you set a six-hour major unit, enter
0.25: the X values are in days, so entering 6 would mean six days. - Check the spacing: the second-to-third point gap must be six times the first-to-second gap. The readings must remain 10, 18 and 12.
The X/Y boxes matter more than the displayed labels. If the horizontal axis shows 1, 2, 3, inspect the series: Excel may be using point numbers because the timestamp range was not assigned. Microsoft describes the two separate X/Y boxes in its data-series editing instructions and the left-column-X arrangement in its chart-data guide.
Sort complete rows and keep dates with overnight times
For a time sequence, sort the entire timestamp-and-reading table by timestamp, oldest to newest. Sorting only column A would pair times with the wrong measurements. A connected XY series follows the source row order; unsorted rows can make the line double back.
Keep the full date with each time when a log crosses midnight. A bare 02:00 time is less than 14:00 numerically, although 03 September 02:00 comes after 01 September 14:00. The DATE-plus-TIME formulas above preserve that difference.
Imported timestamp text needs conversion before charting. Check the input’s date order and timezone; Excel date serials do not themselves record a timezone. Use a consistent timezone for all observations, and inspect converted values rather than trusting their appearance.
Common questions
Can I keep my existing line chart?
For calendar-day data, select its horizontal axis and inspect Format Axis → Axis Type → Date axis. Choose an appropriate day, month or year base unit. For this example’s unequal intraday times, change the chart to XY and assign the timestamp range as X.
Why do I see large numbers instead of dates?
Those can be valid date serials displayed as numbers. Change the axis’s number format, then check the actual X range. Microsoft’s date and time formatting reference explains the display codes. Using TEXT() to create labels is not the same as retaining numeric timestamps for X.
What if I want an axis in hours from the start?
Put =24*(A2-$A$2) in C2 and fill through C4. Use C2:C4 as X; the example then plots at 0, 6 and 42. Format that axis as a number and label it “Hours from start”. Its major units are now hours, so enter 6 for six-hour ticks instead of 0.25.
Does the connecting line prove what happened between readings?
No. Keep the markers visible so readers can identify observations. The straight segments connect samples; they do not establish an intervening peak, constant rate or extra measurement. Use markers alone when joining the observations would imply too much.
Microsoft documentation reviewed . Original fixture and schematic; these steps have not been executed in a native Excel session.