The workshop · Date calculator
How it works : Date calculator
Every calculation is done at noon universal time, never at local midnight: at midnight a clock change shifts the date by a whole day, and that is the mistake that makes a deadline slip with no visible cause.
Date arithmetic looks trivial and it is not. Two traps trip up most tools: the switch to summer time, which shortens a day by sixty minutes and tips a calculation by a whole day when it starts from midnight, and adding months, which has no single answer when you start from 31 January.
So this tool does everything at noon universal time. A day added is then always a day, whatever the time zone and whatever clock change it crosses. And when a question has no single answer, it says so and shows both possible answers instead of choosing in silence.
You will find no public holidays here, and that is a decision rather than an oversight. They differ from country to country, sometimes from region to region inside one country, and their dates change every year, with substitute days when they fall at the weekend. A list frozen into a tool rots within twelve months, and a user who trusts it ends up with the wrong deadline.
How it works
- Choose the calculation, then type your dates as year, month, day, separated by hyphens.
- The result updates on every change, with the detail of what was counted.
- The date format is the international standard one, and that is deliberate: “03/04” means 3 April in half the world and 4 March in the other half.
Formats accepted
This tool takes neither a file nor a text. Dates are typed as year-month-day, the international standard order, because it carries no ambiguity and sorts itself.
No input
Two typed dates, or one date and a number. No public holiday calendar is embedded, and the reason is written in the limits.
Its limits
No public holiday is embedded
They differ by country, sometimes by region inside one country, they change date every year, and a holiday falling at a weekend often produces a substitute day decided case by case. The official British calendar, for instance, explicitly publishes “substitute days” and different lists for Scotland and for England. A list frozen into a tool would be wrong within twelve months, and this project is aimed at a worldwide audience: the working days counted here therefore run Monday to Friday, and nothing else. That is said, and taking your own holidays off is your job.
Adding months has no single answer, and the tool shows both
One month after 31 January is 28 February for most software, which clamps to the last day of the month, and 3 March for software that lets it spill over. Neither answer is wrong: the question is badly posed. So the tool shows both whenever they differ, each with its rule named, rather than choosing for you.
The text of the date standard is paid for, and we have not read it
Week numbering comes from the international standard ISO 8601, whose text sells for around 180 Swiss francs. So we have not read it. The free IETF document derived from it writes itself that the full grammar of that standard is too complex for most uses, and it does NOT cover week numbers. We apply the rule as described by the specification of the browser's programming language, which is free: week 1 is the week containing the first Thursday of January. It is the same admission as for the QR code standard: we say what we have not read.
Before October 1582, the calendar used never existed
The browser calculates on the Gregorian calendar EXTENDED backwards, that is, applied to centuries where it was not in use. A date in 1500 returned by this tool therefore does not match the date a contemporary would have written, and the gap runs to about ten days. That is not a flaw of the tool, it is the definition of the calendar it uses, and a date tool that failed to say so would suggest a historical accuracy it does not have.
Dates are typed, there is no calendar to click
This site's design system has no date field drawn for it, and a browser's native date field would arrive with none of our styling, with its own border and its own height: the design is frozen, and we do not chip away at it for one tool. The typed format has a real advantage anyway: “03/04” means 3 April in half the world and 4 March in the other, whereas the international format lends itself to no confusion at all.
Possible dates stop at roughly 273,000 years either side of 1970
That is the range the language specification guarantees, and the tool displays it. Beyond it, the browser no longer returns a date but an invalid value, and the tool says so instead of showing an empty result.
Questions about this tool
Are my dates sent anywhere?
No, and there is nothing to send: the tool only does arithmetic. Open the inspector with the F12 key, go to the “Network” tab, clear the list and calculate as much as you like, the list stays empty. That matters more than it seems: a date of birth, a hearing date or a medical deadline are sensitive pieces of information, and an ordinary online calculator receives them.
Why calculate at noon rather than midnight?
Because a clock-change day is not twenty-four hours long. If a calculation starts from midnight and adds days as hours, it lands at eleven at night or one in the morning depending on the direction of the change, and the date shown jumps by a day. Starting from noon leaves twelve hours of headroom either side: no known clock change exceeds two hours. It is an old programmer's trick, and it is the one that avoids the commonest class of date bugs.
Why does adding months sometimes give two answers?
Because the question has no single answer. One month after 31 January: 31 February does not exist. Some software clamps to 28 or 29 February, other software lets it spill over to 3 March. Both behaviours exist in real business software, and choosing one without saying so would give the wrong deadline to half our visitors. So the tool shows both, with the rule that produces each, and you pick the one your contract or your administration applies.
Why are there no public holidays?
Because a list of public holidays is the part of a tool that rots fastest. They differ by country, sometimes by region inside one country, their dates move from year to year, and a holiday falling on a Saturday produces, in several countries, a substitute day decided case by case. Embedding a list means promising to keep it current for every country in the world, every year. We would rather count working days Monday to Friday, say so plainly, and let you take off your own holidays: that is a subtraction you will get right, whereas an out-of-date list would make you miss a deadline.
Is the week number you give the right one?
It is the international standard one, applied according to the widely described rule: week 1 is the week containing the first Thursday of January, and the week starts on Monday. It is worth knowing that other conventions exist side by side: in part of the world the week starts on Sunday and week 1 is the one containing 1 January. The number shown here may therefore differ from the one in your spreadsheet or your diary, depending on how they are set. We also say that we have not read the text of the standard, which is paid for.
Can I work out an exact age?
Yes, with the gap between two dates: the tool gives the days, then the whole months and the remainder, which is how an age is spoken. Beware of the same ambiguity as for adding months, though: a child born on 29 February has a birthday whose definition depends on the country, and no calculation will settle that for you.
Every calculation is done at noon universal time, never at local midnight: at midnight a clock change shifts the date by a whole day, and that is the mistake that makes a deadline slip with no visible cause.
VerifyThe proof, step by stepThe network inspector check, explained one gesture at a time, with screenshots.
The cornerThe everyday cornerConvert units and see where every factor comes from, work out dates without being tripped up by a clock change, trim a recording, zip a folder. The tools you look for once a month and never find again.