This converter takes a Unix timestamp in milliseconds and returns the corresponding calendar date and time in your local timezone. You enter the millisecond value, and you get back a readable date and time, such as 2025-05-14 09:30:00. It is the inverse of converting a date to milliseconds, which is how most programming languages and databases store timestamps.
Formula
The core formula is simple: Date = epoch + (milliseconds / 1000). The Unix epoch is January 1, 1970, 00:00:00 UTC. Every millisecond since then is added to that starting point. The division by 1000 converts milliseconds to seconds, which is the unit most date libraries use internally.
- ms – the input value in milliseconds (integer, e.g., 1715675400000)
- epoch – 1970-01-01T00:00:00Z (a fixed reference point)
- 1 second = 1000 milliseconds, so dividing by 1000 gives seconds
If you want to go the other way (date to milliseconds), multiply the Unix timestamp in seconds by 1000. For example, the date 2024-05-14 12:30:00 UTC corresponds to 1715675400 seconds, so in milliseconds it is 1715675400000.
Worked Example
Using the default value of 1,715,675,400,000 ms:
- Divide by 1000: 1,715,675,400,000 ÷ 1000 = 1,715,675,400 seconds
- Convert seconds to days: 1,715,675,400 ÷ 86,400 = 19,857.35 days (since 1 day = 86,400 seconds)
- Add to epoch (1970-01-01): 19,857 days later is May 14, 2024 (accounting for leap years)
- The fractional day 0.35 × 24 hours = 8.4 hours, so the time is 08:24 UTC
Thus the result is 2024-05-14 08:24:00 UTC (or your local equivalent). The calculator displays this in both your local timezone and UTC, so you can see the difference.
Why Milliseconds Matter
Millisecond precision is common in computing because many systems need to order events that happen within the same second. For example, a web server logging requests might record timestamps like 1715675400123 – that’s 123 milliseconds after the second. Without the millisecond component, you couldn’t tell which request came first.
Databases like MySQL and PostgreSQL store timestamps with microsecond or nanosecond precision, but many APIs (especially JavaScript and Java) use milliseconds since the epoch. JavaScript’s Date.now() returns milliseconds, and Java’s System.currentTimeMillis() does the same. That’s why you’ll often see 13-digit numbers when debugging code.
How to Read the Result
The output shows the date in two formats: your local timezone (the one your device is set to) and UTC (Coordinated Universal Time). The local time is what you’ll see on your calendar, while UTC is the standard reference used across time zones. For example, if you’re in New York (UTC-4 in summer), the same millisecond value will show as 04:24 local time and 08:24 UTC.
If you need a specific timezone, you can convert the UTC result manually by adding or subtracting the offset. For instance, Tokyo is UTC+9, so 08:24 UTC becomes 17:24 JST. The calculator doesn’t do timezone conversion beyond local vs. UTC, but the UTC output is the anchor you can adjust from.
Common Mistakes and Pitfalls
- Forgetting the “milli” part: A timestamp like 1715675400 is in seconds, not milliseconds. If you feed seconds into a millisecond converter, you’ll get a date in 1970. Always check the number of digits: milliseconds have 13 digits (until 2286), seconds have 10 digits.
- Negative timestamps: Dates before 1970 are represented as negative numbers. For example, -86400000 ms is December 31, 1969. The converter handles these correctly, but some people assume negative values are invalid.
- Timezone confusion: The same millisecond value represents a single instant in time, but the displayed date/time changes with your timezone. If you share a timestamp with someone in another timezone, always clarify whether you’re using UTC or local.
- Leap seconds: Unix time ignores leap seconds (the occasional extra second added to UTC). This means a timestamp can be off by a second from actual astronomical time, but this rarely matters for everyday use.
When to Use This Converter
You’ll need this tool when debugging logs, parsing API responses, or working with databases. For example:
- You see
"created_at": 1715675400000in a JSON response and want to know when that was. - You’re writing a script that needs to compare two timestamps and want to verify the dates.
- You’re migrating data from a system that uses milliseconds to one that uses human-readable dates.
- You’re testing a function that converts dates to milliseconds and want to check your work.
It’s also handy for understanding how computers store time. Once you internalize that a millisecond timestamp is just a count of milliseconds since 1970, you’ll be able to estimate dates without a tool – for example, 1,000,000,000,000 ms is roughly 2001-09-09, a fact often cited in early Y2K discussions.
Alternatives and Related Conversions
If you need to convert a date to milliseconds, you can use the inverse formula: take a date, compute the seconds since the epoch, and multiply by 1000. Many programming languages have built-in functions for this, such as Date.parse() in JavaScript or strtotime() in PHP. Online tools also exist, but this calculator is self-contained and doesn’t require an internet connection.
For dates beyond milliseconds, you might need microseconds (1/1,000,000 second) or nanoseconds (1/1,000,000,000 second). Some databases like PostgreSQL use microseconds, so a timestamp like 1715675400000000 is microseconds. The same division logic applies, just with a different factor (divide by 1,000,000 for microseconds).
Limitations of the Formula
The conversion is exact for any integer millisecond value within the range of JavaScript’s safe integer (about ±9 quadrillion ms, which covers dates from 1970 to 275,760). The calculator accepts up to 99,999,999,999,999 ms, which corresponds to the year 5138 – far beyond practical use. For negative values, it works down to -99,999,999,999,999 ms (year 1).
One limitation is that the result depends on your device’s timezone settings. If your system clock is wrong, the local time output will be wrong too. The UTC output is always correct regardless of settings, so rely on that for accuracy.
Frequently Asked Questions
What is the Unix epoch?
The Unix epoch is January 1, 1970, 00:00:00 UTC. It’s the reference point from which all Unix timestamps are measured. The choice is arbitrary but became standard because early Unix systems used it for simplicity.
Why are timestamps sometimes 10 digits and sometimes 13 digits?
A 10-digit timestamp is in seconds, while a 13-digit one is in milliseconds. For example, 1715675400 seconds vs. 1715675400000 milliseconds. The extra three digits are the milliseconds. Always check the unit before converting.
How do I convert milliseconds to a date in Excel?
In Excel, divide the milliseconds by 86400000 (the number of milliseconds in a day), then add the result to the date 1/1/1970. Format the cell as a date. For example, =A1/86400000 + DATE(1970,1,1).
What is the current time in milliseconds?
You can get it from Date.now() in JavaScript, or System.currentTimeMillis() in Java. Many online tools also display it. The value increases by 1000 every second.
Does the converter account for leap years?
Yes, because the conversion is based on the actual calendar, which includes leap years. The formula adds the milliseconds to the epoch and then calculates the date using the Gregorian calendar rules, so February 29 is handled correctly.
Can I convert a date to milliseconds with this tool?
No, this tool only goes one way. To convert a date to milliseconds, you can use the inverse formula: take the date, compute the seconds since 1970, and multiply by 1000. Most programming languages have built-in functions for this.
Related
Formula used
in ms | Milliseconds | ms | 1715675400000 | 0 | 99999999999999 out date | Date (local) | - | ms / 1000 | time out utc | Date (UTC) | - | ms / 1000 | time
Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.
More cards in this drawer
- Measuring Light Speed & Wavelength: How It Works
- Draco Race Blox Fruits: How to Get It
- Remove Google FRP Lock on Oppo: Step-by-Step
- Forza Horizon 6: Unlock Legend Island & Earn Horizon Legend
- Clean Hair Dryer Filter: Improve Airflow
- How to Automatically Create a Table of Contents