Skip to content
universalDate Calculator

Blog

How to Calculate the Days Between Two Dates

The method that always works, a worked example and the traps that give an answer one day off.

By the Universal Date Calculator Team

The basic idea

The number of days between two dates is the number of midnights you cross when you move from the first date to the second. From Monday to Friday you cross four midnights, so the answer is 4 days, even though five calendar days are involved. Once that rule is clear, the rest is bookkeeping.

The same rule works for any two dates, in the same year or years apart. You do not need to know the weekday of either date. You only need to know how long each month is and whether any leap day lies in between.

Counting by hand: a worked example

Suppose you want the days from 15 March 2026 to 30 September 2026. Work in three steps. First, count the days left in March after the 15th: March has 31 days, so there are 16 of them. Second, add the full months in between: April has 30, May 31, June 30, July 31 and August 31, which together make 153. Third, add the days of the final month up to the end date: 30.

The total is 16 + 153 + 30 = 199 days. A calculator gives the same answer, and checking a hand count against a tool is a good way to catch a slip in the month lengths.

A shortcut that many people prefer is to count the day of the year for each date and subtract. 15 March is day 74 of 2026 and 30 September is day 273, and 273 − 74 = 199. This works neatly inside one year and needs one extra step across a year boundary.

Month lengths you need to know

Thirty days have September, April, June and November. All the others have 31, except February, which has 28 days in an ordinary year and 29 in a leap year. If you can recite that rhyme or count on the knuckles of your fist, you can work out any span by hand.

Across several years, remember that an ordinary year has 365 days and a leap year has 366. Between 1 January 2026 and 1 January 2027 there are exactly 365 days; between 1 January 2028 and 1 January 2029 there are 366.

Leap years in the middle of a span

A leap day, 29 February, is easy to forget. If your span contains one, it adds one day to the total. From 28 February 2024 to 1 March 2024 there are 2 days, because the 29th lies in between, while the same dates in 2026 are 1 day apart.

A year is a leap year when it can be divided by 4, except century years, which must be divisible by 400. That makes 2024 and 2028 leap years and 2100 an ordinary year. A date calculator applies this rule automatically.

The end date: with or without

Everything above counts the days that pass. Some rules count both the first and the last day, which adds one. A hotel stay from the 10th to the 13th is 3 nights, but a conference that runs on the 10th, 11th, 12th and 13th lasts 4 days.

Before you quote a number, decide which of the two you mean. The article on including the end date goes into the detail. In this calculator the default is the plain difference, and a checkbox adds the end date.

Common mistakes

The most frequent error is an off-by-one: subtracting the day numbers and then adding or removing a day without reason. A second error is using 30 days for every month, which drifts by a day or two over a few months. A third is forgetting that the span crosses a leap day.

Another trap is mixing up date formats. 04/05/2026 is 4 May in most of the world and 5 April in the United States. When you copy dates from a document, check the format first, because the wrong reading gives a perfectly plausible but wrong answer.

Finally, watch for time of day. If your dates include clock times, a span from Monday 23:00 to Tuesday 01:00 is two hours, not a day. A date calculator works with whole dates, so it ignores the time.

Checking your answer

Whichever way you count, check the result with a second method. The simplest check is to add the answer back: start from the first date, add the number of days you found, and see whether you land on the second date. If you do, the count is right.

A second check uses the weekday. If the number of days is a multiple of 7, both dates fall on the same weekday. If it leaves a remainder of 3 when divided by 7, the second date is three weekdays later in the week. From 15 March 2026, a Sunday, to 30 September 2026 is 199 days, which is 28 weeks and 3 days, and 30 September 2026 is a Wednesday, three days after Sunday.

A third check is to split the span at a convenient point such as the end of a month or year, count the two halves and add them. If the halves do not add up to the whole, one of them contains an error.

A few spans worth remembering

It helps to know a few anchors. From 1 January to 31 December of an ordinary year is 364 days, and from 1 January to the next 1 January is 365. In a leap year the figures are 365 and 366. A quarter is 90 to 92 days, and half a year is 181 to 184 days.

In 2026, 28 February to 31 March is 31 days, and 1 February to 28 February is 27 days. These small facts are useful sanity checks when a calculation looks odd.

Using a calculator

For anything longer than a few weeks, a date calculator saves time and removes the guesswork. Enter the start date and the end date, and the result appears at once, together with the same span in weeks, months, workdays, hours and minutes.

You can also use it to check your own work. Count by hand, compare with the tool, and if the two differ, look first at the month lengths and the end-date rule. Those two points explain almost every disagreement.

Calculate the days between two dates

Open the date calculator