Counting days between dates comes up constantly: a birthday countdown, the length of a trip, or the time left before a deadline. The day counter — also called a date-to-date or date duration calculator — returns the answer without manual calendar arithmetic, and it reports working days and custom weekday counts from the same two dates.
The day counter finds the number of days between two dates by subtracting the start date from the end date and adding one if you choose to include the end date. By default the result includes the start date but excludes the end date. The same tool can solve for a missing start or end date when you supply the day count instead.
What is the formula for counting days between dates?
The core calculation is a subtraction with a single switch for the end date:
Here is the field labelled From and is the field labelled To; both accept a date picked from a calendar or typed in. The switch takes the value 1 when the "Include end date" option is selected and 0 when it is not. The Time between output is documented as including the start date and not including the end date unless that switch is ticked.
The calculator exposes four fields for this calculation:
| Field | Label in the tool | What it controls |
|---|---|---|
date1 |
From | Start date; choose from the calendar or type it in |
date2 |
To | End date; it should fall after the start date |
include_end_date |
Include end date | Adds the end date to the count when selected |
time_between |
Time between | Number of days from the start date to the end date |
How do I use the day counter?
There are three ways to use the tool, depending on which value is missing:
- Unknown number of days between dates. If you know the start and end date — for example, the first and last day of the summer holidays — enter both dates and read the day count. The end date should come after the start date; the calculator cannot go back in time.
- Unknown start date. To learn what date it was 57 days ago, enter the end date and the number of days elapsed, then read the start date.
- Unknown end date. To discover what day it will be after a set number of days, enter the starting date and the day count. This is how you would find the finish date of a 90-day fitness challenge.
How do I find a missing start or end date?
When the day count is the known quantity, the subtraction is rearranged: the known date plus or minus the day count gives the unknown date. Enter the end date together with the elapsed days to work backwards to a start date, or enter the start date with the day count to work forwards to an end date. The "can't go back in time" rule still applies to the two dates you enter: the later date belongs in To and the earlier one in From.
Worked example: counting days for a project
Suppose a project is due on September 27, and your boss wants a progress check 14 days before the end of the project. Today is July 14.
First, find the progress-check date. Enter 14 as the day count and September 27 as the end date: subtracting 14 days puts the check on September 13. Next, count from July 14 (the start date) to September 13 (the end date). The day counter returns 61 days — the time you have left to work on the project before the check. The same span can also be read as a working-day count if you need the number of days you actually have to work.
FAQ
Can the day counter count backwards?
No. The end date should be after the starting date — the tool follows the rule that you cannot go back in time. Put the earlier date in From and the later date in To.
Can I use it to count down to my birthday?
Yes. Counting down to a birthday is one of the calculator's stated uses: enter today as the start date and your next birthday as the end date to see how many days remain.
How does it help with a 90-day challenge?
Enter the challenge's start date and a day count of 90 in the unknown-end-date mode, and the calculator tells you the date on which the challenge ends.
References
- Omni's Day Counter reference material: the three calculation modes and the July 14 to September 27 project example.
- The calculator's own field definitions for From, To, Include end date and Time between.
- General calendar and date-arithmetic reference tables behind the date-to-date counting method.