Excel date converter
Got 45921 where a date should be? Or dates four years off between two workbooks? This reads the number both ways.
Runs in your browser. Nothing you paste or drop here is uploaded anywhere.
The decimal part is the time of day. Arrow keys nudge it a day, Shift+arrows 30 days.
Auto counts anything from 100 000 000 000 up as milliseconds.
| 1900 systemWindows, Mac 2011+ | 1904 systemMac 2008 and older | |
|---|---|---|
| serial | 45921 | 45921 |
| date | Sun 21 September 2025 | Sat 22 September 2029 |
| time | 00:00:00 | 00:00:00 |
| ISO 8601 | 2025-09-21T00:00:00 | 2029-09-22T00:00:00 |
| Unix seconds | 1758412800 | 1884729600 |
| Unix ms | 1758412800000 | 1884729600000 |
| formula | =DATE(2025,9,21) | =DATE(2029,9,22) |
| C − B = 1462 days · 4 years + 1 day | ||
Same number, two dates, 1462 days apart. If dates jump four years and a day between a Mac and a Windows workbook, this is why.
Excel has no time zones: ISO 8601 and Unix values treat the cell as UTC wall time.
Numbers become dates, dates become serials, numbers bigger than Excel allows are read as Unix timestamps. Rows that can’t be read copy as empty lines, so the column stays aligned.
| # | Input | Result | Read as |
|---|
How to use it
- Type the number from the cell into Serial → date. Decimals are the time of day:
45921.75is 21 Sep 2025, 18:00. - Read both columns. B is the 1900 system (Windows, and Mac since 2011), C is the old Mac 1904 system.
- Going the other way, pick a date or type one into Date → serial. For
03/04/2025, say whether the day or the month comes first. - Click any cell to put its value in the
fxbar, then copy it. - Got a whole CSV column? Use Paste a column, then copy the results back as one column or as TSV.
What it does
Excel stores a date as the number of days since its epoch, and the time as the fraction of a day. In the default 1900 system, 1 is 1 Jan 1900 and 45921 is 21 Sep 2025. The cell format is the only thing that turns that number into a date, so when the format goes missing (a CSV export, a database import, a library that ignores styles) you get the raw number.
The 1900 system has a famous bug. Serial 60 is 29 Feb 1900, a day that never existed: Lotus 1-2-3 thought 1900 was a leap year and Excel copied it on purpose. That’s why Google Sheets, pandas and most code count from 30 Dec 1899: their serials match Excel from 1 Mar 1900 onwards and are a day off before it. Serial 0 shows as “0 Jan 1900”, which Excel genuinely displays.
The 1904 system starts at 0 = 1 Jan 1904. Excel 2008 for Mac and older used it by default, and any workbook can still switch to it. The same serial lands 1462 days later in 1904 than in 1900: four years and a day. That’s the gap you see when dates move between a Mac file and a Windows one. I wrote up how it bit me in Excel date mismatch and off-by-one errors.
Excel has no time zones, so ISO 8601 and Unix timestamps here treat the cell as UTC wall time. Excel’s range ends on 31 Dec 9999: serial 2958465 in the 1900 system, 2957003 in 1904. Anything outside that, or negative, is ########.
Questions
Why does Excel show 45921 instead of a date?
Because the cell lost its date format and you’re seeing the stored serial number: 45921 days since the epoch, which is 21 Sep 2025. Select the column and set the format to Date (Ctrl+1, or ⌘+1 on a Mac). In CSV exports the number is all there is, so convert it in the tool or in code.
Why are my dates 4 years and 1 day off?
One workbook uses the 1904 date system and the other uses 1900, so the same number means two dates 1462 days apart. Check File → Options → Advanced → Use 1904 date system (Mac: Excel → Preferences → Calculation). To fix copied values, put 1462 in a spare cell, copy it, and use Paste Special → Add (from 1904 to 1900) or Subtract (from 1900 to 1904) on the dates.
How do I convert an Excel date in Python or JavaScript?
Count days from 30 Dec 1899. In pandas: pd.to_datetime(df["date"], unit="D", origin="1899-12-30"). In JavaScript: new Date((serial - 25569) * 86400000), read with the UTC methods, since 25569 is 1 Jan 1970. Both are right for anything after 28 Feb 1900. For a 1904 workbook use origin="1904-01-01" or serial + 1462 first. Google Sheets uses the same 30 Dec 1899 epoch.
How do I turn a Unix timestamp into an Excel date?
Divide the seconds by 86400 and add 25569: =A1/86400+25569, then format the cell as a date. For milliseconds divide by 86400000. The result is UTC. Add your offset as hours/24 if you want local time, e.g. +3/24.
How do I turn text that looks like a date into a real date in Excel?
If the value hugs the left edge of the cell and changing the format does nothing, it is text. =DATEVALUE(A1) turns it into a serial number; then format the cell as a date. DATEVALUE reads the text in your system’s date order, so 03/04/2025 is 3 April in Europe and 4 March in the US. For a whole column, use Data → Text to Columns, press Next twice, choose Date and the order the text is written in (DMY, MDY, YMD).