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 1 January 1970, not counting leap seconds. It is the universal way computers store a moment in time, independent of time zones and calendar formatting. This calculator takes a timestamp in milliseconds (the unit returned by most programming languages, e.g. JavaScript's Date.now()) and converts it to seconds, minutes and days since the epoch.
How to Use It
Enter your Unix time in milliseconds into the field and submit. The tool floor-divides by 1000 to give whole Unix seconds — the most common form used by databases, APIs and Linux's date +%s. The result table also shows the original millisecond value plus elapsed minutes and days for quick sanity checks.
The Formula Explained
The core conversion is $$\text{Seconds} = \left\lfloor \frac{\text{Time (ms)}}{1000} \right\rfloor$$ Dividing by 1000 converts milliseconds to seconds, and the floor removes the fractional part so you get a whole-second timestamp. Minutes use \(\left\lfloor \frac{M}{60000} \right\rfloor\) and days use \(\left\lfloor \frac{M}{86400000} \right\rfloor\), since one day has 86,400 seconds = 86,400,000 ms.
Worked Example
Suppose \(M = 1{,}700{,}000{,}000{,}000\). Then $$\text{Seconds} = \left\lfloor \frac{1{,}700{,}000{,}000{,}000}{1000} \right\rfloor = 1{,}700{,}000{,}000 \text{ seconds}$$ which corresponds to 14 November 2023. Minutes since epoch = \(\left\lfloor \frac{1{,}700{,}000{,}000{,}000}{60000} \right\rfloor = 28{,}333{,}333\), and days = \(\left\lfloor \frac{1{,}700{,}000{,}000{,}000}{86{,}400{,}000} \right\rfloor = 19{,}675\).
Unix Time Unit Conversion Table
Unix time counts elapsed time since the epoch, 1 January 1970 00:00:00 UTC. It is usually stored in seconds or milliseconds. The table below gives common units in both.
| Unit | Seconds | Milliseconds |
|---|---|---|
| 1 millisecond | 0.001 | 1 |
| 1 second | 1 | 1,000 |
| 1 minute | 60 | 60,000 |
| 1 hour | 3,600 | 3,600,000 |
| 1 day | 86,400 | 86,400,000 |
| 1 week | 604,800 | 604,800,000 |
| 1 common year (365 days) | 31,536,000 | 31,536,000,000 |
Some languages and systems use finer precision. Microsecond timestamps have 1,000,000 units per second, and nanosecond timestamps have 1,000,000,000 units per second. To convert milliseconds to seconds, divide by 1,000 and round down: \(\lfloor \text{ms} / 1000 \rfloor\).
Note that Unix time ignores leap seconds, so every day is counted as exactly 86,400 seconds.
Notable Unix Timestamp Reference Values
| Timestamp (seconds) | UTC date and time | Note |
|---|---|---|
| 0 | 1 Jan 1970 00:00:00 | The Unix epoch |
| 1,000,000,000 | 9 Sep 2001 01:46:40 | One billion seconds |
| 1,500,000,000 | 14 Jul 2017 02:40:00 | |
| 1,700,000,000 | 14 Nov 2023 22:13:20 | |
| 2,000,000,000 | 18 May 2033 03:33:20 | Two billion seconds |
| 2,147,483,647 | 19 Jan 2038 03:14:07 | Maximum of a 32-bit signed integer |
Systems that store seconds in a 32-bit signed integer overflow one second after the last row. This is the "Year 2038 problem". 64-bit storage avoids it.
Digit-length guide
For current dates, the number of digits in a timestamp tells you its unit:
| Digits | Unit |
|---|---|
| 10 | Seconds |
| 13 | Milliseconds |
| 16 | Microseconds |
| 19 | Nanoseconds |
Example Inputs and Results Compared
Each result is floored: seconds = ⌊ms / 1000⌋, minutes = ⌊seconds / 60⌋, days = ⌊seconds / 86,400⌋.
| Milliseconds input | Seconds | Minutes | Days |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 999 | 0 | 0 | 0 |
| 1,000 | 1 | 0 | 0 |
| 59,999 | 59 | 0 | 0 |
| 86,400,000 | 86,400 | 1,440 | 1 |
| 1,700,000,000,000 | 1700000000 | 28,333,333 | 19,675 |
Worked check for the last row: \(\lfloor 1{,}700{,}000{,}000{,}000 / 1000 \rfloor = 1{,}700{,}000{,}000\) seconds. Then \(1{,}700{,}000{,}000 / 60 = 28{,}333{,}333.33\), which floors to 28,333,333 minutes. Finally \(1{,}700{,}000{,}000 / 86{,}400 = 19{,}675.9\), which floors to 19,675 days. The 80,000-second remainder is 22 h 13 min 20 s, matching 14 Nov 2023 22:13:20 UTC.
Negative values: times before 1970 are negative, and flooring rounds toward negative infinity, not toward zero. For example, -1 ms gives -1 s, because \(\lfloor -0.001 \rfloor = -1\). Truncation would give 0 instead. The same floor rule applies to minutes and days.
FAQ
Why seconds and not milliseconds everywhere? Older systems and many APIs (Unix, Postgres, JWT exp claims) store seconds, while browsers and Java use milliseconds. Converting between them is just multiplying or dividing by 1000.
What about leap seconds? Unix time ignores leap seconds, so the count is a clean linear measure — convenient for arithmetic but not perfectly aligned with astronomical UTC.
Will this break in 2038? Systems storing the second count in a signed 32-bit integer overflow on 19 January 2038. Modern 64-bit systems are unaffected.