Days between dates and countdown.
D = |Date₂ − Date₁|
The number of days between two calendar dates is calculated by subtracting the earlier (start) date from the later (end) date. Most programming languages and spreadsheet tools treat dates as sequential integers (day numbers), so simple subtraction yields the difference in days. The result is an absolute value so direction (past vs. future) is handled separately as a positive count.
January 15 to July 4, 2024: • Jan 15 → Jan 31 = 16 days • February 2024 (leap year) = 29 days • March = 31 days • April = 30 days • May = 31 days • June = 30 days • July 1–4 = 4 days Total = 16 + 29 + 31 + 30 + 31 + 30 + 4 = 171 days
Result: 171 days between January 15, 2024 and July 4, 2024 (end date excluded).
The result of 171 days means there are exactly 171 calendar days from January 15, 2024 up to (but not including) July 4, 2024. If you choose to include the end date, the result would be 172 days. A positive result means the end date is after the start date (future or elapsed span); if the dates were reversed, the absolute value would still return 171 days while the tool would note the end date precedes the start date.
This calculator counts calendar days — every day of the week, including weekends and public holidays. If you need to count only working days (Monday–Friday), you would use a business day counter that excludes weekends and optionally skips holidays.
Leap years add an extra day (February 29) every four years. The Day Counter automatically handles leap years, so a span crossing February in a leap year (e.g., 2024, 2028) will correctly include that extra day.
A common year has 365 days; a leap year has 366. When counting days across multiple years, each leap year adds one extra day. The Day Counter handles this automatically, but it explains why 'multiply years by 365' gives a slightly wrong answer for long spans.
Elapsed days measure how many days have passed since a past date (e.g., 'It has been 200 days since January 1'). A countdown measures days remaining until a future date (e.g., '45 days until the deadline'). Both use the same subtraction formula — only the interpretation differs.
In Excel, use =DAYS(end_date, start_date) or simply =B1-A1 where A1 is the start date and B1 is the end date (formatted as date cells). The result is the number of days between them, equivalent to what this calculator provides.
In finance, the number of days between dates is used to calculate accrued interest, bond coupon periods, holding periods for capital gains tax treatment (short-term vs. long-term), and loan amortization schedules.
The Gregorian calendar is the internationally accepted civil calendar introduced in 1582, used by most of the world today. This Day Counter operates on Gregorian calendar dates. It does not natively support Julian, Hebrew, Islamic, or other calendar systems.
Enter the earlier date as your Start Date and the later date as your End Date in the Day Counter, then click Calculate. The tool instantly subtracts the two dates and returns the total number of calendar days between them.
By default, the start date is included and the end date is excluded (this matches how most date-difference calculations work, similar to Excel's DAYS function). You can toggle the 'Include End Date' option to add one extra day to the result.
Yes. Enter today's date as the Start Date and your target future date as the End Date. The result shows exactly how many days remain until that event.
The calculator accounts for leap years automatically. If your date range includes February 29 of a leap year (e.g., 2024), that day is counted just like any other calendar day, so the result is always accurate.
The Day Counter can handle any date range supported by the Gregorian calendar, including spans of thousands of years, making it suitable for historical research as well as near-future countdowns.
The standard Day Counter counts all calendar days including weekends. For business-day counts (Monday–Friday only), use a dedicated Business Day Calculator that allows you to exclude weekends and optionally specify public holidays.
Only sources that have been reviewed are shown. Unverified citations are never published.
Spotted an inaccuracy or have an idea to improve this calculator? Let us know.
We use cookies to operate the site, and — with your consent — to show advertising and measure usage. You can change your choice anytime in Cookie Settings.