Unix timestamps in Excel
Excel stores dates as days since 1900, with the time as a fraction of a day. Dividing a Unix timestamp by 86,400 turns seconds into days.
Get the current Unix timestamp
# NOW() is local time; see the timezone section
=ROUND((NOW() - DATE(1970,1,1)) * 86400, 0)
Convert a Unix timestamp to a date
# seconds in A2, result in UTC
=A2/86400 + DATE(1970,1,1)
# milliseconds in A2
=A2/86400000 + DATE(1970,1,1)
Format the result cell as a date, for example yyyy-mm-dd hh:mm:ss, or Excel shows a plain number such as 45244.92.
Convert a date to a Unix timestamp
# A2 holds a UTC date-time
=(A2 - DATE(1970,1,1)) * 86400
# milliseconds
=ROUND((A2 - DATE(1970,1,1)) * 86400000, 0)
Timezones
# UTC to IST (UTC+5:30)
=A2/86400 + DATE(1970,1,1) + 5.5/24
# UTC to US Eastern standard time
=A2/86400 + DATE(1970,1,1) - 5/24
Excel has no timezone database, so the offset is fixed. It won't follow daylight saving changes.
Common mistakes
- Excel dates are local wall-clock values with no zone. A Unix conversion gives UTC unless you add an offset.
- Excel treats 1900 as a leap year for Lotus 1-2-3 compatibility. This only affects dates before 1 March 1900. See the 1900 leap year bug.
- Workbooks using the 1904 date system (an option on older Macs) are 1,462 days off. Check File → Options → Advanced.
Complete example
A1: 1700000000
B1: =A1/86400 + DATE(1970,1,1) → 2023-11-14 22:13:20 (format as date)
C1: =(B1 - DATE(1970,1,1)) * 86400 → 1700000000
Check any value with the epoch converter, or convert a whole column with the batch converter. All examples use 1700000000 (2023-11-14 22:13:20 UTC) and 1794650400 (2026-11-14 10:00:00 UTC).