Formula: Unix Timestamp Conversion & Formula
- epochSeconds: Epoch Seconds (sec)
- offsetHoursUtc: Offset Hours Utc (hours)
Rounding: Exact NIST/BIPM conversion factors are used internally; displayed values round to 2–4 decimal places.
Inspect Unix epoch seconds, milliseconds, and 32-bit signed integer headroom.
Rounding: Exact NIST/BIPM conversion factors are used internally; displayed values round to 2–4 decimal places.
It treats a very large value, such as a 13-digit number, as milliseconds, because that is almost always what it is. It divides by a thousand and tells you so in a warning. If your source really used milliseconds, the date is now correct. If it used seconds for a date far in the future, the conversion is wrong and you should not rely on it.
Yes. A Unix timestamp counts seconds from midnight UTC on 1 January 1970, so the same instant has the same number everywhere. Only the way it is shown on a local clock differs. That is why the headline, day count and rollover line do not move when you change the offset field. Only the local time line follows it.
Near midnight, the same instant can fall on different days in different places. The weekday line uses UTC, while the local line shows the weekday at the offset you entered. At the default both say Sunday, but an event late in the evening UTC can already be the next day in India. Check the local weekday when matching an event to a working day.
Modern operating systems and most current software store time in 64-bit fields, which last for billions of years, so everyday devices are generally safe. The risk sits in older embedded systems, legacy databases, file formats and code that still uses a 32-bit signed integer. Those are the places to check if a system must handle dates past 19 January 2038 at all.
When a signed 32-bit value passes 2,147,483,647, the next increment wraps it to the most negative value the field can hold. Software then reads the time as a date early in the twentieth century. On this page that situation shows up as a rollover line labelled past rather than until, such as the 6,261.532 days past for the higher scenario.
Yes. The field accepts decimals, and some systems log time as seconds with a fractional part for sub-second precision. The fraction carries through to the day count and the milliseconds line, but the date line shows whole seconds only, so very small fractions will not be visible there. For sub-second work, use a proper date library.
This page converts in one direction, from a timestamp to a date. To go the other way, use your programming language's date library or a command line tool to produce the seconds, then paste the number here. If the headline shows the date you started from, you have a confirmed pair you can use in tests or documentation.
Enter the offset as a decimal number of hours. India is 5.5, which the page labels UTC+05:30. A zone five hours and 45 minutes ahead would be 5.75. Zones west of UTC take a negative number, such as -5. The field does not apply daylight saving, so change it yourself for dates when local clocks have moved.
No. Every Unix day is treated as exactly 86,400 seconds, and the leap seconds that have been added to UTC are left out of the count. This keeps date arithmetic simple and is why this page can divide by 86,400 with no adjustments. It also means the day count is not a precise measure of physical seconds elapsed.
The limit of 2,147,483,647 seconds does not fall on a midnight, and your timestamp usually does not either. The page divides the gap in seconds by 86,400 without rounding to whole days, so you see figures such as 4,110.69 days at the default. Multiply the fraction by 24 to see the extra hours beyond the whole days.
Yes. Zero is the epoch itself, and the page shows 1970-01-01 00:00:00 UTC, a Thursday, with zero days elapsed. In practice a zero in a data field is often a sign of a missing or default value rather than a real event, so treat it with suspicion when you find it in logs or exports.
Start with the default timestamp, 1,792,320,000 seconds. The converter turns it into a date and time in UTC and shows 2026-10-18 10:40:00 UTC as the headline. Underneath it adds the weekday, Sunday, the same instant on a local clock at UTC+05:30, the count of days since 1970, the headroom left before a signed 32-bit counter runs out, and the value in milliseconds.
Each line answers a different question. The headline says when something happened. The weekday helps when you are matching a log entry to a working day or a weekend. The local line tells you what the clock on the wall read for someone in that time zone. The day count and the rollover line describe the number itself, which matters when you are storing it rather than reading it.
The day count is worth understanding on its own. The converter divides the seconds by 86,400, the length of a Unix day, and reports 20,744.444 days. The whole number is the count of complete days since midnight UTC on 1 January 1970 began. The fraction, 0.444, is how far through the next day the instant falls. Multiply it by 24 and you get about 10.67 hours, which is the 10:40 in the headline. That gives you a quick way to check the date line by hand.
The headline is written year first, then month, then day, then a 24-hour time. That order avoids the classic confusion between day-first and month-first dates, so 2026-10-18 can only mean 18 October. Times are shown to the second, with no fractions.
The weekday line is calculated in UTC. Near midnight, that can differ from the weekday on a local clock. The local line shows its own weekday in brackets, so compare the two whenever an event sits close to the end of a day. At the default they agree, because 16:10 local on 2026-10-18 is still Sunday.
All of these lines come from the same single number. If the date looks wrong, the problem is almost always the input, such as a value in the wrong unit or a timestamp copied with a digit missing, not the conversion.
For the page's lower scenario, 1,075,392,000 seconds, the headline reads 2004-01-29 16:00:00 UTC, a Thursday, and the local line shows 21:30 the same evening at UTC+05:30. For the higher scenario, 2,688,480,000 seconds, it reads 2055-03-12 16:00:00 UTC, a Friday.
The second input is your offset from UTC in hours. The default, 5.5, is India's offset, and the converter labels the result as Local time at UTC+05:30. Change it to -5 and the label becomes UTC minus five hours, the offset for Eastern Standard Time, with the date and time moved back accordingly.
The offset changes only that local line. The headline, the day count and the rollover line stay in UTC whatever you enter. That is the correct way to treat Unix time: a timestamp marks the same instant everywhere on Earth, and only its display changes from place to place.
Half-hour and quarter-hour zones are entered as decimals, so five hours and 45 minutes ahead is 5.75. The field holds one fixed number and knows nothing about daylight saving. A city that moves its clocks forward in summer needs a different offset for summer dates, and you have to supply it.
A common slip is to apply the offset in the wrong direction when going backwards. If a log shows Indian local time and you want UTC, subtract five and a half hours. The safest habit is to work in UTC first, then use the local line only for display.
Unix time is defined in seconds, but many systems store it in milliseconds. JavaScript's Date.now and Java's currentTimeMillis both return milliseconds, so their values are a thousand times larger and currently have 13 digits rather than 10.
This converter recognises that case. If you paste a 13-digit value, it assumes milliseconds, divides by a thousand and shows a warning saying it has done so. Paste 1,792,320,000,000 and you get the same 2026-10-18 10:40:00 UTC as the default. Read the warning, though. If your value really was in seconds, the date will now be wrong, and you need to know that.
Going the other way, the Milliseconds line gives the value a system expecting milliseconds would want: 1,792,320,000,000 ms at the default. Copy that when you need to feed the same instant into JavaScript or a database column stored in milliseconds.
Microsecond values, with 16 digits, are not caught by the same rule in a useful way. Dividing by a thousand only brings them down to milliseconds, which the page then reads as seconds. Divide microseconds by a million yourself before entering them.
Many older systems stored Unix time as a signed 32-bit integer. The largest value such a field can hold is 2,147,483,647, which falls at 03:14:07 UTC on 19 January 2038 by the calendar. One second later the counter overflows and wraps to a large negative number, so software reading it sees a date early in the twentieth century.
The rollover line measures how far your timestamp sits from that limit, in days. At the default it reads Days Until 32-bit 2038 Rollover, 4,110.69 days, which is a little over eleven years. For the lower scenario it reads 12,408.468 days.
Once a timestamp passes the limit, the label switches to Days Past the 32-bit 2038 Rollover and the figure stays positive. For the higher scenario that is 6,261.532 days past. The label change is the warning: a system still using a signed 32-bit field could not store that instant at all.
This is the practical use of the line. If a date must survive in an old database column, an embedded device or a file format with a fixed field, check whether the label says until or past before trusting it there.
Unix time runs backwards as well as forwards. A negative value is a moment before the epoch. Enter minus 86,400 and the day count reads -1, and the headline moves to midnight UTC at the start of the last day before the epoch, a Wednesday. With an offset of -5, the local line moves back again to the previous evening.
Birth dates, historical records and old archives often need these values, and most modern date libraries handle them. Some older tools and databases do not, and quietly reject or clamp anything below zero. If a pre-1970 date goes missing somewhere, this is a likely cause.
Spreadsheets add their own wrinkle. Many count dates in days from a starting point of their own, not from 1970, so a Unix value cannot be pasted into a date cell as it is. Divide the seconds by 86,400 to get Unix days, as the day count line does, and then add the spreadsheet's own number for 1 January 1970 to land on the right date.
The rollover line still works for negative inputs. It simply shows a larger number of days until the limit, because the instant is further from 2038 than the present day is.
Unix time treats every day as exactly 86,400 seconds. Real clocks have occasionally inserted leap seconds to keep UTC in step with the Earth's rotation, but Unix time does not count them. Systems either repeat a second or smear the adjustment across the surrounding hours.
So the day count is a count of Unix days, not of physical seconds elapsed. For business, logging and web use that is exactly what you want, because every day has the same length and date arithmetic stays simple. For precise scientific timing it is not, and a time scale built for that purpose is the better tool.
The page also does not handle time zones by name or daylight saving rules. It works with a number of hours you supply, which keeps it predictable but leaves the rules of each region to you. If you convert many timestamps from one place across a year, split them into summer and winter batches and run each batch with its own offset.
When a log line, API response or database row hands you a bare number, a short routine settles what it means. First count the digits. Ten digits is seconds for any date in the current era, 13 is milliseconds and 16 is microseconds. The page handles the first two; scale the third yourself.
Paste the value and read the headline. If it lands where you expect, the number is plausible. If a warning says the value was divided by a thousand, confirm that milliseconds were really intended. Then set the offset for the place the event happened and read the local line and its weekday.
Finally, glance at the rollover line. A label that says past warns you that a 32-bit system cannot hold the timestamp. A small until figure, a few thousand days like the 4,110.69 at the default, is a reminder that 2038 is not far away for any software built to last.