How to calculate the days between two dates

Working out how many days lie between two dates sounds trivial until months of different lengths, leap years and the question of whether to count the first day get in the way. People need the answer for notice periods, delivery windows, rent and interest, project plans, countdowns and for settling arguments about how long it has been. This guide shows a reliable method by hand, with worked examples, explains the difference between counting the days between dates and counting the days including both, covers weeks and months, and describes how week numbers behave around the new year.

The basic method: count the days by month

The easiest way to count by hand is to break the period into pieces that end on the last day of each month. Count the days left in the starting month, add the full length of each month in between, and add the day number of the end date.

Take 10 March 2027 to 18 July 2027. The days left in March after the 10th are 31 minus 10, which is 21. Then add all of April (30), May (31) and June (30), which is 91. Finally add the 18 days of July. The total is 21 plus 91 plus 18, which is 130 days.

A second check is to count to a round date. From 10 March to 10 July is 4 months, which is 21 plus 30 plus 31 plus 30 plus 10, or 122 days, and then 8 more days takes you to 18 July, giving 130 again. If two routes agree, you can trust the answer.

Inclusive or exclusive: do you count the first day?

The result above, 130, is the number of days from 10 March to 18 July when you count the nights in between, or the number of times the date has to move forward. If you count both the first and the last day, you get 131. Neither is wrong, but you must know which one you need.

A simple test is to think of two consecutive days, say Monday and Tuesday. The difference between them is 1 day. If a hotel booking runs from Monday to Tuesday, it is one night, but you are on site for two calendar days. Rent, interest and nights of a stay are normally counted exclusively. A conference running from the 4th to the 6th is three days when you count both ends.

For deadlines, read the wording. Many legal and contract time periods are counted starting from the day after an event, so the day of the event is not day one. When it matters, check the contract or the official guidance rather than assuming.

Leap years

A leap year has an extra day, 29 February. The usual rule is that a year divisible by four is a leap year, unless it is divisible by 100, in which case it is not, unless it is also divisible by 400. So 2024 and 2028 are leap years, 2100 will not be, and 2000 was.

Leap years only matter if your period includes 29 February. From 1 January 2027 to 31 December 2027 there are 364 days between those dates, because 2027 is not a leap year. In 2028, the same pair of dates is 365 days apart.

If you are counting across several years, the usual average is 365.25 days a year, which is a good rule for a rough answer. For an exact answer, count the full years and then the remaining months and days.

Whole weeks, months and years

To convert days into weeks, divide by 7. 130 days is 18.57 weeks, which is 18 weeks and 4 days (18 × 7 is 126, and 130 minus 126 is 4). This is how due dates, notice periods and project plans are often expressed.

Months are harder because they vary between 28 and 31 days. Whenever you need a calendar answer, such as 3 months from 31 January, the result depends on convention. Some systems give 30 April because 31 April does not exist. Others roll over to 1 May. In contracts the usual meaning is the corresponding date, or the last day of the month if there is no match.

For ages and anniversaries, use years, months and days in that order. Someone born on 5 June 1990 is, on 18 October 2026, 36 years, 4 months and 13 days old. In total days that is 13,649 days. Both are correct but they answer different questions.

Adding days to a date

The reverse problem is to find the date that is a certain number of days ahead. Add the days to the start date, carrying into the next month when you pass the end of the month. 14 May 2027 plus 30 days: there are 17 days left in May after the 14th, so 30 minus 17 is 13 days into June, giving 13 June 2027.

A common case is a 28 day period, which is exactly four weeks, so the date falls on the same day of the week. 31 January 2027 plus 28 days is 28 February 2027, because February 2027 has 28 days and the count ends on the final day of the month.

Counting 90 days from 1 March 2027 gives 30 May 2027, not 1 June, because March and May have 31 days each. Three calendar months and 90 days are not the same thing, so if the date is an important deadline, check which one the wording means and confirm the date with a date calculator.

Working days and weeks of the year

Often you need working days instead of calendar days. A simple estimate is to multiply the number of weeks by five, then adjust for the partial week and for bank holidays. For 130 days, which is 18 weeks and 4 days, you have 90 weekdays from the full weeks, and up to 4 more from the remainder, depending on which days they are, then minus any bank holidays in the period.

Week numbers are used in planning, payroll and logistics. The most common system is ISO 8601, in which weeks start on Monday and week 1 is the week containing the first Thursday of the year, which is the same as the week containing 4 January. That means the first days of January can belong to week 52 or 53 of the previous year, and the last days of December can belong to week 1 of the next.

For example, 1 January 2027 is a Friday, and it falls in week 53 of 2026, because 2026 has 53 ISO weeks. Week 1 of 2027 starts on Monday 4 January. Be careful when a spreadsheet or a supplier quotes a week number: ask which system they use, because some count a week that includes 1 January as week 1.

Practical tips

Write the dates in full, with the year, when you do the sum. Dates such as 3/4/27 are ambiguous, and in the UK day comes before month, while elsewhere it can be the other way round. Using a format such as 3 April 2027 avoids the problem.

Check your answer with a second route. A good habit is to count forward from the start date to the end date, then back from the end date to the start, and confirm they agree.

Be aware of time zones and daylight saving if you are counting hours rather than days. A day on the date the clocks change has 23 or 25 hours, which matters for anything billed by the hour. For example, from 18 October 2026 to 1 January 2027 there are 75 days, but because the clocks go back on 25 October 2026 the period holds 1,801 hours, not 1,800.

Tools mentioned in this guide

Frequently asked questions

How many days are there between two dates?

Subtract the earlier date from the later one. Count the days left in the first month, the full months in between and the day number of the end date. 10 March to 18 July 2027 is 130 days.

Should I include the first day when counting?

It depends on the purpose. The difference between dates, such as nights stayed, does not include the first day. Counting both ends gives one more. Read the rules for your deadline carefully.

How do leap years affect the count?

A leap year adds 29 February. If the period includes that day, add one to the total. 2028 is the next leap year after 2024.

How many weeks is 130 days?

It is 18 weeks and 4 days, or 18.57 weeks. Divide by 7 and keep the remainder.

Why is 1 January sometimes in week 53?

In the ISO system, week 1 contains the first Thursday of the year. If 1 January falls on a Friday, Saturday or Sunday, it belongs to the last week of the previous year, which can be week 52 or 53.