Epoch Time Calculator
Epoch time (also called Unix time or POSIX time) is the standard time representation in computing. It counts the number of seconds or milliseconds that have elapsed since the Unix epoch: midnight on January 1, 1970 in Coordinated Universal Time (UTC). The simplicity of a single increasing integer makes epoch time ideal for storing timestamps in databases, logging events, performing date arithmetic, and transmitting time across different time zones without ambiguity. However, epoch values are not human-readable on their own, which is where this calculator helps. Enter a Unix timestamp in seconds or milliseconds and the calculator converts it to UTC and local date-time strings and an ISO 8601-formatted string. Alternatively, enter an ISO 8601 date string and convert it to epoch seconds and milliseconds. The calculator also shows a live current epoch counter updating every second so you can see the current Unix time at a glance. Epoch seconds are currently a 10-digit number (approximately 1.75 billion); epoch milliseconds are a 13-digit number (approximately 1.75 trillion).
How epoch conversion works
All conversions go through JavaScript's Date object. For seconds input, multiply by 1,000 to get milliseconds before passing to the Date constructor. For ISO strings, the Date constructor parses them directly.
Milliseconds: ms = parseInt(epochInput)
ISO string: ms = new Date(isoInput).getTime()
const d = new Date(ms)
epochSec = Math.floor(ms / 1000)
epochMs = ms
utc = d.toUTCString()
local = d.toLocaleString("en-US")
iso = d.toISOString()
Worked example
Epoch seconds 1,700,000,000:
- Milliseconds: 1,700,000,000,000
- UTC: Wed, 15 Nov 2023 06:13:20 GMT
- ISO 8601: 2023-11-15T06:13:20.000Z
Epoch time calculator: frequently asked questions
What is epoch time?
Epoch time, also called Unix time or POSIX time, is the number of seconds (or milliseconds) that have elapsed since January 1, 1970 at 00:00:00 Coordinated Universal Time (UTC). It is the dominant time representation in computing because it is a single integer that increases monotonically, making it easy to store, compare, and do arithmetic with dates and times.
What is the difference between seconds and milliseconds epoch?
Traditional Unix and Linux systems count elapsed seconds since the epoch, so the current timestamp is roughly 1.7 billion. JavaScript and many web APIs count elapsed milliseconds, making the value roughly 1.7 trillion. When working with timestamps you must know which unit is being used: dividing a millisecond timestamp by 1,000 gives the seconds value.
What is ISO 8601?
ISO 8601 is an international standard published by the International Organization for Standardization that defines a clear, unambiguous format for dates and times. The most common form is YYYY-MM-DDTHH:MM:SSZ, where T separates the date and time parts and Z indicates UTC. JavaScript's Date.prototype.toISOString() returns this format.
How do I convert epoch to a date in JavaScript?
Pass the epoch in milliseconds to the Date constructor: new Date(epochMs). If you have seconds, convert first: new Date(epochSeconds * 1000). To display the result, use methods such as toUTCString(), toLocaleString(), or toISOString() on the resulting Date object.
Will epoch time run out?
On 32-bit systems that store the time as a signed 32-bit integer, the maximum value is 2,147,483,647 seconds, which corresponds to January 19, 2038 at 03:14:07 UTC. This is known as the Year 2038 problem (Y2K38). Modern 64-bit systems use a 64-bit integer for the timestamp and will not overflow for billions of years.
Official sources
- POSIX time definition: The Open Group Base Specifications Issue 7.
- ISO 8601 date and time format: International Organization for Standardization.
Reviewed by the CalculatorHub team, edited by James Graham, 14 June 2026. See our methodology.