Free Handy Tools

Date & Time

Seven tools for the arithmetic between two dates or two times. Simple to describe and unusually easy to get wrong, which is why each one says what it counted.

7 tools in Date & Time

The three questions this category answers

Almost every date problem is one of three: how long is it between these two points, what date lands this many units from that one, and what is this instant called somewhere else. The tools are grouped that way rather than by how the answer is presented.

  • How long between: the hours between two clock times, the difference between two dates, an age, and the working days across a span.
  • How far from here: a countdown to a moment, and the run of days to a retirement date.
  • What it is called elsewhere: an instant read in another time zone, or in another format.

Inclusive, exclusive, and why two correct answers differ by one

Ask how many days there are between the 1st and the 8th and there are two defensible answers. Seven, if you are measuring the gap. Eight, if you are counting the days themselves, which is what a hotel invoice, a leave request and a notice period usually mean. This is the single most common source of a date calculation being off by one, and it is not a bug in anybody’s arithmetic — it is two different questions sharing a sentence.

The tools here state which one they did. The business days calculator, in particular, has to be explicit about it, because a span counted inclusively and a span counted exclusively can straddle a different number of weekends and end up two days apart rather than one.

What the calendar does not tell you, and what it refuses to guess

Public holidays are not built in anywhere on this site. They differ by country, by state or province, and by year, and a hardcoded table quietly goes out of date while continuing to look authoritative. So the business days calculator takes holidays as an input — you paste in the dates that apply to you — and it takes the weekend as an input too, because a Friday–Saturday weekend is the norm across much of the world and a tool that assumes Saturday–Sunday is simply wrong there.

Daylight saving is handled by working in UTC rather than in local time. A date advanced in local time across a clock change can lose or repeat a day, which is the kind of error that shows up once or twice a year and is nearly impossible to reproduce afterwards. The time zone converter is the one tool that deliberately does work in named zones, because naming the zone is the entire job.

Off-by-one, and the other one

Why does the business days count not match my payroll system?

Usually one of three things: your system counts the start date and this one does not (or the reverse), your public holidays are not in the list you pasted, or your working week is not Monday to Friday. All three are inputs here rather than assumptions, so the count can be made to agree once you know which one it is.

Which tool do I want for a shift that runs past midnight?

The hours between two times tool. An end time earlier than the start is read as crossing midnight rather than as a negative day, so 22:00 to 06:30 comes back as eight and a half hours. It reports decimal hours as well as hours and minutes, because those are the two forms an invoice and a timesheet respectively ask for.