Unix Time Calculator | Epoch Seconds and UTC

Convert epoch seconds and milliseconds into UTC dates, local dates, ISO text, and developer-friendly timestamp values.

Updated: May 21, 2026 • Free Tool

Unix Time Calculator

Controls which input drives the results.

Numeric epoch value for timestamp mode.

Prevents second-millisecond scale errors.

Read as UTC, not browser local time.

Component value from 0 through 59.

Optional subsecond precision.

Results

Unix Seconds
1,704,067,200
Unix Milliseconds 1,704,067,200,000
ISO UTC Time 2024-01-01T00:00:00.000Z
UTC Date Jan 1, 2024, 00:00:00 UTC
Local Date Local display
UTC Weekday Monday

What This Calculator Does

The Unix Time Calculator converts between epoch timestamps and readable date-time values. Unix time is common in software because a single number is easier to sort, compare, store, and transmit than a formatted calendar string. The calculator accepts seconds or milliseconds, returns the matching ISO UTC time, and also displays the same moment in local time for comparison.

The tool is built for technical records rather than calendar planning. API responses, database audit columns, log lines, cache expiry fields, signed links, queue messages, and analytics exports often contain timestamps with little surrounding context. A timestamp such as 1704067200 is clear to a server, but it needs conversion before a person can confirm the calendar date, weekday, or local clock label.

  • API debugging: translate returned epoch values into UTC timestamps during response checks.
  • Database review: inspect created-at, updated-at, and expires-at fields without changing source data.
  • Scheduling checks: convert a planned UTC moment into seconds or milliseconds for job configuration.
  • Log comparison: keep event order consistent when services run in different local time zones.

For broader unit work, the Time Unit Converter covers hours, minutes, days, and other duration units that sit outside Unix timestamp notation.

This page is also useful when documentation mixes timestamp styles. Some systems print seconds, some print milliseconds, and some return ISO text with a trailing Z. Placing those representations next to each other reduces guesswork when a release note, incident record, or database migration needs one consistent time reference.

Unix time should not be confused with elapsed duration. A timestamp names a point on the global timeline, while a duration measures the distance between two points. That distinction matters when records cross midnight, cross time zones, or pass through daylight-saving transitions that affect local labels without changing the underlying UTC moment.

The calculator deliberately separates timestamp scale from time-zone display. Seconds and milliseconds change the magnitude of the input; UTC and local time change only the label shown after conversion. That separation helps teams catch the most common mistake: treating a 13-digit millisecond timestamp as a 10-digit second timestamp, or the reverse, then reading a date that is centuries away from the intended event.

How the Calculator Works

The calculation starts by choosing one direction. Timestamp-to-date mode reads the numeric value, applies the selected unit, and normalizes the moment to milliseconds. Date-to-timestamp mode reads the UTC date fields, builds one UTC moment, and then reports the same moment as Unix seconds and Unix milliseconds.

unix seconds = UTC milliseconds / 1,000

The reverse relationship multiplies seconds by 1,000. When the timestamp unit is milliseconds, the calculator keeps the value as the base millisecond value and divides by 1,000 only for the seconds result. When the unit is seconds, the value is multiplied by 1,000 before ISO UTC text, UTC display text, local display text, and weekday output are produced.

As published by The Open Group POSIX.1-2024 Base Specifications, seconds since the Epoch are related to UTC components for nonnegative values, and each represented day accounts for exactly 86,400 seconds.

A worked example shows the flow. The UTC date 2024-01-01 00:00:00 becomes 1,704,067,200 Unix seconds and 1,704,067,200,000 Unix milliseconds. If the millisecond input is 1,704,067,200,123, the seconds output becomes 1,704,067,200.123 and the ISO text keeps the .123 second precision.

The calculator rounds only at the display boundary. Internally, the normalized millisecond value drives every output, so the seconds result, milliseconds result, ISO string, UTC label, local label, and weekday all come from the same source value. That shared base prevents the subtle mismatch that happens when one result is recomputed from already rounded text.

Date input is treated as UTC even though browser date controls do not show a Z suffix. The field is parsed into year, month, day, hour, and minute components, then seconds and milliseconds are added from the adjacent fields. This keeps date-to-timestamp conversion independent from the machine's local timezone.

For decimal duration notation rather than epoch notation, the Decimal Time Conversion Calculator converts hours, minutes, and seconds into decimal-hour values used in timesheets and spreadsheets.

Key Concepts Explained

Unix timestamp work becomes easier when four ideas stay separate: the epoch, the unit scale, the UTC moment, and the display format. The calculator keeps those concepts visible so a timestamp can be checked without guessing which convention a system used.

Epoch

The epoch is the reference moment. For Unix-style timestamps, that reference is 1970-01-01 00:00:00 UTC, and later values are counted forward from it.

UTC Moment

UTC gives the neutral time label used before local offsets are applied. It is the safest comparison view when logs come from servers in different regions.

Seconds vs Milliseconds

Seconds are common in POSIX-style values. Milliseconds are common in browser and JavaScript contexts. The two scales differ by exactly 1,000.

ISO UTC Text

ISO-style UTC text keeps a human-readable date, time, and Z suffix together. It is often easier to paste into tickets, documentation, or audit notes.

As published by IETF RFC 3339, internet timestamps use a full-date and full-time profile so date-time values can be exchanged consistently across systems.

The phrase "timestamp to date" can hide several different outputs. A database administrator may need UTC for comparison, a support analyst may need local display for a customer report, and a developer may need ISO text for a fixture. Showing those outputs together makes the chosen representation explicit.

Seconds and milliseconds deserve special attention because both are plain numbers. A value copied from JavaScript often uses milliseconds, while a value copied from POSIX-oriented command output often uses seconds. The unit selector forces that choice into the open before any calendar label is trusted.

When local display rules matter, the Time Zone Converter helps compare the same moment across named time zones and regional offsets.

How to Use This Calculator

The inputs are arranged around the two common tasks: converting a Unix timestamp to date text, or converting a UTC date into timestamp numbers. All date input is treated as UTC so the result does not depend on the browser's local setting.

1

Choose Mode

Select timestamp-to-date for numeric epoch input, or date-to-timestamp for a UTC calendar value.

2

Enter Source Value

Provide either the Unix timestamp or the UTC date and time that should be converted.

3

Set Unit and Precision

Choose seconds or milliseconds, then add UTC seconds and milliseconds when date precision requires them.

4

Review Output Context

Compare Unix seconds, milliseconds, ISO UTC text, UTC display text, local display text, and weekday.

For timestamp-to-date work, a 10-digit value usually indicates seconds and a 13-digit value usually indicates milliseconds. That rule is only a clue; source documentation should still decide the unit. For date-to-timestamp work, the date field should represent UTC rather than a local meeting time or local calendar reminder.

The safest workflow is to keep the original source value beside the converted output. For example, a ticket can record the raw timestamp, the unit, the ISO UTC output, and the local label seen by an affected user. That small audit trail makes later review easier when multiple systems report the same event differently.

Date-to-timestamp mode should be used only after the intended date has been normalized to UTC. If a regional time is the source, it should be converted to UTC first. Otherwise the numeric timestamp may represent the correct clock label in the wrong time zone.

For everyday duration arithmetic near the converted date, the Time Calculator handles additions and subtractions that are better expressed as elapsed time than epoch values.

Benefits and When It Helps

Timestamp conversion is most valuable when it reduces ambiguity. Numeric values move cleanly through code, but people still need readable labels for review, documentation, release work, incident response, and data cleanup. The calculator keeps both forms together, which makes handoff between technical and nontechnical records less fragile.

It also supports repeatable checks. A database export may be reviewed today, then revisited months later during an audit. Keeping seconds, milliseconds, UTC text, and local text together makes the interpretation reproducible even if a reviewer uses a different device, locale, or timezone setting.

  • Unit checks: Seconds and milliseconds appear side by side, making scale errors easier to catch before a value enters code or configuration.
  • UTC consistency: UTC output provides one stable reference when local displays differ across laptops, servers, and monitoring tools.
  • Copy-ready documentation: ISO text gives a readable companion value for tickets, changelogs, audit notes, and release checklists.
  • Bidirectional review: Date-to-unix timestamp mode supports planned expiration dates, cache times, scheduled jobs, and test fixtures.
  • Pre-epoch awareness: Negative values can be inspected while the page still notes their portability limits under POSIX wording.

In incident response, this can shorten the path from a raw log value to a timeline. The numeric timestamp remains the durable evidence, while the readable date helps people align deploys, alerts, customer reports, and background jobs. In test data, the reverse conversion helps create fixed timestamps that do not drift with local settings.

For calendar spans around a timestamped event, the Date Difference Calculator measures the days between two readable dates after conversion.

Factors That Affect Results

Unix time looks simple because it is numeric, but several conventions affect interpretation. The same digits can describe a sensible date, a far-future date, or a historical date depending on unit scale, UTC handling, local display rules, and system support for values before the epoch.

Unit Scale

Seconds and milliseconds are the largest practical source of mistakes. A 13-digit value treated as seconds can produce an invalid-looking future year; a 10-digit value treated as milliseconds can move near January 1970.

UTC Basis

Timestamp values represent a moment, not a local wall-clock appointment. UTC should be used for storage and comparison, while local time should be treated as a display layer.

Leap-Second Policy

POSIX-style Unix time simplifies represented days to 86,400 seconds. Precision systems that account for leap seconds may need separate treatment outside ordinary timestamp conversion.

Pre-Epoch Values

Negative timestamps are useful for historical data in many programming environments. They should still be documented when data must move across systems with different time libraries.

According to NIST Leap Second and UT1-UTC Information, NIST maintains leap-second and UT1-UTC data for UTC timekeeping and updates that information regularly.

Storage precision is another factor. Some databases store whole seconds, some store milliseconds, and some store microseconds or nanoseconds that must be rounded before a browser date object can display them. The calculator is designed for seconds and milliseconds, so higher precision data should be reduced deliberately before comparison.

Local display should be treated as contextual evidence, not the source value. A timestamp viewed in New York and the same timestamp viewed in London may show different calendar dates near midnight. UTC output keeps the shared reference stable while local output explains what a person in one locale may have seen.

For elapsed intervals after two timestamps have been converted, the Elapsed Time Calculator compares start and end times without relying on epoch notation.

Unix Time Calculator interface showing UTC and local timestamp results
Unix Time Calculator interface for converting epoch seconds, milliseconds, UTC dates, ISO text, and local date-time labels.

Frequently Asked Questions (FAQ)

Q: What is Unix time used for?

A: Unix time is used to store one precise moment as a number. Software logs, APIs, databases, authentication tokens, scheduled jobs, and analytics pipelines often use it because numeric timestamps sort and compare cleanly across systems.

Q: Is Unix time always in UTC?

A: Unix time is interpreted from a UTC-based epoch. Local timezone labels are display choices applied after conversion. The same timestamp can appear as different clock times in different places while still representing one moment.

Q: How is Unix time calculated?

A: Unix time is calculated by counting elapsed seconds from 1970-01-01 00:00:00 UTC. Date input is converted to a UTC moment first, then the elapsed milliseconds are divided by 1,000.

Q: What is the difference between Unix seconds and milliseconds?

A: Unix seconds count whole or decimal seconds. Unix milliseconds count thousandths of a second. A millisecond timestamp is 1,000 times larger than the matching second timestamp, so unit selection is the most common conversion error.

Q: Can Unix time represent dates before 1970?

A: Many programming environments accept negative timestamps for dates before 1970. POSIX defines the standard nonnegative relationship from the Epoch forward, so pre-epoch values should be treated as implementation-specific when portability matters.

Q: Why does a Unix timestamp show a different local time?

A: A Unix timestamp represents one moment before timezone display rules are applied. Local time changes with offset, daylight-saving rules, and viewer location. UTC output is the stable reference for cross-system comparison.