Days between dates

Unix timestamp to date

Paste an epoch timestamp in seconds or milliseconds, or an ISO date to get its timestamp. The current one is filled in.

What a Unix timestamp is

A Unix timestamp, or epoch time, is the number of seconds since 00:00:00 UTC on 1 January 1970, not counting leap seconds. 1700000000 is 22:13:20 UTC on 14 November 2023. Times before 1970 are negative.

The same instant has the same timestamp everywhere, which is why logs, databases and APIs store time this way: the time zone is only applied when the time is shown.

The converter tells the unit apart by length: up to 11 digits is read as seconds, 12 to 14 as milliseconds (JavaScript's Date.now()), 15 to 17 as microseconds and longer as nanoseconds. The answer says which it used.

Getting the current timestamp

JavaScript: Math.floor(Date.now() / 1000) for seconds, Date.now() for milliseconds.
Python: int(time.time()).
PHP: time().
Shell: date +%s, and date -d @1700000000 to read one back (on macOS: date -r 1700000000).
SQL: EXTRACT(EPOCH FROM now()) in PostgreSQL, UNIX_TIMESTAMP() in MySQL.

The year 2038 problem: a signed 32-bit number can hold timestamps up to 2147483647, which is 03:14:07 UTC on 19 January 2038. Systems that still store time in 32 bits will overflow then; 64-bit timestamps last for billions of years.

Famous timestamps

TimestampDate and time (UTC)What it is
01970-01-01 00:00:00The Unix epoch
10000000002001-09-09 01:46:40One billion seconds
12345678902009-02-13 23:31:30The digits 1 to 0
15000000002017-07-14 02:40:001.5 billion seconds
17000000002023-11-14 22:13:201.7 billion seconds
20000000002033-05-18 03:33:20Two billion seconds
21474836472038-01-19 03:14:07Last second of 32-bit time

Start of each year in Unix time

YearSecondsMilliseconds
197000
2000946684800946684800000
201012623040001262304000000
202015778368001577836800000
202417040672001704067200000
202517356896001735689600000
202617672256001767225600000
202717987616001798761600000
202818302976001830297600000
202918619200001861920000000
203018934560001893456000000
203520512224002051222400000
203821459168002145916800000
204022089888002208988800000
205025246080002524608000000

Midnight UTC on 1 January.

Questions

  • Is a Unix timestamp in UTC?

    It does not have a time zone: it counts seconds from a moment defined in UTC, so it is the same everywhere. The converter shows it in UTC and in your own time zone.

  • Why is my date in 1970 or far in the future?

    The unit is probably wrong: milliseconds read as seconds land tens of thousands of years ahead, seconds read as milliseconds in January 1970. Check the "Read as" line.

  • Do Unix timestamps count leap seconds?

    No. Every day is exactly 86,400 seconds in Unix time.

  • Can I paste an ISO 8601 date like 2022-12-28T18:28:40Z?

    Yes. The converter gives its Unix timestamp in seconds and milliseconds and shows it in UTC and in your time zone. A date with no offset is read as UTC.

  • Which calculator do I need?

    Seven calculators: days between two dates, add or subtract days, the countdowns to New Year, Thanksgiving and Black Friday, a Unix timestamp to a date and a date to a Unix timestamp. Each answers as you type, and the share bar links the calculation.

Sources

IEEE Std 1003.1 (POSIX), Base Definitions, section 4.16 "Seconds Since the Epoch".
ECMAScript Language Specification, section "Time Values and Time Range".

Written by the ufactory team and checked in October 2026.