Connect via MCP →

Enter Calculation

Leave the default to convert a specific instant, or enter the current time in milliseconds.

Formula

Advertisement

Results

Unix Timestamp (Epoch)
1,700,000,000
seconds since Jan 1, 1970 UTC
Milliseconds 1,700,000,000,000
Minutes since epoch 28,333,333
Hours since epoch 472,222
Days since epoch 19,675

What is a Unix Timestamp?

A Unix timestamp (also called epoch time or POSIX time) is the number of seconds that have elapsed since 00:00:00 UTC on January 1, 1970 — the "Unix epoch" — not counting leap seconds. It is the universal way computers store a moment in time as a single number, independent of time zones. This calculator converts a value in milliseconds into the standard Unix timestamp in seconds, and also shows the equivalent minutes, hours, and days since the epoch.

Timeline starting at zero on January 1 1970 with a counter increasing toward the present moment
A Unix timestamp counts seconds elapsed since the epoch, January 1, 1970 UTC.

How to Use It

Enter a time value in milliseconds. To get the current Unix timestamp ("epoch now"), supply the present time in milliseconds; the default value is provided as an example. The calculator divides by 1,000 and rounds down to give whole seconds, the format expected by almost every API, database, and programming language.

The Formula Explained

The core conversion is $$\text{Epoch} = \left\lfloor \dfrac{\text{Time (ms)}}{1000} \right\rfloor$$ Milliseconds offer thousandth-of-a-second precision, but the classic Unix timestamp is measured in whole seconds, so we take the floor (drop the fractional part). From there, dividing the epoch by 60, 3,600, and 86,400 yields minutes, hours, and days respectively.

$$\begin{aligned} \text{Minutes} &= \left\lfloor \tfrac{\text{Epoch}}{60} \right\rfloor \\ \text{Hours} &= \left\lfloor \tfrac{\text{Epoch}}{3600} \right\rfloor \\ \text{Days} &= \left\lfloor \tfrac{\text{Epoch}}{86400} \right\rfloor \end{aligned}$$
Milliseconds value divided by 1000 and floored to produce epoch seconds
Dividing milliseconds by 1000 and flooring yields whole epoch seconds.

Worked Example

Suppose the current time is 1,700,000,000,000 milliseconds. Dividing by 1,000 gives 1,700,000,000 seconds — that is the Unix timestamp.

$$\left\lfloor \frac{1{,}700{,}000{,}000{,}000}{1000} \right\rfloor = 1{,}700{,}000{,}000 \text{ s}$$

Dividing 1,700,000,000 by 86,400 and flooring gives 19,675 days since January 1, 1970, which corresponds to mid-November 2023.

$$\left\lfloor \frac{1{,}700{,}000{,}000}{86{,}400} \right\rfloor = 19{,}675 \text{ days}$$

FAQ

Why seconds and not milliseconds? The original Unix standard uses seconds. JavaScript's Date.now() returns milliseconds, so you often divide by 1,000.

Does it handle time zones? No — Unix time is always UTC. The same instant has the same timestamp everywhere on Earth.

What is the year 2038 problem? Systems storing the timestamp in a signed 32-bit integer overflow on January 19, 2038. Modern 64-bit systems avoid this.

Last updated: