Two dates, and the arithmetic between them
A date difference calculator answers a question that sounds like it has one answer and turns out to have several. Put 1 September and 30 September into the boxes above and you get 29 days, four weeks and one day, twenty-one working days, and zero months plus twenty-nine days — all of them correct, all of them the answer to a slightly different question. This page shows every reading at once so you can pick the one your form, contract or migration script actually wants.
Type two dates, or switch to age mode and give a date of birth. Add a time of day if the interval is short enough for hours to matter. Nothing is uploaded.
The inclusive question, which nobody asks out loud
"Days between two dates" is ambiguous in ordinary English and precise in exactly two ways. Counting the gaps between the dates gives the exclusive answer, and it is what a notice period, a countdown or a cache expiry wants. Counting the days themselves gives the inclusive answer, one higher, and it is what a hotel invoice, a sick note and an annual leave request all use.
Getting this wrong is the classic off-by-one, and it is expensive precisely because both numbers look plausible. A five-day booking from Monday to Friday is charged as five nights by nobody and five days by everybody, and a contractor who invoices exclusively for an inclusive period loses a day per engagement, quietly, forever. Decide which convention the document uses before you copy the figure.
Months have no length, so months need an anchor
Thirty days is not a month; it is the length of April. The interval from 31 January to 31 March is fifty-nine days, and the interval from 31 May to 31 July is sixty-one — two months in both cases, different in reality by two days.
Because of that, "one month and four days" is only meaningful once you say where the month was measured from. This page measures forwards from the start date, adding whole months for as long as they still land on or before the end, then counting the remaining days. Where the start day does not exist in the target month it is clamped to the last day that does, which is why 31 January plus one month is 28 February — or 29 February in a leap year. That is the convention British contracts use and the one every spreadsheet function implements, but it is a convention, not a law of arithmetic: add a month twice from 31 January and you land on 28 March, not 31 March.
The day with twenty-three hours
All of the arithmetic here runs in UTC, using explicit UTC constructors, and that is deliberate. On 29 March 2026 the clocks in Britain went forward at 01:00, so that day had twenty-three hours. A naive subtraction of two local midnights across that boundary produces 82,800,000 milliseconds, which divides into zero point nine six of a day and floors to zero. The bug appears once a year, in spring, and reproduces on nobody's machine but the reporter's.
Keeping the whole calculation in UTC removes the problem rather than compensating for it. If you need the wall-clock reading of an instant instead, the Unix timestamp converter shows the same moment in UTC and in your own zone side by side.
Age, and the birthdays that do not exist
Age mode measures from a date of birth to right now, in completed years, months and days — never rounded up, because a person is not thirty-one until the day arrives. It also names the next anniversary, which is where 29 February gets interesting: in a common year the anniversary is read as 28 February, the rule British law applies for coming of age and the one every registration form follows without saying so.
Scheduling something on that interval rather than measuring it? The cron every month page explains why a monthly job on the 31st skips February altogether, and cron every day at midnight covers what happens to a daily job on the night the clocks change.