Excel Date Time Serial Numbers Explained
In this article
Excel stores dates and times as serial numbers so you can use them in calculations. A date is a whole number counting days from January 0, 1900, and a time is a decimal fraction of a day. This system lets you add, subtract, and compare dates and times just like ordinary numbers.
How Excel's Date System Works
In Excel's default date system, the serial number 1 represents January 1, 1900. Each whole number adds one day. So January 2, 1900 is 2, and January 1, 2024 is 45292. This is called the 1900 date system, and it's the default on Windows versions of Excel.
Times are stored as decimal fractions of a 24-hour day. For example:
- 6:00 AM = 0.25 (a quarter of a day)
- 12:00 PM = 0.5 (half a day)
- 6:00 PM = 0.75 (three quarters of a day)
A full date and time combination is the integer part (the date) plus the decimal part (the time). For instance, January 1, 2024 at 6:00 AM is stored as 45292.25.
The 1904 Date System (Mac and Compatibility)
Older versions of Excel for Mac used a different starting point: January 1, 1904 is serial number 0. This is called the 1904 date system. It was originally chosen to avoid a leap year bug in Lotus 1-2-3, a spreadsheet program that predated Excel.
If you open a workbook created on a Mac that uses the 1904 system, dates will appear shifted by four years unless Excel adjusts them automatically. You can switch systems in Excel's options (under Advanced, in the "When calculating this workbook" section), but it's rarely needed today because modern Excel for Mac uses the 1900 system by default.
Why Does 1900 Have a Fake February 29?
Excel treats 1900 as a leap year, even though it wasn't. The year 1900 is not divisible by 400, so it should have only 28 days in February. But Lotus 1-2-3, which Excel was designed to be compatible with, mistakenly treated 1900 as a leap year. To ensure files transferred correctly, Excel kept the same bug.
The practical effect: serial number 60 corresponds to February 29, 1900, a date that never actually existed. If you enter that date in Excel, it will display it, but it's not a real calendar date. This doesn't affect dates after March 1, 1900, so for everyday use it's harmless.
How to See the Serial Number Behind a Date
To see the raw serial number for a date or time, change the cell's number format to General or Number. Select the cell, press Ctrl+Shift+~ (tilde) on Windows, or go to the Home tab, click the Number Format dropdown, and choose General.
For example, if a cell shows "1/15/2024" and you change the format to General, it will display 45306. Similarly, a cell showing "3:30 PM" will display 0.645833 when formatted as a number (because 3:30 PM is 15.5 hours out of 24, which is 0.645833).
Common Date and Time Formulas
Because dates are numbers, you can use them in arithmetic. Some common examples:
- Days between two dates: =B2-A2 (where B2 is the later date)
- Add days to a date: =A1+30 (adds 30 days)
- Extract the year: =YEAR(A1)
- Extract the month: =MONTH(A1)
- Extract the day: =DAY(A1)
- Get today's date: =TODAY() (returns the serial number for the current date)
- Get current date and time: =NOW() (returns the serial number for the current moment)
To find the time difference between two times, subtract the earlier time from the later one and multiply by 24 to get hours, or by 1440 to get minutes. For example, = (B1-A1)*24 gives the number of hours between 8:00 AM and 5:30 PM (which would be 9.5).
Formatting Dates and Times
Excel offers many built-in date and time formats. You can access them by right-clicking a cell, choosing Format Cells, and then selecting Date or Time. You can also create custom formats using codes:
- yyyy – four-digit year (2024)
- yy – two-digit year (24)
- mmmm – full month name (January)
- mmm – abbreviated month (Jan)
- mm – month number with leading zero (01)
- dd – day number with leading zero (05)
- hh – hour in 24-hour format (14)
- mm – minutes (note: same code as month, context matters)
- ss – seconds
For example, the format "yyyy-mm-dd hh:mm:ss" would display 2024-01-15 14:30:00. Be careful when using "mm" – if it follows "hh" or appears alone, Excel interprets it as minutes; if it follows "yyyy" or "dd", it's month.
Common Problems and Pitfalls
One frequent issue is that dates appear as numbers like 45292 instead of a readable date. This usually happens when the cell format is General. Fix it by applying a date format to the cell.
Another common problem is subtracting dates that include times. If you subtract two date-time values, you get a decimal that represents days and fractions of a day. To get the number of whole days, use =INT(B2-A2) or round down with =ROUNDDOWN(B2-A2,0).
When entering times, Excel interprets values as times if you include a colon. For example, typing 6:30 is treated as 6:30 AM. To enter 6:30 PM, type 18:30 or 6:30 PM. If you type just a number like 6.5, Excel treats it as 6.5 days (which is 6 days and 12 hours).
If you copy dates from another program, they may come in as text. You can convert text to dates using the DATEVALUE function or the Text to Columns wizard. A quick check: if a date is left-aligned in a cell, it's probably text; real dates are right-aligned by default.
Frequently Asked Questions
Why does Excel show ##### for a date?
The ##### symbols mean the column isn't wide enough to display the full date. Widen the column by double-clicking the right edge of the column header, or change the cell format to a shorter date style.
How do I convert a serial number to a readable date?
Select the cell(s) with the serial numbers, open Format Cells (Ctrl+1), go to the Number tab, choose Date, and pick a format. The serial number will then display as a date.
What is the maximum date Excel can handle?
Excel's date range is January 1, 1900 through December 31, 9999. The serial number for December 31, 9999 is 2,958,465. Dates outside this range will show as ##### or an error.
Why does adding 1 to a date sometimes give a time?
If the cell contains a date with a time (like 1/15/2024 14:30), adding 1 gives the next day at the same time. If you only want the date, use =INT(A1)+1 or format the result as a date only.
How do I calculate age in Excel?
Use the DATEDIF function: =DATEDIF(birthdate, TODAY(), "Y") returns the number of complete years. For example, =DATEDIF(A1, TODAY(), "Y") where A1 is the birthdate. This function is not listed in Excel's function wizard, but it works in all modern versions.
Is there a way to use dates before 1900?
Excel's standard date system doesn't support dates before January 1, 1900. For earlier dates, you can store them as text or use a custom calendar system. There's no built-in support for pre-1900 dates.