What is a Unix Timestamp?
A Unix timestamp (also called epoch time or POSIX time) is the number of seconds that have elapsed since 00:00:00 UTC on January 1, 1970, not counting leap seconds. It is a universal, timezone-independent way to represent a moment in time, used widely in databases, APIs, log files, and programming languages. This converter treats your input as UTC and returns the matching epoch value in both seconds and milliseconds.
How to Use This Converter
Enter the year, month, day, hour, minute, and second of the moment you want to convert. All values are interpreted in UTC (Coordinated Universal Time). Press calculate and the tool returns the corresponding Unix timestamp in seconds, plus the millisecond value commonly required by JavaScript's Date object and many web APIs.
The Formula Explained
The calculation counts the number of whole days between January 1, 1970 and your chosen date, multiplies that by 86,400 (the number of seconds in a day), then adds the seconds represented by the time of day:
$$\text{epoch} = \text{days\_since\_1970} \times 86400 + \text{hours} \times 3600 + \text{minutes} \times 60 + \text{seconds}$$
The day count automatically accounts for leap years, so February 29 in years such as 2000, 2020, and 2024 is handled correctly.
Worked Example
Take January 1, 2024 at 00:00:00 UTC. From 1970-01-01 to 2024-01-01 there are 19,723 whole days. Multiply: $$19{,}723 \times 86{,}400 = 1{,}704{,}067{,}200 \text{ seconds}$$ With no additional hours, minutes, or seconds, the Unix timestamp is 1,704,067,200, and the millisecond value is 1,704,067,200,000.
FAQ
Is the input in my local time? No. To keep results unambiguous, all inputs are treated as UTC. Convert your local time to UTC first if needed.
Can the timestamp be negative? This tool accepts years from 1970 onward, so the result is always zero or positive. Dates before 1970 would produce a negative epoch.
Why are there both seconds and milliseconds? Most Unix systems use seconds, while JavaScript and many web APIs use milliseconds. Both are shown for convenience.