Dates & time · Calculation notebook

Unix Timestamp Converter: UTC Seconds & Millis: Worked Examples

Convert UTC dates to seconds or milliseconds since the Unix epoch. Trace two examples, negative timestamps and the absence of leap-second encoding.

Why the calculation is structured this way

The epoch is 1970-01-01T00:00:00Z. Multiplying epoch seconds by 1,000 yields milliseconds for Date arithmetic. Reversing divides by the selected factor. Unix time models do not encode leap seconds as an ordinary extra second label, and valid Date ranges bound the supported numerical input.

A second scenario you can verify

Timestamp zero maps to the epoch. One second maps to 1970-01-01T00:00:01Z; 1,000 milliseconds represents the same instant. Timestamp −1 second maps to 1969-12-31T23:59:59Z. Treating 1,000 seconds as 1,000 milliseconds would change the instant by 999 seconds.

What changes the interpretation

A date-time string without an explicit zone may be interpreted differently by external software. Use Z or a resolved offset when transferring values. A timestamp identifies an instant; preserving the intended civil-time zone is separate if a recurring schedule is involved.

Count epoch days to verify a modern timestamp

January 1, 2026 at 00:00 UTC is 56 ordinary year-length groups plus fourteen intervening leap days after January 1, 1970. The day total is 56 × 365 + 14 = 20,454. Multiplying by 86,400 gives the Unix seconds value 1,767,225,600. January 1 at 00:01 UTC adds sixty seconds, giving 1,767,225,660.

Milliseconds use the same epoch but a thousand times as many units, so midnight’s value is 1,767,225,600,000. Select the unit explicitly: feeding that number as seconds asks for a very different date, not the same instant with extra formatting. String length is a useful warning sign but is not a universal unit definition for historical or future values.

Negative values precede the epoch

Timestamp −1 in seconds maps to December 31, 1969 at 23:59:59 UTC. Timestamp −1 in milliseconds maps to that date at 23:59:59.999 UTC. Neither is an invalid negative duration: both are signed coordinates relative to the epoch. Zero maps exactly to January 1, 1970 at 00:00:00 UTC.

The timestamp-to-date direction accepts whole numeric units. A fractional seconds value is not silently rounded; use an integer millisecond value when subsecond precision is required. The date-to-timestamp form uses its stated minute-resolution clock input, so it does not reproduce an arbitrary timestamp containing seconds or milliseconds that the reverse form has no field for.

An epoch coordinate is independent of display zone

The UTC suffix Z is part of the interpretation of the returned ISO string. Formatting the same instant in another city changes its displayed date and clock, not the timestamp. Use the city-zone converter for that presentation question. Adding a current local offset to the timestamp itself would alter the instant and double-apply a conversion.

Unix representation here follows the runtime’s ordinary date model, without a separate leap-second label. Extremely large values can also exceed the supported integer or date range and are rejected rather than wrapped. Keep the original unit with exported values, validate a known epoch checkpoint, and avoid inferring local civil-time rules from a raw count of elapsed epoch units.

Input reference and units

These values reproduce the model’s demonstration. Replace them with your own records or measurements; they are not recommended targets.

On a small screen, swipe horizontally to see all columns. With a keyboard, focus the table and use the arrow keys.

Parameters used by this calculator
ParameterDemonstration valueHow to enter it
DirectionTimestamp to UTC date Select the explicitly labeled convention before interpreting the numerical input.
Unix timestamp0 Enter unix timestamp without adding a unit suffix. Scope: Negative timestamps represent times before the Unix epoch.
Timestamp unitSeconds Select the explicitly labeled convention before interpreting the numerical input.
UTC date1970-01-01 A real Gregorian date in years 0001–9999; calculations use UTC calendar dates.
UTC time00:00 24-hour HH:MM clock time, not decimal hours.

Unix Timestamp Converter: calendar conventions

Convert Unix timestamps to UTC ISO dates or convert a UTC date and time to a timestamp. Choose seconds or milliseconds explicitly instead of guessing from the number’s length. Negative timestamps represent times before the Unix epoch. No leap-second representation or local-time-zone conversion is included. Calendar-date inputs and calculated calendar dates must stay within years 0001–9999.

A Unix timestamp measures seconds or milliseconds from the UTC epoch. A value of 1000 in millisecond mode is 1970-01-01T00:00:01.000Z, while 1000 in second mode is 16 minutes 40 seconds after the epoch. The suffix Z denotes UTC. Negative values precede the epoch; local clock formatting is a separate operation.

timestamp seconds = UTC milliseconds since 1970-01-01T00:00:00Z / 1000
  • mode: Direction. Select the explicitly labeled convention before interpreting the numerical input.
  • timestamp: Unix timestamp. Enter unix timestamp without adding a unit suffix. Scope: Negative timestamps represent times before the Unix epoch.
  • unit: Timestamp unit. Select the explicitly labeled convention before interpreting the numerical input.
  • date: UTC date. A real Gregorian date in years 0001–9999; calculations use UTC calendar dates.
  • time: UTC time. 24-hour HH:MM clock time, not decimal hours.
  • Result units: stated beside each output
  • Calculation relationship: timestamp seconds = UTC milliseconds since 1970-01-01T00:00:00Z / 1000
  • Supported domain: see the limits below

Worked example

Unix Timestamp Converter baseline input: Direction: Timestamp to UTC date; Unix timestamp: 0; Timestamp unit: Seconds; UTC date: 1970-01-01; UTC time: 00:00. Output: UTC date and time = 1970-01-01T00:00:00.000Z. Substitute these values into the displayed equation to reproduce the result.

Reproduce the default scenario

This reproduces the default inputs in the reference table above; it is not an additional independent example. Displayed rounding may differ from intermediate precision.

UTC date and time
1970-01-01T00:00:00.000Z

Common questions and boundary checks

Does the tool guess seconds from digit count?

No. Select the unit explicitly.

What does timestamp zero mean?

1970-01-01T00:00:00Z.

Can timestamps be negative?

Yes within the supported range; they precede the epoch.

Is the ISO result local time?

It is UTC with a Z designation.

Does Unix time represent leap seconds directly?

Not as ordinary extra calendar-second labels in this model.

Sources and content notes

Toolify describes the implemented algorithm and its assumptions. Sources below support the topic or applicable rules; they do not endorse this calculator. Examples are illustrative, and published rules take precedence over simplified estimates.

Report a formula, example or translation issue through our contact page. Include the tool name, inputs and expected result so it can be reproduced. Contact Toolify

From question to result

Continue with a related question

Explore all Dates & time tools and guides