What Is Epoch (Unix) Time?
Epoch time (also called Unix time or a Unix timestamp) is the number of seconds that have elapsed since 00:00:00 UTC on January 1, 1970 — the "Unix epoch." It's a simple, timezone-free way for computers to store and compare moments in time, like 1718841600.
If you've seen a long number where a date should be, that's epoch time. Here's what it means and why it's used.
What Epoch Time Looks Like
An epoch timestamp is just an integer counting seconds:
1718841600 → Friday, June 20, 2025, 00:00:00 UTC
0 → Thursday, January 1, 1970, 00:00:00 UTC
Because it's a single number in UTC, it's unambiguous across timezones and trivial to compare or subtract. Convert any timestamp to a human date (and back) with our Unix Timestamp Converter.
Why January 1, 1970?
The Unix operating system was being developed around 1969–1971, and its designers needed a fixed reference point for the system clock. They chose the start of 1970 as a clean, recent epoch. The convention stuck and is now baked into virtually every programming language and operating system.
Why Computers Use Epoch Time
Storing time as one integer has big advantages over human date strings:
- Timezone-free — it's always UTC, so there's no ambiguity.
- Easy math — duration between two events is just subtraction.
- Compact and sortable — a single number sorts chronologically.
- Universal — every language can produce and parse it (
Date.now(),time(),System.currentTimeMillis()).
Human-readable dates are then formatted from the timestamp only when displayed.
Seconds vs Milliseconds
A common gotcha: not all "timestamps" use the same unit.
- Seconds — the classic Unix timestamp (10 digits today):
1718841600. - Milliseconds — JavaScript's
Date.now()and many APIs (13 digits):1718841600000.
If a converted date comes out as 1970 or far in the future, you probably mixed up seconds and milliseconds — divide or multiply by 1000.
Converting Epoch Time to a Date
In code it's straightforward:
// JavaScript (note: JS uses milliseconds)
new Date(1718841600 * 1000).toISOString();
// → "2025-06-20T00:00:00.000Z"
# Python (seconds)
from datetime import datetime, timezone
datetime.fromtimestamp(1718841600, tz=timezone.utc)
Or skip the code and paste the number into our Unix Timestamp Converter.
The Year 2038 Problem
Systems that store Unix time in a signed 32-bit integer will overflow on January 19, 2038, when the second count exceeds 2,147,483,647 — wrapping to a negative number and misreading the date. The fix is using 64-bit timestamps, which most modern systems already do (good for roughly 292 billion years).
Frequently Asked Questions
What is epoch time? The number of seconds since January 1, 1970, 00:00:00 UTC — a compact, timezone-free way computers represent a moment in time.
Why does epoch time start in 1970? Unix's designers chose the start of 1970 as a fixed reference point for the system clock, and the convention became universal.
What is a Unix timestamp? Another name for epoch time — the integer count of seconds (or milliseconds) since the 1970 epoch.
How do I convert epoch time to a date?
Use a converter tool, or in code multiply seconds appropriately (new Date(ts*1000) in JS, datetime.fromtimestamp(ts) in Python).
What is the year 2038 problem? Signed 32-bit Unix timestamps overflow on Jan 19, 2038. Using 64-bit timestamps avoids it, and most modern systems already have.
Related Reading
Epoch time turns "when did this happen?" into a single comparable number. Once you know it's just seconds since 1970 in UTC, those mysterious 10-digit timestamps stop being mysterious.