Skip to content

Relative Time Calculator

Work out the gap between two dates, in every unit including working days.

Quick Tool Overview

The Relative Time Calculator walks the calendar rather than dividing by an average, so one month after 31 January is 28 February — where a person would put it — instead of the off-by-a-day answer field subtraction gives.

What it does
Calculates the gap between two dates
You give it
Two dates, in either order
You get back
Years, months and days, plus every total
Best for
Deadlines, ages and elapsed time
Developer Tools Free, unlimited use No sign-up Runs in your browser

About the Relative Time Calculator

Two dates in, and the gap between them broken down properly — years, months and days, plus every total, plus the working days between them.

Calendar arithmetic is where date libraries earn their keep, and it is easy to get subtly wrong. Subtracting the fields and dividing by 30 gives you a plausible-looking answer that is off by a day or two most of the year. This walks the calendar instead: one month after 31 January is 28 February, because that is where a person would put it, and the remaining days are counted from there. The relative wording — "3 days ago", "in 2 hours" — comes from the browser’s own formatter, so it matches what a native application would say.

Key features of the Relative Time Calculator

Real calendar arithmetic

Whole months are walked forward and clamped, so month lengths and leap years are handled rather than averaged away.

Working days

Weekends excluded, which is the figure a deadline actually depends on.

Every total as well

Total days, hours, minutes and seconds alongside the calendar breakdown, because different questions want different answers.

The "3 days ago" wording

Generated by the browser’s own formatter, so it matches what a native application would say.

Direction stated

Either order works, and the result says which way round it went.

How to use the Relative Time Calculator

  1. 1

    Set the first date

    Type it, or use the button to take the current moment.

  2. 2

    Set the second

    Either order — the calculator says which direction it went.

  3. 3

    Read the breakdown

    Years, months and days, then every total, then the working days.

  4. 4

    Take the wording

    The "3 days ago" form is generated too, for dropping into an interface.

Frequently asked questions

As long as the actual month. The calculation walks the calendar rather than dividing by an average, so one month after 31 January is 28 February and the leftover days are counted from there.

Reviews of the Relative Time Calculator

What people who use the Relative Time Calculator think of it. Reviews come from visitors and are posted as written.

No ratings yet

Yours would be the first.

  • 5 0 reviews rated 5 stars
  • 4 0 reviews rated 4 stars
  • 3 0 reviews rated 3 stars
  • 2 0 reviews rated 2 stars
  • 1 0 reviews rated 1 star

Write a review

Used this tool? Your rating helps the next person decide.

Your rating

Plain text only — links, email addresses and HTML are not accepted. Your name and review are shown publicly; nothing else is collected. See the privacy policy.

0 reviews

Newest first

No reviews yet

Be the first to rate the Relative Time Calculator. It takes half a minute and no account.

Write the first review

More developer tools