Working out the difference between two dates without being a day out
Why the same stretch of calendar comes out as 91 days for one person and 92 for another, and how to reach the figure that will stand up.
A contract signed on 15 March runs to 14 June, and two people round the table give two different durations: 91 days says one, 92 says the other. Neither has made an arithmetic slip — they are simply not counting the same thing. It is the leading cause of disagreement the moment you subtract one date from another, and no spreadsheet will settle it for you.
Does the end date count? Settle that first
Subtracting one date from another gives you an interval, not a number of days lived through. From 15 March to 14 June the interval is 91 days; a flat let from 15 March to 14 June inclusive, however, is occupied for 92 days. Both figures are right — they answer two different questions.
- End date excluded — this is the raw interval, the one a spreadsheet subtraction returns. It suits periods that run back to back with no gap: billing cycles, subscription terms, interest calculations.
- End date included — add 1 to the raw figure. This is how you count annual leave taken, days a property is occupied, the length of a trade show or an assignment. Hotel nights work the other way round, on the excluded end date: from 15 to 20 March you are billed for five nights, not six.
English procedure adds a third convention, the clear day: the day the period begins and the day of the event it runs up to are both left out of the count, so seven clear days' notice given on the 1st leaves the 2nd to the 8th as the clear days and the hearing can go ahead on the 9th. Two further rules sit on top of it: where the period is five days or shorter, weekends and bank holidays drop out of the count altogether, and where a deadline for filing at court falls on a day the court office is closed, it rolls forward to the next day the office is open. No subtraction knows any of that: working out which of the three conventions applies weighs heavier than the precision of the sum itself.
The date difference tool turns that choice into an "include end date" tick box: tick it and the upper bound shifts by a day, and every counter updates at once, instead of leaving you to add 1 in your head afterwards.
Days, weeks and months do not convert into one another
A gap of 90 days is not "three months". Depending on where you start, three calendar months come to 89, 90, 91 or 92 days: from 1 December to 1 March, 90 days (91 when the February in between has 29); from 1 June to 1 September, 92. Both durations are written "three months" in a contract.
Trickier still: adding months is not reversible. 31 January plus one month gives 28 February — the 29th in a leap year, since the day number is clipped back to the last day of the month you land in — and 28 February minus one month does not give you back 31 January. A breakdown along the lines of "1 month and 3 days" therefore depends on the order of operations. The method that avoids nonsense is to anchor the largest whole number of months first, counting from the start date, then count the days left over. Without that precaution some pairs of dates produce a negative number of days — the known defect in the "MD" unit of Excel's DATEDIF function.
Weeks behave better: always 7 days. But they bring their own drift — 52 weeks make 364 days, one short of an ordinary year. That is why an anniversary date slips forward one weekday each year, and two when a 29 February falls in between.
Working days: a counter not to be taken literally
Stripping out weekends is mechanical: count the whole weeks and multiply by 5, then walk through the days left over according to the weekday you started on. A 30-day interval contains 20 working days if it starts on a Saturday, 21 if it starts on a Friday, 22 if it starts on a Monday. Same length, different start date, different answer.
Stripping out public holidays is nothing like automatic. They depend on the country and, within the UK, on the nation: eight bank holidays in England and Wales, nine in Scotland, which swaps Easter Monday for 2 January and St Andrew's Day and takes its August holiday at the start of the month rather than the end, and ten in Northern Ireland, which adds St Patrick's Day and the Battle of the Boyne. Some of them move, too, pegged to Easter — Good Friday and Easter Monday shift every year.
What that means in practice: the "working days" counter in a general-purpose tool takes out Saturdays and Sundays, not bank holidays and not your own shutdown days. Treat it as a ceiling and subtract the non-working days in your own calendar afterwards. In a spreadsheet, NETWORKDAYS takes a range of holiday dates as its third argument — the only clean way to automate it, provided you keep that list current each year.
What throws a date calculation off without warning
The way the date is written
03/04/2026 reads as 3 April in the UK and 4 March in the United States. As soon as a date passes through a CSV export or a contact abroad, the ambiguity turns into a one-month error. The fix is a single format: ISO 8601, YYYY-MM-DD, so 2026-04-03. A single possible reading, an alphabetical sort that comes out chronological, and exactly what browser date fields expect.
The clocks changing, and time zones
In the UK the last Sunday in March lasts 23 hours and the last Sunday in October lasts 25. A calculation that subtracts two instants and divides by 86,400 seconds therefore returns 29.96 or 30.04 days where the calendar counts 30 — enough to tip a rounding. A tool that gets this right works at midnight UTC, which neutralises the bias.
The problem changes character when the two dates sit in different zones. A flight leaving London at 23:00 on 2 May and landing in Montreal at 01:00 on 3 May did not last a day: brought to a common reference, the gap is 7 hours. Convert both instants into the same zone — the time zone converter handles that — before you calculate anything at all.
Leap years and old dates
A year is a leap year if it divides by 4, except centurial years that do not divide by 400: 2000 was one, 1900 and 2100 are not. Excel drags an awkward legacy behind it here: it treats 29 February 1900 as a valid date, which throws every calculation before 1 March 1900 out by a day. No effect on a live contract; a nuisance in genealogy.
Spreadsheet or online tool?
In a spreadsheet, subtracting two date-formatted cells is enough to get days — provided you reformat the result cell as a number, otherwise it shows an absurd date somewhere in the 1900s. For a breakdown into years, months and days, DATEDIF does the job, but it is still absent from Excel's Insert Function list: nobody finds it unless they already know it exists, and its "MD" unit has a reputation for unreliability.
For a one-off calculation, remembering the syntax costs more than the sum itself. A dedicated tool shows in one pass the total interval in days, the "X years, Y months, Z days" breakdown, the number of weeks, whole months, working days, hours, minutes and seconds. It swaps the two dates at the press of a button if you entered them the wrong way round, and the result copies out or exports as a text file.
Three neighbouring calculations not to confuse
- Age. It is counted in completed years, not rounded: someone born on 30 August is 39 on 29 August of the year they turn 40, and 40 the next day. Dividing a number of days by 365.25 gets you close, and is wrong precisely where it matters. The age calculator applies the completed-years rule.
- Due dates. Working out a gap and working out a due date are inverse operations, and the inverse is not symmetrical, because months are unequal in length. "90 days after 31 May" falls on 29 August; "3 months after 31 May" falls on 31 August. Two days apart — on an invoice, that is a dispute.
- Timestamps. Server logs, API exports and databases often store dates as seconds elapsed since 1 January 1970 UTC. Subtracting two of those integers gives a gap in seconds, to be divided by 86,400 for days — but the values still have to be made readable, which the Unix converter does in both directions.
Three habits cover everything above: rewrite both dates as YYYY-MM-DD before you count, state in writing whether the end date is included, and never quote a number of working days without saying whether bank holidays have been taken out — that is the line the person on the other side will go and check.
This calculation runs entirely in your browser: the dates you enter are sent to no server, and the tool stays usable without an account. The Convertu subscription at €7 a year covers the heavy server-side jobs, such as PDF or video conversion, plus the five image tools.