Relative Time

Describe the distance between two instants in words and parts.

  • Runs locally in your browser
  • No upload required

Try it

An ISO-8601 instant/date or an epoch value.

Leave blank to compare with the current time.

Results are calculated in your browser.

Supported formats

Input
text, number
Output
text

Privacy

Runs entirely in your browser. Your input is never uploaded, stored, or sent to a third party.

Processing
In your browser
Privacy level
Browser only

The target is 2 days from now.

How it works

  • Parsed the target and reference instants.
  • Measured the signed difference and decomposed its magnitude with a fixed scale: 365-day years, 30-day months, 7-day weeks, then days, hours, minutes and seconds.
  • Reported both the human-readable phrase and the exact numeric breakdown.
  • The scale is fixed, not calendar-aware; use the Duration Calculator for a calendar breakdown.
  • Swapping the target and reference flips the direction but keeps the magnitudes.

Methodology

  1. Parse the target and reference as absolute instants; when no reference is supplied, read the current instant at runtime.
  2. Measure the signed difference and decompose its magnitude by a fixed descending scale.
  3. Return a short human-readable phrase, the direction, and the full numeric breakdown.

Time model

  • Time source: an explicit reference supplied by the visitor.
  • Timezone: Instants are absolute; a date-only input is read as UTC midnight and no timezone conversion is performed.
  • Locale: Fixed English scale labels; no locale-specific formatting or pluralisation rules.
  • Daylight saving: The span between absolute instants is DST-independent.
  • Reference date: Optional. When omitted, the current instant is read from the visitor's environment; a supplied reference fixes the comparison. Examples always supply one.

Usage

  1. Enter the target instant (or date).
  2. Optionally enter a reference instant; leave it blank to compare with the current time.
  3. Read the phrase, direction and numeric breakdown.

Examples

These are examples, not current values: they use fixed inputs, while the interactive tool computes live results in your browser.

A future instant

jsonSelect to copy
{
  "target": "2026-01-01T00:00:00Z",
  "reference": "2025-12-30T00:00:00Z"
}

A past instant

jsonSelect to copy
{
  "target": "2026-01-01T00:00:00Z",
  "reference": "2026-01-03T06:00:00Z"
}

Across a leap day

jsonSelect to copy
{
  "target": "2024-03-01T00:00:00Z",
  "reference": "2024-02-28T00:00:00Z"
}

Limitations

Fixed scale versus calendar duration

Relative phrasing is approximate on purpose: '2 months ago' is easier to read than '59 days ago'. For an exact years/months/days answer use the Duration Calculator.

Frequently asked questions

How is this different from the Timestamp Converter?
The Timestamp Converter renders a single instant with one relative string. This tool accepts two instants and returns a full numeric breakdown plus direction, and it is designed for measuring a span.
Is the result locale-dependent?
No. The scale and labels are fixed English units, so the same inputs always produce the same phrase on every device.

Sources

  1. ISO 8601: Date and time format — ISO