Relative Time
Describe the distance between two instants in words and parts.
- Runs locally in your browser
- No upload required
Try it
Supported formats
Privacy
Runs entirely in your browser. Your input is never uploaded, stored, or sent to a third party.
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
- Parse the target and reference as absolute instants; when no reference is supplied, read the current instant at runtime.
- Measure the signed difference and decompose its magnitude by a fixed descending scale.
- 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
- Enter the target instant (or date).
- Optionally enter a reference instant; leave it blank to compare with the current time.
- 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
{
"target": "2026-01-01T00:00:00Z",
"reference": "2025-12-30T00:00:00Z"
}A past instant
{
"target": "2026-01-01T00:00:00Z",
"reference": "2026-01-03T06:00:00Z"
}Across a leap day
{
"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
Send feedback
Tell us if this tool helped, report a problem, or suggest a tool. Only the message you type is sent — never the input you used in the tool.
Was this tool useful?
Prefer to write to us directly? See the contact page.