Days Between Dates and Time Maths, Explained Simply

Counting days between dates is easy once you know the rules for month lengths, leap years and inclusive counting — this guide works through each one with checked examples.

A wall calendar with dates marked and a pen resting beside it

Counting the days between two dates sounds simple until you try it by hand. Months have different lengths, February changes in leap years, and it is easy to be one day out without knowing why. The answer also depends on a question people rarely ask: are you counting both end dates, or only the gap between them?

This guide explains the whole process in plain language. You will learn the month-length rules, the leap year rule, how to count across months and years, how to turn a day count into weeks, and how to work out durations that cross midnight. Every method is shown with real dates and checked arithmetic, so you can use the same steps on your own dates with confidence.

Start with the question you are actually answering

Before you count anything, decide what you need. A gap and a length are different things, and they differ by exactly one day. The gap between Monday 10 May and Wednesday 12 May is two days, because you move forward two days to get from the first date to the second. The length of a stay that runs from 10 May to 12 May inclusive, counting both the arrival day and the departure day, is three days: the 10th, the 11th and the 12th.

Most deadline and countdown questions want the gap. Most holiday, hire and booking questions want the inclusive length. If a form, contract or booking site does not say which one it means, ask, because a one-day difference can change a price, a deadline or a return date. For the rest of this guide, “days between” means the gap, unless the text says otherwise.

Month lengths and the leap year rule

The months do not all have the same length. January, March, May, July, August, October and December have 31 days. April, June, September and November have 30 days. February has 28 days in an ordinary year and 29 days in a leap year.

A simple memory aid is the knuckle method: make two fists and count the knuckles and valleys from left to right. Knuckles are the 31-day months and valleys are the shorter months, with February as the shortest valley. It is old-fashioned, but it works, and it is faster than looking the lengths up every time.

When is a year a leap year?

A year is a leap year if it divides exactly by four, with one exception for century years. A year ending in 00 is a leap year only if it also divides exactly by 400. That is why the year 2000 was a leap year, while 1900 was not, and 2100 will not be either. The next leap years after 2026 are 2028, 2032 and 2036.

The year 2026 is not a leap year, because 2026 divided by four leaves a remainder of two. February 2026 therefore has 28 days. That single fact changes many counts in early 2026, as the worked examples below show.

Worked example 1: counting across two months

How many days are there between 1 January 2026 and 1 March 2026? Work month by month. From 1 January to 1 February is the whole of January, which has 31 days. From 1 February to 1 March is the whole of February, and February 2026 has 28 days because 2026 is not a leap year. Adding those together gives 31 plus 28, which equals 59 days.

Now compare the same dates in a leap year. Between 1 January 2024 and 1 March 2024, January still contributes 31 days, but February 2024 has 29 days, because 2024 divides exactly by four. The total is 31 plus 29, which equals 60 days. The same pair of dates is one day longer in a leap year, and that extra day is the 29 February itself.

PeriodJanuaryFebruaryTotal days
1 Jan 2026 to 1 Mar 2026312831 + 28 = 59
1 Jan 2024 to 1 Mar 2024312931 + 29 = 60

You can check the 2026 answer another way. There are 59 days from 1 January to 1 March, and 59 divided by seven equals eight weeks and three days, because eight times seven is 56 and 59 minus 56 is three. Counting forward eight weeks and three days from Thursday 1 January 2026 lands on Sunday 1 March 2026, which matches the calendar. Checking a result in weeks is a quick way to catch a month-length error.

Worked example 2: counting from the middle of a month

Most real counts do not start on the first of a month. Suppose you need the days between 15 November 2026 and 25 December 2026. Start by counting the days left in November after the 15th. November has 30 days, so 30 minus 15 equals 15 days, taking you to 30 November. Then add the 25 days of December up to 25 December. The total is 15 plus 25, which equals 40 days.

Check it by splitting the period differently. From 15 November to 15 December is exactly one calendar month, and that span is 30 days: the 15 days left in November plus the first 15 days of December. From 15 December to 25 December is ten more days. Adding 30 and ten gives 40 days again, so the two methods agree.

As weeks, 40 days is five weeks and five days, because five times seven is 35 and 40 minus 35 is five. If 15 November 2026 is a Sunday, then 40 days later is a Friday, because five full weeks bring you back to a Sunday and five more days take you to Friday. A weekday check like this is useful when you are planning travel or a deadline.

Counting across a whole year

For longer periods, count whole years first, then the remaining months and days. A period of one calendar year is 365 days in an ordinary year and 366 days in a leap year, but only if the period includes 29 February. From 1 March 2025 to 1 March 2026 is 365 days, because no 29 February falls inside it. From 1 January 2024 to 1 January 2025 is 366 days, because 29 February 2024 falls inside it.

That detail matters for ages and anniversaries. Consider a person born on 14 February 2000. On 14 February 2026 they turn 26. The leap days that fell after their birth and on or before that birthday are 29 February in 2000, 2004, 2008, 2012, 2016, 2020 and 2024, which is seven leap days in total. The number of days in those 26 years is 26 multiplied by 365, which equals 9,490, plus seven, which equals 9,497 days. That is the gap between the two birthdays, not counting the starting day twice.

When a birthday falls on 29 February, the position is simpler in practice than it sounds. In non-leap years, most people celebrate on 28 February or 1 March, and official records usually treat the birthday as 1 March for age purposes in England and Wales, or follow the rule set by the organisation involved. If an exact legal age matters, check the rule that applies to your situation rather than guessing.

Time maths: hours, minutes and durations

Date maths and time maths use the same idea: count forward in fixed steps and carry over when you pass a boundary. The boundaries for time are 60 minutes in an hour and 24 hours in a day. A duration of 2 hours 45 minutes plus 1 hour 30 minutes is 4 hours 15 minutes, because 45 plus 30 equals 75 minutes, which is one hour and 15 minutes, and two plus one plus the carried hour equals four hours.

Working in minutes often makes the arithmetic easier. Convert each time to minutes after midnight, subtract, and convert back. For example, 09:15 is nine times 60 plus 15, which equals 555 minutes. The time 13:40 is 13 times 60 plus 40, which equals 820 minutes. The difference is 820 minus 555, which equals 265 minutes, and 265 divided by 60 is four hours with 25 minutes left over, so the duration is 4 hours 25 minutes.

Durations that cross midnight

Crossing midnight is where most time calculations go wrong. The fix is to split the duration at midnight and add the two parts. From 22:40 to midnight is one hour and 20 minutes, because 60 minus 40 is 20 minutes to 23:00, plus one hour to midnight. From midnight to 06:15 is six hours and 15 minutes. Adding one hour 20 minutes and six hours 15 minutes gives seven hours and 35 minutes.

In minutes, the same calculation is 22:40 as 22 times 60 plus 40, which equals 1,360 minutes, and 06:15 the next day as 24 times 60 plus 375, which equals 1,815 minutes on the same running clock. Subtracting gives 1,815 minus 1,360, which equals 455 minutes, and 455 divided by 60 is seven hours with 35 minutes left over. Both methods give 7 hours 35 minutes, so the answer is confirmed.

When you add a duration to a time, use the same split. Adding five hours to 21:30 gives 02:30 the next day, because three hours take you to midnight and the remaining two hours take you to 02:00, plus the 30 minutes gives 02:30. Writing down the date as well as the time avoids the common error of landing on the right time but the wrong day.

Common mistakes

The most common mistake is the off-by-one error described at the start: counting both end dates when you needed the gap, or counting only the gap when you needed the inclusive length. Decide which one you need, write it down, and keep it the same through the whole calculation.

The second mistake is treating every month as 30 days. That shortcut gives an answer that looks tidy and is almost always wrong. February is the usual victim, but April, June, September and November are also 30 days, not 31. Use the real month lengths, or a calculator, for any date that matters.

The third mistake is forgetting leap years, or applying the rule wrongly. Remember that the leap day is 29 February, and that it only affects a period if the period includes that date. A count from 1 March 2024 to 1 March 2025 includes no 29 February, even though 2024 is a leap year, so it is 365 days, not 366.

The fourth mistake is mixing the 12-hour and 24-hour clocks. A duration from 10:00 in the morning to 2:00 in the afternoon is four hours, but a duration from 10:00 in the morning to 2:00 in the morning the next day is 16 hours. Write times in 24-hour format while you calculate, and convert back to 12-hour format only when you present the answer.

The fifth mistake is rounding weeks too early. A period of 59 days is eight weeks and three days, not eight weeks, and a period of ten days is one week and three days, not one week. If a hire charge, a notice period or a deadline is charged by the week, those leftover days matter.

Putting it together

A reliable routine for any date count has four steps. First, write down both dates in full, with the year, and say whether you need the gap or the inclusive length. Second, count the days left in the starting month, add the full months in between, and add the days in the final month. Third, check whether a 29 February falls inside the period and adjust February if it does. Fourth, check the answer by a second method, such as converting to weeks or counting backwards from the end date.

For times, the routine is similar. Convert to 24-hour format, work in minutes if the arithmetic is awkward, split at midnight if the period crosses it, and convert back to hours and minutes at the end. A calculator can do all of this in seconds, but knowing the method means you can spot a wrong answer when a tool gives you one, and you can work out a rough date in your head when no tool is available.

This post is general information for planning and everyday maths. It is not professional advice for regulated decisions, and official dates, deadlines and legal time limits should always be checked against the source that set them.

Sources

Figures and thresholds in this guide follow the guidance published by the organisations above. Our Editorial Policy explains how we check formulas and worked examples.

Frequently Asked Questions

Count the days left in the starting month, then add the full months in between, then add the days in the final month up to the end date. For 1 January to 1 March 2026, that is 31 days in January plus 28 days in February, giving 59 days. Always state whether you are counting both end dates or only the gap between them, because that choice changes the answer by one.