How to Convert Unix Timestamp to GMT Date in Excel

📅 Apr 02, 2026 📝 Sarah Miller

Processing raw Unix timestamps in Excel often frustrates analysts due to the lack of a native conversion button. While standard enterprise database sources natively format temporal data, Excel users must frequently bridge this gap manually. Fortunately, utilizing a mathematical formula grants instantaneous GMT readability without external plugins. One major stipulation to manage expectations is that Excel calculates time from a 1900 epoch, requiring us to divide the Unix integer by 86,400 and add a 25,569-day offset. For example, converting the timestamp 1609459200 accurately outputs January 1, 2021. Below, we outline the exact formula syntax and cell-formatting steps to streamline your workflow.

How to Convert Unix Timestamp to GMT Date in Excel

Excel Formula to Convert Unix Timestamp to GMT Date

In the world of software development, database administration, and system logging, time is frequently recorded as a Unix timestamp (also known as Epoch time or POSIX time). A Unix timestamp represents the number of seconds (or milliseconds) that have elapsed since the Unix Epoch: January 1, 1970, at 00:00:00 UTC/GMT.

While computers love Unix timestamps because they are simple integers that prevent timezone confusion, humans find them impossible to read at a glance. For instance, the timestamp 1711881600 doesn't immediately look like Easter Sunday in 2024. When you export raw data into Microsoft Excel for reporting or analysis, converting these raw integers into clean, readable GMT dates is one of the first tasks you must tackle. This guide provides comprehensive, step-by-step instructions and the exact formulas you need to convert Unix timestamps to GMT dates in Excel.

Understanding the Mathematical Logic Behind the Conversion

To build the conversion formula in Excel, we must understand how both Unix and Excel handle dates:

  • Unix Time: Counts time as the number of elapsed seconds since 1970-01-01 00:00:00 UTC.
  • Excel Time: Measures time in days starting from 1900-01-01. In Excel, the integer 1 represents one full day, and fractional decimals represent hours, minutes, and seconds (e.g., 0.5 represents 12 hours/noon).

Because Excel works in days and Unix works in seconds, converting a Unix timestamp to Excel's system requires two logical steps:

  1. Convert the Unix seconds into Excel fractional days by dividing the timestamp by the number of seconds in a day (86,400 seconds).
  2. Add the starting point offset of January 1, 1970, so Excel knows to count from the Unix Epoch rather than its default 1900 start date.

The Formula for Unix Timestamps in Seconds (10-Digit Timestamps)

If your dataset contains standard 10-digit Unix timestamps (such as 1609459200 for January 1, 2021), use the following formula. Assuming your raw timestamp is in cell A2, enter this formula in your target cell:

=(A2 / 86400) + DATE(1970, 1, 1)

How It Works:

  • A2 / 86400: There are 86,400 seconds in a day (24 hours × 60 minutes × 60 seconds). Dividing your timestamp by 86,400 converts seconds into days.
  • DATE(1970, 1, 1): This function returns Excel's serial number representation for January 1, 1970.
  • Adding these two values together yields the exact Excel date serial number representing the GMT date and time.

The Optimized Alternative Formula:

If you prefer a shorter formula, you can replace the DATE(1970, 1, 1) function with its hardcoded Excel serial number equivalent, which is 25569. This is highly recommended for massive spreadsheets where performance and calculation speeds are critical:

=(A2 / 86400) + 25569

The Formula for Unix Timestamps in Milliseconds (13-Digit Timestamps)

Many modern APIs, databases (like MongoDB), and JavaScript applications store timestamps in milliseconds instead of seconds. These are typically 13-digit numbers (e.g., 1609459200000).

If you try to use the standard 10-digit formula on a millisecond-based timestamp, Excel will return a date far into the future. To convert millisecond timestamps, you must divide by 86,400,000 (the number of milliseconds in a single day):

=(A2 / 86400000) + DATE(1970, 1, 1)

Or, using the optimized serial number shortcut:

=(A2 / 86400000) + 25569

Formatting the Output in Excel

When you first apply either of the formulas above, Excel will likely display a confusing raw decimal number (such as 44197.00) instead of a readable date. This is because the cell is still formatted as a generic "Number" or "General".

To transform this raw serial number into a legible GMT date format, follow these simple formatting steps:

  1. Select the cell or column containing your newly calculated formula.
  2. Right-click and choose Format Cells... (or press Ctrl + 1 on Windows, Cmd + 1 on Mac).
  3. In the Category list on the left, select Date or Custom.
  4. If you select Custom, type the following pattern into the Type box to display both date and time:
    yyyy-mm-dd hh:mm:ss
  5. Click OK. Your cell will now display a perfectly readable GMT date and time, such as 2021-01-01 00:00:00.

Converting GMT/UTC to Your Local Time Zone

By default, the formulas provided above output the exact GMT/UTC date and time. However, you might want to display the timestamp in your local time zone instead of Greenwich Mean Time.

To adjust the GMT result to a local time zone, you must add or subtract your time zone offset. Because Excel counts days as whole integers, hours must be added or subtracted as fractions of 24 hours.

The general formula for local time zone conversion is:

= (Unix_Timestamp_Formula) + (Time_Zone_Offset / 24)

Examples of Time Zone Adjustments:

  • Eastern Standard Time (EST / GMT-5): Subtract 5 hours.
    =((A2 / 86400) + 25569) - (5 / 24)
  • Eastern Daylight Time (EDT / GMT-4): Subtract 4 hours.
    =((A2 / 86400) + 25569) - (4 / 24)
  • Central European Time (CET / GMT+1): Add 1 hour.
    =((A2 / 86400) + 25569) + (1 / 24)
  • Indian Standard Time (IST / GMT+5:30): Add 5.5 hours.
    =((A2 / 86400) + 25569) + (5.5 / 24)

A Practical Conversion Walkthrough Table

Below is a quick reference table showing how various raw Unix timestamps (in both seconds and milliseconds) translate to GMT dates using these exact formulas, once they have been properly formatted in Excel.

Raw Unix Timestamp Type Excel Formula (GMT) Formatted GMT Date Output
0 Seconds =(A2/86400)+25569 1970-01-01 00:00:00
1609459200 Seconds =(A3/86400)+25569 2021-01-01 00:00:00
1609459200000 Milliseconds =(A4/86400000)+25569 2021-01-01 00:00:00
1711885230 Seconds =(A5/86400)+25569 2024-03-31 11:40:30
1711885230450 Milliseconds =(A6/86400000)+25569 2024-03-31 11:40:30

Troubleshooting Common Errors

If you run into issues while converting your timestamps, check for these common pitfalls:

1. The Date Looks Millions of Years in the Future

If your output results in a year like 48503 or similar, you have applied the seconds formula (dividing by 86,400) to a millisecond timestamp. Double-check your source data. If the timestamp is 13 digits long, divide by 86400000 instead of 86400.

2. #VALUE! Error

This error occurs if your Unix timestamps are formatted as text strings rather than numbers. This often happens during CSV imports. You can fix this by forcing Excel to treat the text as a number. Multiply the cell value by 1 within your formula:

=((VALUE(A2) / 86400) + 25569)

Alternatively, use the "Text to Columns" tool on your timestamp column to quickly convert the values back to numbers.

3. Negative Values or ##### Errors

If you see a string of pound signs (#####) in your formatted date cell, it means either your column is not wide enough to display the text or the calculation has resulted in a negative value. Excel cannot natively display dates before January 1, 1900. If your timestamp is prior to 1970 (represented by negative integers), your formula may calculate a date that falls outside Excel's valid ranges.

Summary of Best Practices

Converting Unix timestamps in Excel is quick once you memorize these rules of thumb. Keep these tips handy for your next data import task:

  • For standard 10-digit timestamps (seconds): Use =(Cell/86400)+25569.
  • For 13-digit timestamps (milliseconds): Use =(Cell/86400000)+25569.
  • Always apply a custom number format of yyyy-mm-dd hh:mm:ss to view the true date and time.
  • To display local time instead of GMT, add or subtract your offset divided by 24 (e.g., - (5/24) for EST).

Disclaimer:
The documents and templates provided on this page are for informational and illustrative purposes only. They do not constitute professional, legal, or financial advice, and should not be relied upon as such. Because individual circumstances and regulatory requirements vary, these materials may not be suitable for your specific needs. We recommend consulting with a qualified professional before adapting or using any of these examples for official or commercial purposes.