Free Date & Time Tools
Date arithmetic that respects leap years and daylight-saving shifts.
Date arithmetic is harder than it looks
Adding two numbers is easy. Adding one month to 31 January is not, because the answer depends on which year it is and on what you think a month means. Counting the days between two dates seems trivial until a leap year, a daylight-saving change or a timezone gets involved, and the answer comes out one short.
These tools exist because the obvious implementations are quietly wrong, and because a wrong answer about a date usually looks entirely plausible. Nobody double-checks that they are 36 years and 2 months old.
The mistakes we avoid, and how
Counting hours instead of days. The most common bug in date tools is subtracting two timestamps and dividing by 86,400. That works until a clock change makes a day 23 or 25 hours long, and then durations spanning late March or late October come out wrong by one. Every tool here works on calendar dates — plain year, month and day — so the clock never enters into it.
Naive month borrowing. To find the gap between two dates, the obvious approach subtracts the days, and borrows from the months if the result is negative. That fails when the day gap is larger than the borrowed month: 31 January to 1 March produces "one month and minus one days", which is not a duration at all. We use the algorithm the Java date library uses — anchor on the start date plus whole months, then count real days from there — which is correct in every case, including the 29 February ones.
Getting the century leap rule wrong. Most people know about the four-year rule. Fewer implementations handle the exception: centuries are not leap years unless they divide by 400. 1900 had 365 days, 2000 had 366.
Where they get used
Working out an exact age for a form that wants years, months and days rather than just a birthday. Counting notice periods, contract lengths and probation windows. Checking how many working days sit between a deadline and today. Converting a Unix timestamp out of a log file into something a human can read, which is a daily task for anyone who works with servers.
The common thread is that these are quick lookups with a precise answer, where being roughly right is not good enough.
Choices we surface rather than hide
Some date questions genuinely have more than one correct answer, and the honest thing is to let you pick. The clearest example is whether a span includes both end dates: Monday to Friday is four nights or five days depending on what you are counting. Our date difference tool has a switch for it and shows which convention produced the number, instead of choosing silently and leaving you to wonder why it disagrees with your own count.
Similarly, working days are Monday to Friday with no holidays deducted, and the tool says so. Public holidays vary by country and region, and a calculator that quietly applied one country's calendar to everyone would be worse than one that leaves the adjustment to you.
Privacy
Dates are more identifying than they look — a date of birth is a standard identity check, and a contract date can be commercially sensitive. Nothing you enter here is uploaded, logged or stored. The calculations run in your browser, and closing the tab discards everything.
What is coming
Adding and subtracting days from a date, ISO week numbers, a working-days calculator with optional holiday lists, time duration arithmetic in hours and minutes, day-of-week lookup, and a leap year checker. Each ships once its edge cases are tested rather than assumed.
Frequently asked questions
Do these handle leap years correctly?
Yes, including the century rule that catches most implementations out. A year is a leap year if it divides by 4, except centuries, unless they divide by 400 — so 2000 was a leap year and 1900 was not. Every date tool here is tested against that and against the awkward 29 February cases.
How is an age of exactly one month calculated?
By the calendar, not by counting 30 days. From 31 January, one month later is 28 or 29 February depending on the year, because there is no 31st. This is the same rule the date libraries in Java and Python use, and it is why 31 January to 1 March comes out as one month and one day rather than a negative number, which is what naive implementations produce.
Do daylight saving changes affect the results?
No, and that is deliberate. These tools work on calendar dates rather than timestamps, so a duration is never one day out because the two dates fell either side of a clock change. Counting hours instead of days is the usual source of that bug.
What counts as a working day?
Monday to Friday. Public holidays are not deducted, because they differ by country, region and sometimes by employer. If you need holidays excluded, subtract them yourself — the tool gives you the weekday count to start from.
Should a duration include both end dates?
It depends what you are counting, which is why the date difference tool lets you choose. From Monday to Friday is four days if you are counting nights in a hotel, and five if you are counting days worked. Neither is wrong; picking silently for you would be.
Is my data sent anywhere?
No. Dates are processed in your browser and nothing is stored or transmitted.