Epoch to Date Converter
Our free time converter handles epoch date conversions. See tables, ratios, and examples for quick reference. Includes formulas and worked examples.
Epoch to Date Converter
Calculator
Adjust values & calculateEnter your values below. Every result is computed in your browser โ no data is sent to any server.
Formula: Date = new Date(epoch * 1000)
Worked example โ 1609459200 = January 1, 2021 00:00:00 UTC
Formula
Date = new Date(epoch * 1000)
Unix epoch time counts seconds since January 1, 1970 00:00:00 UTC. To convert to a date, multiply seconds by 1000 to get milliseconds (JavaScript standard). To convert a date back, divide the millisecond timestamp by 1000.
Worked Examples
Example 1: Convert Epoch to Date
Problem:What date does the epoch timestamp 1609459200 represent?
Solution:Multiply by 1000 to get milliseconds: 1609459200 x 1000 = 1609459200000 Create date: new Date(1609459200000) Result: January 1, 2021 00:00:00 UTC This is midnight on New Year's Day 2021.
Result:1609459200 = January 1, 2021 00:00:00 UTC
Example 2: Convert Date to Epoch
Problem:What is the epoch timestamp for July 4, 2025 at noon UTC?
Solution:Date: 2025-07-04T12:00:00Z Calculation: days from 1970-01-01 to 2025-07-04 = 20,273 days 20273 x 86400 + 12 x 3600 = 1751623200 + 43200 = 1751630400 Or use Date.UTC(2025, 6, 4, 12, 0, 0) / 1000
Result:July 4, 2025 12:00 UTC = 1751630400
Frequently Asked Questions
What is Unix epoch time?
Unix epoch time (also called POSIX time or Unix timestamp) is the number of seconds that have elapsed since January 1, 1970 at 00:00:00 UTC, not counting leap seconds. It is used by virtually all modern computer systems and programming languages as the standard way to track time. For example, the timestamp 1700000000 represents November 14, 2023 at 22:13:20 UTC.
What is the difference between epoch seconds and milliseconds?
Epoch seconds count whole seconds since January 1, 1970, while epoch milliseconds provide 1000 times more precision by counting thousandths of a second. Most Unix systems and languages like Python use seconds (10 digits, e.g., 1700000000), while JavaScript and Java use milliseconds (13 digits, e.g., 1700000000000). If your timestamp has 13 digits, it is in milliseconds.
Why does epoch time start on January 1, 1970?
The choice of January 1, 1970 as the epoch origin was made by early Unix developers at Bell Labs. It was a recent, round date that was easy to remember and provided a sufficiently large range for computing needs at the time. Using a fixed reference point simplifies time calculations across different time zones and systems, since all conversions are just arithmetic on a single integer value.
What is the Year 2038 problem?
The Year 2038 problem occurs because many older systems store epoch time as a signed 32-bit integer, which can hold a maximum value of 2,147,483,647. This corresponds to January 19, 2038 at 03:14:07 UTC. After this moment, the integer overflows and wraps to a negative number, potentially causing systems to interpret dates as December 13, 1901. Most modern systems have migrated to 64-bit integers, which can represent dates billions of years into the future.
How do leap seconds affect epoch time?
Unix epoch time does not account for leap seconds. When a leap second is inserted by international timekeeping authorities, Unix time essentially repeats a second or adjusts gradually. This means Unix timestamps are not perfectly synchronized with astronomical time (UTC), but the difference is negligible for most applications. Since 1972, only 27 leap seconds have been added, so the maximum discrepancy is 27 seconds.
How do I display a Unix timestamp in a particular time zone?
A Unix timestamp identifies an instant rather than a wall clock reading, so it is the same integer everywhere on Earth. Converting it for display means adding the target zone's offset from UTC, which for many zones changes during the year when daylight saving begins and ends. Reliable code therefore applies a named zone from the IANA time zone database rather than a hard-coded offset, since only the database knows the historical and seasonal rules for that location.
What is the difference between Unix time and ISO 8601?
Unix time is a single integer counting seconds from the epoch, compact and trivial to compare or subtract but unreadable to a person. ISO 8601 is a text format that spells out the calendar date and clock time, joining them with a T and terminating a UTC value with a Z. Databases and APIs often store the integer internally and emit ISO 8601 strings at their boundaries, since the text form is unambiguous about the zone and still sorts correctly.
Why do some APIs return timestamps in microseconds or nanoseconds?
Systems that order events at high rates need finer resolution than a whole second. Microsecond timestamps carry roughly sixteen digits and nanosecond timestamps roughly nineteen, against ten for seconds and thirteen for milliseconds. Divide by one million or one billion respectively to recover seconds before converting. Logging pipelines, database write-ahead logs, and distributed tracing tools commonly use these units so that two events falling in the same millisecond can still be sequenced correctly.
What does a negative Unix timestamp represent?
A negative value counts seconds backwards from the epoch and therefore represents an instant before 1 January 1970. Minus 86,400 is exactly one day earlier, 31 December 1969 at midnight UTC. Signed integer storage supports this naturally, but many parsers, spreadsheets, and database drivers reject or misinterpret negative timestamps, which is one reason historical dates are often stored as calendar strings instead. Testing with a pre-1970 value quickly exposes that weakness in a pipeline.
How can I tell whether a timestamp is in seconds or milliseconds?
Judge by magnitude rather than trusting the field name. Present-day instants have ten digits in seconds and thirteen in milliseconds. Interpreting a thirteen-digit value as seconds lands you tens of thousands of years in the future, while reading a ten-digit value as milliseconds places it in early 1970. A quick safeguard is to convert and confirm that the resulting year is plausible before the value is stored or compared against anything else.
References
Reviewed for accuracy by Manoj Kumar, Mathematics Educator ยท Editorial policy
Related Calculators
๐งฎTorque Unit Converter
Calculate torque unit converter with inputs, formulas, and instant results.
๐งฎElectrical Resistance Converter (ฮฉ, kฮฉ, Mฮฉ)
Calculate electrical resistance unit converter with inputs, formulas, and instant results.
๐งฎTime Unit Converter
Calculate time unit converter with inputs, formulas, and instant results.
๐งฎArea Converter
Calculate area converter with inputs, formulas, and instant results.
๐งฎAresto Hectares Converter
Calculate aresto hectares converter with inputs, formulas, and instant results.
๐งฎCentimeter to Inch Converter
Calculate centimeter to inch converter with inputs, formulas, and instant results.
๐งฎChain to Meter Converter
Calculate chain to meter converter with inputs, formulas, and instant results.
๐งฎDecimeter to Meter Converter
Calculate decimeterto meter converter with inputs, formulas, and instant results.