timestamper.online

Generate Epoch Time in Excel

Use these Excel formulas to generate Unix timestamp (epoch) from any date/time or the current time. Includes seconds, milliseconds, timezone adjustments, and rounding.

Date/Time → Epoch (seconds)
excel
A1 contains a valid Excel date/time (UTC)

= (A1 - DATE(1970,1,1)) * 86400
Date/Time → Epoch (milliseconds)
excel
A1 contains a valid Excel date/time (UTC)

= (A1 - DATE(1970,1,1)) * 86400 * 1000
NOW() → Epoch (seconds)
excel
Generate current Unix time (seconds)

= (NOW() - DATE(1970,1,1)) * 86400
NOW() → Epoch (milliseconds)
excel
Generate current Unix time (milliseconds)

= (NOW() - DATE(1970,1,1)) * 86400 * 1000
Timezone & Rounding
Local time to UTC and whole‑second output
excel
If A1 is local time and your system is UTC+8, convert to UTC then to epoch (seconds)

= (A1 - (8/24) - DATE(1970,1,1)) * 86400
excel
Round down to whole seconds (avoid fractions)

= INT((A1 - DATE(1970,1,1)) * 86400)
  • Unix timestamp is defined in UTC. If your date/time is local, subtract your timezone offset in days (hours ÷ 24) before converting.
  • Use INT for whole seconds. For milliseconds, use ROUND or leave as decimal times 1000.
  • Format input cells as Date/Time; result cells can be General or Number.
  • Tip: If your workbook uses the 1904 date system (Excel for Mac option), turn it off for consistency, or adjust by +1462 days before converting.