Skip to main content
DevConverter
Home/Date / Time/Relative Time Calculator

Relative Time Calculator

Find how long until/since a date, or calculate a future/past date by adding days, months, hours, and more.

in 1 month

relative to 1:07:57 PM

Days

30

Hours

720

Minutes

43,200

Seconds

2,592,000

Weeks

4

Years (approx.)

< 1

About this tool

Relative time expressions describe durations in human terms relative to the current moment: 'just now', '3 minutes ago', 'in 2 weeks', 'last Tuesday'. They are more intuitive in user interfaces than absolute timestamps for recent events, because they immediately answer the question 'how recent is this?' without requiring the reader to calculate the difference from the current time.

The choice of display format depends on recency. Events from the last minute might show as 'just now', events from the last hour in minutes, events from today in hours, events from the last week in days, and older events as calendar dates. Social media, email clients, commit logs, and activity feeds all use variations of this approach. The exact thresholds are a design decision — there is no universal standard.

The Intl.RelativeTimeFormat API, available in all modern browsers and Node.js, provides localized relative time formatting that handles the grammar of each language automatically (English 'ago' vs German 'vor', singular vs plural forms, etc.). When calculating relative time, be careful about the difference between a 'day' as 24 hours of elapsed time versus a calendar day boundary — these produce different results near midnight.