Guide

How to count the days between two dates.

Subtracting one date from another gives the number of midnights between them. Most disagreements about a date span come down to one question: does the first day count?

Last updated: October 2026 ยท Age in Days

Exclusive and inclusive counts

A trip from Friday, March 6 to Saturday, March 14, 2026 can honestly be described three ways:

QuestionAnswerWhy
How many days between the dates?8End minus start. The calculator's main figure.
How many hotel nights?8One night per midnight crossed.
How many dates does the trip touch?9Both ends counted. The calculator shows this as the inclusive figure.

The rule of thumb: counting gaps gives end minus start. Counting days you were present gives end minus start, plus 1. Decide which one the question means before you calculate.

30 days is not one month

"30 days from January 31, 2026" is Monday, March 2, 2026. "One month from January 31, 2026" is Saturday, February 28, 2026, because February has no 31st and the date is capped at the end of the month. In 2028, a leap year, the answers are March 1 and February 29.

Trials, notice periods, and payment terms use both styles. Read whether the terms say days or months, then pick the matching mode. The calculator's Days between mode counts days. Its "In 1 year" shortcut adds calendar months.

Calendar days are not 24-hour blocks

On Sunday, March 8, 2026, clocks in most of the United States move forward one hour. From noon on Saturday, March 7 to noon on Monday, March 9, two calendar days pass but only 47 hours. In the UK the same thing happens on Sunday, March 29, 2026.

Code that subtracts timestamps and divides by 24 hours can return 1.958 and truncate it to 1. The calculator compares calendar dates, not clock time, so daylight saving never changes the count.

Worked examples

QuestionDatesAnswer
Length of a leaseSeptember 1, 2026 to August 31, 2027364 days between, 365 dates covered
Days left on a 90-day visa that started June 1, 2026If day 1 is June 1, day 90 is August 29, 2026Count inclusively: start + 89
Days since a product launchMarch 15, 2026 to October 29, 2026228 days

The visa row shows why the rule matters. If you add 90 to June 1 you get August 30, one day past a 90-day stay that counts its first day. Immigration rules differ by country, so check how the issuing authority counts.

A legal example of a counting rule

US federal civil procedure spells out its method in Fed. R. Civ. P. 6(a)(1): exclude the day of the event that starts the period, count every day including weekends and holidays, and include the last day, unless the last day is a Saturday, Sunday, or legal holiday, in which case the period runs to the next day that is not one of those. A 14-day period triggered on Friday, October 2, 2026 ends on Friday, October 16. Other courts, contracts, and agencies set their own rules.

Reversed dates

If the end date is earlier than the start date, the calculator still reports the positive span and notes the order. Spreadsheets behave differently: =B2-A2 goes negative, and DATEDIF returns a #NUM! error when the start date is later.

Spreadsheet and code equivalents

ToolExclusive countInclusive count
Excel or Google Sheets=B2-A2 or =DAYS(B2, A2)=B2-A2+1
Python(end - start).days(end - start).days + 1
SQL (PostgreSQL)end_date - start_dateend_date - start_date + 1

For working days rather than all days, see the working days guide.