Date to UNIX Time Calculator

Date to UNIX Time Calculator

Emerging AI Skill PRO

Enter Calculation

Default is UTC+9 (Japan time). Use negative values for zones behind UTC.

Formula

t=86400·D+3600Hour+60Minute+Second−3600UTC Offsetwhere{D=days from 1970-01-01 to the chosen datedate=(Year,Month,Day)\begin{gathered} t = 86400 \cdot D + 3600\,\text{Hour} + 60\,\text{Minute} + \text{Second} - 3600\,\text{UTC Offset} \\[1.5em] \text{where}\quad \left\{ \begin{aligned} D &= \text{days from } 1970\text{-}01\text{-}01 \text{ to the chosen date} \\ \text{date} &= \left(\text{Year},\ \text{Month},\ \text{Day}\right) \end{aligned} \right. \end{gathered}
Usage stats

Advertisement

Results

UNIX Time
1,749,913,200
seconds since 1970-01-01 00:00:00 UTC
Definition POSIX time (no leap seconds)
Epoch 1970-01-01 00:00:00 UTC

Report an error on this page

What is UNIX time?

UNIX time (also called a UNIX timestamp or POSIX time) is the number of seconds that have elapsed since the UNIX epoch, 1970-01-01 00:00:00 UTC. It is a universal, language-neutral way to represent a moment in time as a single integer, used throughout computing for logs, databases, APIs and programming. No leap seconds are applied — every day is treated as exactly 86,400 seconds.

Timeline showing the UNIX epoch starting point and seconds counting forward
UNIX time counts seconds elapsed since the epoch, 1970-01-01 00:00:00 UTC.

How to use this calculator

Enter the calendar date (year, month, day) and the time (hour, minute, second) as they appear on a local wall clock. Then set the "Time difference from UTC" to the timezone offset of that local time in hours. For example, Japan is +9, India is +5.5, and US Pacific Standard Time is -8. The default offset is +9 (Japan time). Leave hour, minute and second blank to treat them as zero.

The formula explained

First the date is converted to a day count using the days-from-civil algorithm (by Howard Hinnant), which correctly counts days from the epoch for any Gregorian date, including leap years and pre-1970 dates. That day count is multiplied by 86,400 and the hours, minutes and seconds are added to get the seconds since 1970-01-01 00:00:00 in local time. Finally the UTC offset (in hours × 3600) is subtracted to shift the result to UTC.

$$\begin{gathered} t = 86400 \cdot D + 3600\,\text{Hour} + 60\,\text{Minute} + \text{Second} - 3600\,\text{UTC Offset} \\[1.5em] \text{where}\quad \left\{ \begin{aligned} D &= \text{days from } 1970\text{-}01\text{-}01 \text{ to the chosen date} \\ \text{date} &= \left(\text{Year},\ \text{Month},\ \text{Day}\right) \end{aligned} \right. \end{gathered}$$
Advertisement
Diagram breaking a date and time into days, hours, minutes, seconds and a UTC offset adjustment
The formula sums days, hours, minutes and seconds, then subtracts the UTC offset.

Worked example

For 2025-06-15 00:00:00 at offset +9: daysSinceEpoch = 20254, so localSeconds = 20254 × 86400 = 1,749,945,600.

$$\text{localSeconds} = 20254 \times 86400 = 1{,}749{,}945{,}600$$

Subtracting 9 × 3600 = 32,400 gives a UNIX time of 1,749,913,200, which is 2025-06-14 15:00:00 UTC.

$$1{,}749{,}945{,}600 - 9 \times 3600 = 1{,}749{,}945{,}600 - 32{,}400 = 1{,}749{,}913{,}200$$

Common UNIX Timestamp Reference Values

UNIX time counts the seconds elapsed since 1970-01-01 00:00:00 UTC (the epoch). The table lists well-known values and the UTC date and time each represents.

UNIX timestamp (seconds) Date and time (UTC) Note
-1 1969-12-31 23:59:59 One second before the epoch
0 1970-01-01 00:00:00 The epoch
86400 1970-01-02 00:00:00 Exactly one day after the epoch
1000000000 2001-09-09 01:46:40 One billion seconds
1234567890 2009-02-13 23:31:30 Sequential digits
1700000000 2023-11-14 22:13:20 1.7 billion seconds
2000000000 2033-05-18 03:33:20 Two billion seconds
2147483647 2038-01-19 03:14:07 Maximum of a 32-bit signed integer (231 − 1)

Timestamps in seconds currently have 10 digits. The millisecond version, used by JavaScript and many APIs, has 13 digits. If a timestamp has 13 digits, divide by 1000 to get seconds.

Time Unit and Timezone Offset Conversions

Enter the offset in the calculator as decimal hours east of UTC (negative values are west of UTC). The calculator subtracts the offset from the local time to get UTC, so the timestamp is \(t = t_{\text{local}} - 3600 \cdot \text{offset}\). The offsets below are standard offsets. Daylight saving time shifts the offset, usually by one hour, so use the offset actually in effect on that date.

Zone Offset from UTC (decimal hours) Comment
UTC 0 Reference time
JST (Japan Standard Time) +9 No daylight saving
IST (India Standard Time) +5.5 +5 h 30 min
ACDT (Australian Central Daylight Time) +10.5 Summer time; the standard time ACST is +9.5
NPT (Nepal Time) +5.75 +5 h 45 min
CET (Central European Time) +1 In summer, CEST is +2
EST (US Eastern Standard Time) -5 In summer, EDT is -4
PST (US Pacific Standard Time) -8 In summer, PDT is -7
HST (Hawaii Standard Time) -10 No daylight saving
NST (Newfoundland Standard Time) -3.5 -3 h 30 min; in summer, NDT is -2.5
Unit conversion Value
Seconds per minute 60
Seconds per hour 3600
Seconds per day 86400
Seconds to milliseconds × 1000 (for example, new Date(seconds * 1000) in JavaScript)
Advertisement

Key Terms

Epoch
The starting point of a time count. For UNIX time it is 1970-01-01 00:00:00 UTC.
UNIX timestamp / POSIX time
The number of seconds elapsed since the epoch, not counting leap seconds. Dates before 1970 give negative values.
UTC
Coordinated Universal Time, the global time standard that local times are defined against.
UTC offset
The difference between a local time and UTC, such as +5:30 or -8:00. It is entered here as decimal hours (5.5 or -8).
Leap second
An occasional one-second adjustment to UTC. UNIX time ignores leap seconds and treats every day as exactly 86400 seconds.
Proleptic Gregorian calendar
The Gregorian calendar rules extended backward to dates before the calendar was introduced. Day counts in UNIX time conventionally use it.
Milliseconds timestamp
A UNIX timestamp multiplied by 1000, usually 13 digits long, as used by JavaScript and Java.
Year 2038 problem
Systems that store UNIX time in a 32-bit signed integer overflow after 2147483647 (2038-01-19 03:14:07 UTC). The value wraps to a negative number unless a 64-bit type is used.

FAQ

Why is the timestamp smaller than I expect for a positive offset? Because a local time ahead of UTC corresponds to an earlier UTC instant, so its UNIX value is lower than the same wall clock read as UTC.

Can it handle dates before 1970? Yes — the result is simply negative. 1969-12-31 23:59:59 UTC is \(-1\).

Are leap seconds included? No. This follows the standard POSIX definition where every day is exactly 86,400 seconds.

Last updated:

Most popular in Time and Date

View all Time and Date calculators