Excel Date Serial Numbers Explained: 1900, 1904 and Google Sheets
Why Excel shows 45658 instead of a date, how serial numbers and times work, the 1900 leap-year bug, and how to fix dates shifted by four years.

Open a CSV export, read an Excel file with a script, or paste data into a database, and a column of dates may turn into numbers like 45658 and 46331. Nothing is broken: that is how spreadsheets store dates. Once you know the rules, converting them back is simple.
Dates are counted days
Excel counts days from the start of 1900. Day 1 is 1 January 1900, day 45658 is 1 January 2025, and the count goes up by one each day. A date is just a number with a date format applied. Remove the format, or save to a system that ignores it, and the number shows through.
Times are fractions of a day. Noon is 0.5, 6 am is 0.25 and 6 pm is 0.75. So 45658.75 means 1 January 2025 at 18:00. A cell with only a time, such as 0.5, is a date of "day zero", which Excel displays as 0 January 1900.
The leap-year bug
1900 was not a leap year, but Excel behaves as if it were. Serial 60 is shown as 29 February 1900, a day that never existed. The reason is history: Lotus 1-2-3 had this bug, and Excel copied it so that spreadsheets would open with the same dates. Microsoft has kept it ever since.
In practice it matters only for dates before 1 March 1900. From serial 61 onwards everything is correct. Google Sheets, LibreOffice and Apple Numbers avoid the bug by counting from 30 December 1899, which means their serials match Excel exactly from March 1900 and differ by one day before it.
The 1904 date system
Early Macintosh Excel counted from 1 January 1904 instead. Some old workbooks still use it, and Excel for any platform will respect the setting stored in the file. The same date is 1,462 lower in the 1904 system, which is four years and one day.
The classic symptom: you copy dates from one workbook to another and every date jumps by four years and a day. One workbook uses the 1904 system and the other does not. The cure is to add 1,462 (when pasting 1904 dates into a 1900 workbook) or subtract it (the other way). You can check the setting under File, Options, Advanced, "Use 1904 date system".
Converting with the tool
The Excel Date Serial Converter handles all three systems.
- Pick the system. Excel 1900 for almost all modern files, 1904 for old Mac workbooks, or Google Sheets and LibreOffice.
- Say how typed dates are ordered. 05/03/2026 is 5 March in the UK and most of the world, and 3 May in the US.
- Convert one value. Type a serial to see the date, weekday, time and ISO form, or type a date to get its serial.
- Convert a column. Copy a whole column from your sheet, paste it in, and copy the results back into the next column. Lines that cannot be converted get a short note.
- Convert a CSV. Open the file, choose the column, and download a copy with a converted column added at the end.
- Fix a shift. The 1904 tab adds or subtracts 1,462 and gives the formula to do it inside Excel.
Doing it in formulas
Inside Excel you rarely need a converter: format the cell as a date. For text output, =TEXT(A2,"yyyy-mm-dd") turns a serial into an ISO date string, and =DATEVALUE("2026-11-05") turns text into a serial. To convert Unix timestamps, which count seconds since 1 January 1970, use =(A2/86400)+DATE(1970,1,1). The reverse is =(A2-DATE(1970,1,1))*86400. The constant 25,569 that appears in many scripts is simply the serial of 1 January 1970.
In code
Most languages need one line once you know the epoch. In Python, datetime(1899, 12, 30) + timedelta(days=serial) gives the right answer for every date from March 1900. In JavaScript, new Date(Date.UTC(1899, 11, 30) + serial * 86400000) does the same. Libraries that read XLSX files often do this for you, but only if the cell format is a date; a number-formatted cell comes through as a plain number.
Things to watch
Serial numbers carry no time zone. A timestamp exported from a system in UTC and opened in New York is still the same serial. Decide which zone the data is in and convert separately if needed.
Excel cannot store dates before 1900 as real dates; it keeps them as text. Historical data with earlier dates needs a different approach, such as ISO strings.
And when you see 8-digit numbers like 20260305, those are not serials but dates written without separators. The converter reads them as dates, not as day counts.



