Excel / Google Sheets ↔ Epoch
Excel Unix timestamp formula
Translate the serial numbers Excel and Google Sheets use internally into Unix timestamps and human-readable dates — and generate serial numbers from any date.
Excel / Google Sheets ↔ Epoch
Excel stores dates as serial numbers — days since 1899-12-30 (or 1904-01-01 with the 1904 system). Convert them to and from Unix time.
Serial number → Date & epoch
Example: 45000.5 (noon)
Date (local)
–
Unix seconds
–
Unix milliseconds
–
Relative time
–
Date → Serial number
Interpreted in the timezone selected below.
Excel serial number
–
Unix seconds
–
Unix milliseconds
–
Epoch → human date (full converter)
The complete epoch to human-date converter, with timezone support.
Seconds or milliseconds — the unit is auto-detected. Example: 1735689600
UTC ISO 8601
–
Local — auto
–
RFC 2822 / GMT
–
Seconds value
–
Relative time
–
How Excel stores dates
Excel and Google Sheets store dates as serial numbers: the number of days since a base date. The integer part is the day, and the fraction is the time of day (so 45000.5 is noon).
The 1900 date system
On Windows, Excel uses 1899-12-30 as serial number 1. The base is 30 December, not 31, because of a bug: Excel incorrectly treats 1900 as a leap year, so serial 60 is the fictitious 1900-02-29. On macOS, the default is the 1904 system with base 1904-01-01 — that's why the same serial number shows a different date on the two platforms.
Time in serial numbers
The fractional part represents the time: 0.5 = 12:00 noon, 0.25 = 06:00, 0.75 = 18:00. To get the epoch, multiply the days by 86,400 seconds (the number of seconds in a day) and offset from the epoch base. The converter above does this automatically.
Related tools: convert ISO 8601 strings to Unix timestamps, see the current epoch time in any timezone, or learn more in the Unix epoch time FAQ.