ExcelReady
CourseMock testsFunction guidesBlog
Start freeStart learning for free
ExcelReady

Be Excel-ready before day one. Hands-on practice in your browser, with instant feedback.

Learn

  • Course
  • Mock tests
  • Function guides
  • Blog

Test prep

  • Excel level test
  • Excel test practice
  • Free screening quiz
  • Certificate

Company

  • About
  • Editorial policy
  • Contact
  • Terms
  • Privacy

© 2026 ExcelReady. All rights reserved.

  1. Blog
  2. Dates
  3. Convert a Unix Timestamp to a Date in Excel

Convert a Unix Timestamp to a Date in Excel

By ExcelReady Team·Updated November 2, 2026·6 min read

The short answer

A Unix timestamp counts seconds since 1 January 1970 (UTC), and Excel counts days since 1900. To convert, divide by 86,400 (the seconds in a day) and add the 1970 start date: =A2/86400+DATE(1970,1,1). Then format the cell as a date and time. For milliseconds, divide by 86,400,000 instead.

Key takeaways

  • Unix time is seconds since 1 January 1970 UTC. Excel time is days, so divide by 86,400.
  • The core formula is =A2/86400+DATE(1970,1,1), then apply a date and time format.
  • 13-digit timestamps are milliseconds: divide by 86,400,000 instead.
  • The result is in UTC. Add or subtract hours/24 to move it to your time zone.
  • To go back, use =(B2-DATE(1970,1,1))*86400.
On this page+
  1. What is a Unix timestamp?
  2. The Unix timestamp formula in Excel
  3. How to show the date and time, not a number
  4. Timestamps in milliseconds
  5. How to adjust for your time zone
  6. When the timestamp is stored as text
  7. How to convert an Excel date to a Unix timestamp
  8. Practise it

To convert a Unix timestamp to a date in Excel, divide it by 86,400 and add the date 1 January 1970: =A2/86400+DATE(1970,1,1). Then format the cell as a date and time. This guide is for anyone who exports data from an app, database or web API and gets columns of long numbers like 1718454600 instead of dates.

What is a Unix timestamp?#

A Unix timestamp is the number of seconds since midnight UTC on 1 January 1970. That moment is called the Unix epoch. So 0 means 1970-01-01 00:00:00, and 1718454600 means 15 June 2024 at 12:30 UTC. Many systems store time this way because one number is easy to sort and compare.

Excel stores time differently. An Excel date is a serial number: the count of days since 1 January 1900, with the time of day as a decimal. So 45458 is 15 June 2024, and 45458.5 is noon on that day. The guide on why Excel dates are numbers explains this system in more detail.

Unix timeExcel time
UnitSecondsDays
Starts at1 Jan 1970, 00:00 UTC1 Jan 1900 (default system)
15 June 2024, 12:30171845460045458.5208…

To convert one to the other you need two steps: change seconds into days, then move the starting point from 1900 to 1970.

The Unix timestamp formula in Excel#

The formula divides by the seconds in one day (24 × 60 × 60 = 86,400) and adds the 1970 start date:

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

Here is a small export with timestamps in column B:

ABC
1EventUnix timeDate and time (UTC)
2Signup17040672002024-01-01 00:00
3Login17184546002024-06-15 12:30
4Order17305056002024-11-02 00:00

In C2, type =B2/86400+DATE(1970,1,1) and fill it down (Windows: Ctrl+D; Mac: ⌘D). Each part does one job:

  • B2/86400 turns 1718454600 seconds into about 19,889.52 days.
  • DATE(1970,1,1) returns 25569, the serial number of the Unix epoch.
  • Adding them gives 45458.52, which is 15 June 2024 at 12:30.

You may see the shorter =B2/86400+25569. It gives the same answer in the default date system, but DATE(1970,1,1) is easier to read and stays correct in a workbook that uses the 1904 date system, which some older Mac files do.

How to show the date and time, not a number#

The formula returns a serial number, so at first you may see 45458.52. That is normal. You just need a date format:

  1. Select the result cells.
  2. Press Ctrl+1 (Mac: ⌘1) to open Format Cells.
  3. Choose Custom and type yyyy-mm-dd hh:mm, or pick a Date format.

If you need the result as text, for example to join it into a sentence, wrap it in TEXT:

Excel formula
=TEXT(B3/86400+DATE(1970,1,1),"yyyy-mm-dd hh:mm")

This returns the text 2024-06-15 12:30. Text can't be sorted or used in date maths, so keep a real date column too. The guide to changing the date format covers more format codes, and why a date shows as a number helps when a column still looks wrong. If you only want the day, see how to remove the time from a date: =INT(B3/86400)+DATE(1970,1,1) returns 15 June 2024 with no time.

Timestamps in milliseconds#

A 13-digit timestamp is in milliseconds, not seconds. JavaScript and many web tools use this form, for example 1718454600000. Divide by 86,400,000 (the milliseconds in a day) instead:

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

A quick way to tell them apart: a 10-digit number is seconds and a 13-digit number is milliseconds, for any date between 2001 and 2286. If your result is a date far in the future, or shows only ##### signs, you have used the wrong divisor.

Some systems also export microseconds (16 digits). The idea is the same: divide by 86,400,000,000. Negative timestamps are dates before 1970, and the formula handles them too, as long as the result falls on or after 1 January 1900, the earliest date Excel can show in its default system.

How to adjust for your time zone#

Unix time is always UTC, so the converted date is UTC too. To show local time, add or subtract the offset in hours divided by 24:

Time zoneOffsetFormula
New York (EST, winter)−5 hours=A2/86400+DATE(1970,1,1)-5/24
Singapore+8 hours=A2/86400+DATE(1970,1,1)+8/24
India+5.5 hours=A2/86400+DATE(1970,1,1)+5.5/24

Excel doesn't know about daylight saving time. A fixed offset is fine for one season, but if your data spans a clock change, the hour will be off for part of the year. Many teams keep reports in UTC for this reason.

When the timestamp is stored as text#

Exports from CSV files or APIs sometimes bring timestamps in as text. Text usually sits on the left of the cell, and the formula may return #VALUE!. Wrap the cell in VALUE to turn it into a number first:

Excel formula
=VALUE(A2)/86400+DATE(1970,1,1)

The VALUE function guide explains when Excel converts text to numbers by itself and when it needs help. If the text is a normal date like "15/06/2024" rather than a timestamp, use the guide to converting text to dates instead.

How to convert an Excel date to a Unix timestamp#

To go the other way, subtract the 1970 start date and multiply by 86,400:

Excel formula
=(B2-DATE(1970,1,1))*86400

If B2 holds 15 June 2024 12:30, the result is 1718454600. Make sure B2 is in UTC first, or subtract your offset (for example -8/24 for Singapore) inside the brackets. Format the result as a number with no decimals, or Excel may show it in scientific notation like 1.72E+09.

Practise it#

The whole trick rests on one idea: Excel dates are day counts. Practise how Excel stores dates in a live spreadsheet, with DATE, YEAR, MONTH and DAY checked instantly as you type. Then try the TEXT and VALUE lesson to turn numbers into readable text and back. The exercise on this page lets you convert a real timestamp first.

Try it yourself

This is a live spreadsheet. Type the formula in the green cell and press Enter.

The login in row 3 has the Unix timestamp 1718454600. In D3, convert B3 to a readable date and time: divide by 86400, add DATE(1970,1,1), and wrap it all in TEXT(...,"yyyy-mm-dd hh:mm").

fx
ABCDE
1
Event
Unix time
2
Signup
1704067200
3
Login
1718454600
Date and time (UTC)
4
Order
1730505600
5
6
7

Tip: Work from the inside out: B3/86400 turns seconds into days, + DATE(1970,1,1) moves the start to 1970, and TEXT shows it as yyyy-mm-dd hh:mm.

Practise this in a lesson

LessonHow Excel stores dates: DATE, YEAR, MONTH, DAYLearn why every date is secretly a number, then build dates with DATE and take them apart with YEAR, MONTH and DAY.LessonTEXT and VALUE: numbers to text and backFormat dates and dollar amounts inside sentences with TEXT, and turn digits stored as text into real numbers with VALUE.Function guideVALUEFix numbers stored as text with Excel's VALUE function, so SUM and lookups work again. Examples, common mistakes and a live practice exercise.

Frequently asked questions

How do I convert a Unix timestamp to a date in Excel?

+

Use =A2/86400+DATE(1970,1,1), where A2 holds the timestamp in seconds. Then format the cell as a date, or as yyyy-mm-dd hh:mm to see the time too.

Why is my converted Unix timestamp a huge number or a date thousands of years away?

+

The timestamp is probably in milliseconds. A 13-digit value needs =A2/86400000+DATE(1970,1,1). A 10-digit value is in seconds and uses 86400.

Is a Unix timestamp in UTC?

+

Yes. Unix time is always counted from midnight UTC on 1 January 1970, so the converted date is UTC. Add your offset as hours/24, for example +5.5/24 for India Standard Time.

How do I convert an Excel date to a Unix timestamp?

+

Subtract the 1970 start date and multiply by 86,400: =(B2-DATE(1970,1,1))*86400. If B2 is local time, convert it to UTC first.

What is 25569 in Excel?

+

25569 is the serial number of 1 January 1970 in Excel's default 1900 date system. Some people write =A2/86400+25569, which works the same way as adding DATE(1970,1,1).

Sources

  • DATE function - Microsoft Support
  • Date systems in Excel - Microsoft Support
  • VALUE function - Microsoft Support

Written and checked by the ExcelReady Team. First published November 2, 2026. The practice exercise runs in the same formula engine as our lessons. Found a mistake? Read our editorial policy or email hello@excelready.app.

On this page

  1. What is a Unix timestamp?
  2. The Unix timestamp formula in Excel
  3. How to show the date and time, not a number
  4. Timestamps in milliseconds
  5. How to adjust for your time zone
  6. When the timestamp is stored as text
  7. How to convert an Excel date to a Unix timestamp
  8. Practise it

Keep reading

Basics· 5 min read

Why Excel Stores Dates as Numbers (and Why It Matters)

Excel stores every date as a number called a serial number: the count of days since 1 January 1900, which is day 1. So 1 January 2025 is 45658. The date format only changes how that number looks. Because dates are numbers, you can subtract them to get the days between, add days, sort them and compare them.

Dates· 5 min read

How to Convert Text to Dates in Excel

To convert text to a date in Excel, use =DATEVALUE(A2) or =VALUE(A2) when the text matches your computer's date format, then format the result as a date. For a whole column, use Data > Text to Columns and choose Date. For formats Excel can't read, like 20240315, rebuild the date with DATE, LEFT, MID and RIGHT.

Errors & fixes· 5 min read

Excel Date Showing as a Number? How to Fix It

Excel stores every date as a serial number, so 15 March 2024 is really 45366. When a date shows as a number, the cell has a General or Number format. Select the cells and choose Short Date on the Home tab, or press Ctrl+Shift+#. When you join a date to text, wrap it in TEXT, like TEXT(B2,"d mmm yyyy").

More on dates

  • Find Upcoming Birthdays in Excel With a Formula
  • How to Calculate the Week Ending Date in Excel
  • How to Get the Week Number From a Date in Excel
  • WEEKDAY in Excel: Find Weekends and Day Names
  • Calculate Working Hours Between Two Dates in Excel
  • YEAR, MONTH and DAY in Excel: Split a Date Into Parts
All dates articles →

Don't just read about Excel. Do it.

Practise real formulas in a live spreadsheet with instant feedback, right in your browser. Nothing to download.

Start learning for free