ThisCalculator

Everyday

Epoch Time to Normal Time Converter

Updated · Standard formula, shown below

The calculator for this page is switched off while it is checked. The formula is below, and the worked example in the article shows how to use it by hand.

This converter takes a Unix epoch timestamp (seconds, milliseconds, or microseconds since January 1, 1970, UTC) and returns the corresponding normal date and time in your local timezone, plus the UTC time. You enter the numeric timestamp and select its unit; the calculator instantly shows the human-readable date, time, and day of the week.

Formula

The core formula converts an epoch timestamp (in seconds) to a serial date number that spreadsheet programs recognize, then formats it as a calendar date and time.

For seconds: date = epoch_seconds / 86400 + 25569

For milliseconds: date = epoch_milliseconds / 86400000 + 25569

Where:

  • epoch_seconds – the number of seconds elapsed since 1970-01-01 00:00:00 UTC (can be negative for dates before 1970).
  • 86400 – the number of seconds in one day (24 × 60 × 60).
  • 25569 – the serial number of 1970-01-01 in the 1900 date system used by spreadsheets (the number of days from 1900-01-00 to 1970-01-01).
  • Local time – the result is then adjusted by your device’s timezone offset automatically.

Worked Example

Using the default input of 1710000000 seconds:

  1. Divide by 86400: 1710000000 ÷ 86400 = 19791.6666667 days.
  2. Add 25569: 19791.6666667 + 25569 = 45360.6666667 (this is the serial date).
  3. The integer part (45360) represents the day count; the fraction (0.6666667) represents 16 hours (0.6666667 × 24 = 16).
  4. So UTC time is day 45360 + 16:00, which corresponds to 2024-03-09 16:00:00 UTC.
  5. In a timezone like US Eastern (UTC−5 in March), the local time becomes 2024-03-09 11:00:00.

The calculator displays the local time based on your browser’s timezone, so the same timestamp will show different clock times depending on where you are.

What Is Epoch Time?

Epoch time (also called Unix time or POSIX time) is a system for tracking time as a single integer: the number of seconds that have elapsed since Thursday, January 1, 1970, at 00:00:00 UTC, not counting leap seconds. It is used widely in programming, databases, and file systems because it is simple to store, compare, and transmit. For example, the timestamp 0 means exactly midnight on January 1, 1970, UTC. A timestamp of 86400 means one day later, January 2, 1970, at 00:00 UTC.

One important nuance: epoch time is always UTC-based. It does not change with timezones or daylight saving time. The same integer represents the same instant globally; only the human-readable local time changes. This is why epoch time is preferred in logs and APIs – it eliminates ambiguity about which timezone the timestamp refers to.

How to Choose the Right Unit

Most programming languages and APIs return epoch time in one of three units:

  • Seconds – common in Python (time.time()), JavaScript (Date.now() returns milliseconds, but many libraries use seconds), and Unix command line tools like date +%s.
  • Milliseconds – used by JavaScript’s Date.now(), Java’s System.currentTimeMillis(), and .NET’s DateTimeOffset.UtcNow.ToUnixTimeMilliseconds().
  • Microseconds – used in PostgreSQL (extract epoch from timestamps), Go’s time.Now().UnixMicro(), and some high-precision logging systems.

If you are unsure which unit you have, a quick check helps: if the number has 13 digits, it is likely milliseconds; 10 digits means seconds; 16 digits means microseconds. For example, 1710000000 (10 digits) is seconds, while 1710000000000 (13 digits) is milliseconds and represents the same instant.

Common Mistakes and Pitfalls

Several errors frequently occur when working with epoch time:

  • Unit confusion – treating milliseconds as seconds or vice versa. This shifts the date by a factor of 1000, which could move it from 2024 to 1970 or far into the future.
  • Timezone neglect – forgetting that epoch time is UTC. If you convert without applying a timezone offset, you will get the UTC time, not your local time. Most converters (and this one) apply your local timezone automatically, but if you write your own code, you must handle it.
  • Negative timestamps – dates before 1970 are represented by negative numbers. For example, -86400 is December 31, 1969, 00:00 UTC. Some converters or spreadsheets mishandle negative values, so always test with a known date.
  • Leap seconds – epoch time ignores leap seconds. The International Earth Rotation Service occasionally adds a leap second to keep UTC aligned with Earth’s rotation, but epoch time simply counts seconds without them. This causes a tiny discrepancy (currently 27 seconds) between UTC and TAI (International Atomic Time), but it rarely matters for everyday conversions.

Why Use a Converter Instead of Doing It Manually?

Manual conversion is error-prone because it involves leap years, month lengths, and timezone rules. A converter handles all these automatically. For instance, to convert 1710000000 seconds manually, you would need to divide by 86400 (days), then figure out the year, month, and day, accounting for leap years – a tedious process. A converter also avoids mistakes with daylight saving time shifts, which vary by region and change twice a year.

Moreover, converters are essential when debugging logs or API responses. If you see a timestamp like 1710000000 in a server log, you need to know whether it is seconds or milliseconds, and what time that corresponds to in your local timezone. The converter gives you that answer instantly, letting you focus on the actual problem.

Alternatives to an Online Converter

If you prefer not to use a web converter, several other methods exist:

  • Spreadsheet functions – In Excel or Google Sheets, you can use =(A1/86400)+DATE(1970,1,1) for seconds, or =(A1/86400000)+DATE(1970,1,1) for milliseconds, then format the cell as a date/time.
  • Command line – On Linux or macOS, date -d @1710000000 converts seconds to local time. On Windows PowerShell, [DateTimeOffset]::FromUnixTimeSeconds(1710000000).LocalDateTime works.
  • Programming languages – Python: datetime.datetime.fromtimestamp(1710000000); JavaScript: new Date(1710000000000) (note milliseconds); PHP: date('Y-m-d H:i:s', 1710000000).

Each method has its own quirks, but they all rely on the same underlying conversion logic. The online converter is the quickest when you do not want to open a terminal or a spreadsheet.

Limitations of the Conversion

This converter (and most standard tools) does not account for leap seconds, as mentioned. It also assumes the Gregorian calendar, which is the standard internationally. For dates far in the future (beyond year 9999), some systems may overflow, but that is rarely a practical concern. Another limitation: the conversion to local time depends on your device’s timezone database, which can be outdated if your operating system is not updated. If you need precise historical timezone offsets (e.g., for dates before 1970 when timezone rules were different), you may need specialized historical timezone databases.

Frequently Asked Questions

What is the current epoch time?

The current epoch time changes every second. You can see it by running date +%s on Linux/macOS, or Math.floor(Date.now() / 1000) in a browser console. Many online converters also display the current timestamp at the top of the page.

How do I convert epoch time to a date in Excel?

In Excel, put the epoch timestamp in cell A1. For seconds, enter =(A1/86400)+DATE(1970,1,1) in another cell. For milliseconds, use =(A1/86400000)+DATE(1970,1,1). Then format that cell as a custom date/time format (e.g., yyyy-mm-dd hh:mm:ss). Excel will display the UTC time; to get local time, add your timezone offset manually or use =A1/86400+25569 and then adjust for timezone.

Why does my epoch timestamp show a different time than expected?

The most common reasons are: (1) you are using the wrong unit (seconds vs. milliseconds), (2) the timestamp is in UTC and you are expecting local time without applying the offset, or (3) the timestamp includes a timezone offset that you are not accounting for. Check the unit first, then verify the timezone setting of whatever tool you are using.

Can epoch time be negative?

Yes. Negative epoch timestamps represent dates before January 1, 1970. For example, -86400 is December 31, 1969, 00:00 UTC. This is valid and often used in systems that store historical dates. This converter handles negative values correctly.

What is the difference between epoch time and Unix timestamp?

They are essentially the same thing. “Unix timestamp” is the common name, while “epoch time” refers to the same concept. Both count seconds (or milliseconds) since the Unix epoch (1970-01-01 00:00:00 UTC). Some systems use “epoch” to mean any reference point, but in practice, it is almost always the Unix epoch.

How do I convert a normal date to epoch time?

To go the other direction, you can use the same tools: in Excel, =(A1-DATE(1970,1,1))*86400 for seconds; in JavaScript, Date.UTC(2024, 2, 9, 16, 0, 0) / 1000 (note month is 0-indexed). Many online converters offer a reverse mode.

Related

Formula used
in t | Epoch timestamp | - | 1710000000 | 0
sel unit | Input unit | Seconds=1, Milliseconds=0.001, Microseconds=0.000001
out local | Local date & time | - | (t * unit) / 86400 + 25569 | time
out utc | UTC date & time | - | (t * unit) / 86400 + 25569 | time
out day | Day of week | - | floor(mod((t * unit) / 86400 + 25569 - 2, 7)) | 0

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.