Epoch Time in Excel, macOS, Windows and More

An “epoch” is the moment a computer system counts time from, and different systems picked different ones: Unix counts seconds from January 1, 1970, Excel counts days from January 1, 1900, Apple’s Cocoa framework counts seconds from January 1, 2001, and Windows file times count 100-nanosecond steps from January 1, 1601. Mixing them up is how a spreadsheet date jumps by four years or a log file shows 1601. This guide puts the same moment, midnight UTC on January 1, 2027, into nine systems side by side, gives copy-ready conversion formulas, and explains Excel’s famous phantom February 29, 1900. Every figure was computed and then converted back a second way. Facts are as of November 2026.

Key facts

  • Unix and JavaScript: from 1970-01-01 00:00 UTC (seconds and milliseconds respectively).
  • Excel (Windows default): “January 1, 1900 is serial number 1” (Microsoft); the 1904 system is 1,462 days different.
  • Google Sheets: “counts the days since December 30, 1899” (Google).
  • Apple Core Foundation / Cocoa: seconds from “1 January, 2001 00:00:00 GMT” (Apple, Core Foundation); NSDate counts from “the first instant of January 1, 2001, Greenwich Mean Time (GMT)” (Apple, Cocoa). Both are archived Apple guides.
  • Windows FILETIME: “100-nanosecond intervals since January 1, 1601 (UTC)” (Microsoft).

One moment, nine numbers

Here is 2027-01-01T00:00:00Z, the first instant of 2027 in UTC, as each system stores it. We computed each value from the system’s documented epoch in Python and then converted each one back to Unix time with the constants in the next section; all nine returned 1,798,761,600.

System Epoch (value 0) Unit 2027-01-01 00:00:00 UTC
Unix time (Linux, macOS, most APIs) 1970-01-01 00:00 UTC second 1798761600
JavaScript Date 1970-01-01 00:00 UTC millisecond 1798761600000
Excel, 1900 date system serial 1 = 1900-01-01 day 46388
Excel, 1904 date system 1904-01-01 day 44926
Google Sheets 1899-12-30 day 46388
Apple CFAbsoluteTime / Cocoa reference date 2001-01-01 00:00 GMT second 820454400
Windows FILETIME 1601-01-01 00:00 UTC 100 ns 134432352000000000
.NET DateTime.Ticks 0001-01-01 00:00 100 ns 639343584000000000
NTP (network time) 1900-01-01 00:00 UTC second 4007750400

JavaScript’s epoch is documented by MDN: a Date holds “milliseconds since the midnight at the beginning of January 1, 1970, UTC (the epoch)” (MDN); Node.js 22 returned the same 1798761600000 for Date.UTC(2027,0,1). .NET’s ticks are “the number of 100-nanosecond intervals that have elapsed since 12:00:00 midnight, January 1, 0001 in the Gregorian calendar” (Microsoft .NET docs). NTP’s 1900 epoch is in RFC 5905 (see our guide to Unix time and the Year 2038 problem for the Unix side).

Note that the Excel and Sheets numbers have no time zone. A serial of 46388 means “January 1, 2027” in whatever zone the person typing it had in mind; only the Unix-style counts pin down an instant.

Conversion constants

From To Unix seconds Constant (our calculation)
JavaScript ms ms ÷ 1000 –
Excel 1900 / Sheets serial (UTC) (serial − 25569) × 86400 25569 = serial of 1970-01-01
Excel 1904 serial (UTC) (serial − 24107) × 86400 24107 = 1904 serial of 1970-01-01
Apple CFAbsoluteTime value + 978307200 seconds from 1970 to 2001
Windows FILETIME value ÷ 107 − 11644473600 seconds from 1601 to 1970
.NET ticks value ÷ 107 − 62135596800 seconds from year 1 to 1970
NTP seconds value − 2208988800 seconds from 1900 to 1970

These constants ignore leap seconds, as Unix time itself does. With leap seconds ending under the 2026 decision on continuous UTC (see leap seconds explained), that will not change.

Excel: Unix time to a date and back

With a Unix timestamp in cell A2 and a workbook on the default 1900 system:

  • Unix seconds to Excel date (UTC): =A2/86400+DATE(1970,1,1), then format the cell as a date and time. For 1798761600 this gives 46388, which displays as 2027-01-01 00:00.
  • Unix milliseconds: =A2/86400000+DATE(1970,1,1).
  • Excel date to Unix seconds: =(A2-DATE(1970,1,1))*86400.
  • To local time: add the offset as a fraction of a day, such as -7/24 for UTC-7 (Vancouver since 2026) or +5.5/24 for India. A fixed offset does not follow daylight saving changes, so for places like New York you must pick the right offset for each date.

We checked the first formula in our own arithmetic: 1798761600 ÷ 86400 = 20819 days, plus 25569 = 46388, and the same day count gives 39448 for January 1, 2008, exactly Microsoft’s own example (“January 1, 2008 is serial number 39448”).

Excel’s 1900 leap-year bug

Excel’s 1900 system contains a day that never existed. Microsoft explains: “When Lotus 1-2-3 was first released, the program assumed that the year 1900 was a leap year”, and Excel copied the assumption “to use the same serial date system used by Lotus 1-2-3” (Microsoft Learn). So serial 60 is February 29, 1900, and serial 61 is March 1, 1900. Microsoft says the only practical effect is that “The WEEKDAY function returns incorrect values for dates before March 1, 1900”, and that fixing it would mean “Almost all dates in current Microsoft Excel worksheets and other documents would be decreased by one day.”

Google Sheets counts from December 30, 1899 instead. Google says “Sheets correctly treats the year 1900 as a common year, not a leap year”; it does not say why it chose that start date, but the effect is that Sheets serial numbers match Excel’s for every date from March 1, 1900 on. Our check: Python’s day count from 1899-12-30 to 1900-03-01 is 61, the same serial Excel gives.

Excel’s 1904 date system

Microsoft: “In the 1904 date system, dates are calculated by using January 1, 1904, as a starting point,” and “The difference between the two date systems is 1,462 days” (Microsoft Support). The 1900 system “is the default date system in Excel for Windows, Excel 2016 for Mac, and Excel for Mac 2011”; the 1904 system was “the default date system in earlier versions of Excel for Mac.” If dates jump by about four years when you paste between workbooks, one of them is on the 1904 system: 46388 − 44926 = 1,462.

How far each count can go

The Microsoft, Apple and .NET pages we read state each epoch but not why it was chosen, so we do not guess here. What the documentation does let us compute is range. MDN says a JavaScript Date can represent “±100,000,000 (one hundred million) days, relative to the epoch”, up to the year 275760. A signed 64-bit FILETIME runs to about the year 30828 (our arithmetic: 263 × 100 ns ≈ 29,227 years after 1601). Signed 32-bit Unix time runs out in 2038.

How to tell which epoch a mystery number uses

Digits (for dates near today) Probably
5 (about 46,000) Excel or Sheets days (1900 system)
9 (about 820 million) Apple seconds since 2001
10 (about 1.8 billion) Unix seconds
10 starting with 4 (about 4.0 billion) NTP seconds since 1900
13 (about 1.8 trillion) JavaScript or Java milliseconds
18 starting with 13 Windows FILETIME
18 starting with 63 .NET ticks

The digit counts come from the table above and hold for dates in roughly the 2020s and 2030s.

How we checked

All values were computed in Python 3 from each documented epoch (datetime arithmetic with UTC), then converted back to Unix time with the constants above; all matched. The JavaScript value was confirmed in Node.js 22. Excel serials were checked against Microsoft’s published example (2008-01-01 = 39448) by day counting. Quotes come from Microsoft Support and Learn, Google’s Sheets API guide, Apple’s developer archive and MDN, read on November 9, 2026. We did not run Excel itself; the formulas follow Microsoft’s documented serial system.

Sources

Frequently asked questions

What is Excel’s epoch?

In the default 1900 system, January 1, 1900 is serial 1. Because of the phantom February 29, 1900, dates from March 1, 1900 on behave as if day 0 were December 30, 1899.

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

Use =A2/86400+DATE(1970,1,1) and format the cell as a date. The result is in UTC.

Why does my Mac show dates four years off in Excel?

One workbook is on the 1904 date system. The two systems differ by 1,462 days.

What epoch does macOS use?

It depends on the layer. Apple’s Core Foundation and Cocoa date APIs measure from January 1, 2001 00:00:00 GMT. Unix-style timestamps on a Mac, like everywhere else, count from January 1, 1970.

What is a Windows FILETIME?

A 64-bit count of 100-nanosecond intervals since January 1, 1601 UTC. Divide by 10,000,000 and subtract 11,644,473,600 to get Unix seconds.

Similar Posts