Other · Live
Day Counter —
days, weeks, months & years between dates.
Pick any two dates and instantly see the exact number of days between them — broken down into weeks, months, years, weekdays, and weekends. Handles leap years, end-date inclusion, and date ranges spanning centuries.
Inputs
Day counter
January 1, 2025
December 31, 2025
Quick presets
Days between
Exclusive of end date
January 1, 2025 → December 31, 2025
Breakdown
All formats at a glance
| Total days | 364 days |
| Total weeks + days | 52 weeks and 0 days |
| Total months + days | 11 months and 30 days |
| Years, months & days | 0 years, 11 months, 30 days |
| Weekdays (Mon–Fri) | 260 days |
| Weekend days (Sat–Sun) | 104 days |
| Start day of week | Wednesday |
| End day of week | Wednesday |
Math notepad
Step-by-step calculation.
Date range
From: January 1, 2025 (Wednesday)
To: December 31, 2025 (Wednesday)
Step 1: total days
Milliseconds difference: 31,449,600,000 ms
÷ 86,400,000 ms/day = 364 days
Step 2: weeks and days
364 ÷ 7 = 52 weeks remainder 0
→ 52 weeks + 0 days
Step 3: months and days (calendar)
Full calendar months from January 1, 2025: 11
Remaining days: 30
→ 11 months + 30 days
Step 4: years, months, and days (calendar)
0 years, 11 months, 30 days
Step 5: weekdays and weekends
Starting on Wednesday:
Weekdays (Mon–Fri): 260
Weekend days (Sat–Sun): 104
260 + 104 = 364 ✓
Total = 364 days
Date calculation guide
Counting days, weeks, and years — explained.
Counting the number of days between two dates sounds simple, but it involves surprising complexity: calendar months have different lengths, leap years add an extra day every four years (with exceptions), and whether you count the start day, the end day, or both changes the result. This guide explains how day counting works, how leap years are handled, and why it matters for project management, finance, legal deadlines, and everyday planning.
How are days between dates calculated?
The most reliable method is to convert both dates to a common reference — typically milliseconds since the Unix epoch (January 1, 1970 00:00:00 UTC) — subtract, and divide by the number of milliseconds in a day (86,400,000 ms). This approach is exact because it works in UTC time, avoiding the complications of daylight saving time transitions that can make a day 23 or 25 hours long.
The result is always a whole number because calendar dates are discrete — there are no fractional days between midnight-to-midnight boundaries.
Should you include the end date?
Whether to include the end date depends on what you are counting:
- Exclusive (default: do not include end date): Counts the number of days that have elapsed. From January 1 to January 3 = 2 days. This is how banks calculate interest, how age is measured, and how most programming date libraries work.
- Inclusive (include end date): Counts the number of days that occur during the range. From January 1 to January 3 = 3 days (Jan 1, Jan 2, Jan 3). This is how event organizers count conference days, how hotel stays are billed by night (a 3-night stay spans 4 calendar days), and how project managers count working days in a sprint.
The difference of exactly 1 day may seem trivial, but it matters for legal deadlines (a 30-day notice period), financial contracts (bond maturity calculations), and scheduling tools. Always clarify which convention applies before committing to a deadline.
Leap years: how they work and why they matter
The Earth takes approximately 365.2422 days to orbit the Sun. To keep the calendar year aligned with the solar year, we add one extra day — February 29 — roughly every four years. The precise rule is:
- A year is a leap year if it is divisible by 4, e.g., 2024, 2028, 2032.
- Exception: years divisible by 100 are not leap years , e.g., 1900 was not a leap year.
- Exception to the exception: years divisible by 400 are leap years, e.g., 2000 and 2400 are leap years, but 1700, 1800, and 1900 are not.
This Gregorian calendar rule keeps the calendar accurate to within 1 day per 3,030 years — far more precise than the Julian calendar (1 day every 128 years) it replaced in 1582.
For day counting, leap years matter when your date range includes February 29. A range from January 1, 2024 to December 31, 2024 has 365 days (not including end date), because 2024 is a leap year and February 29 is counted. The same range in 2025 (not a leap year) has 364 days.
For the years/months/days breakdown, leap years matter when computing the exact duration of a year. "1 year from February 29, 2024" reaches February 28, 2025 (or March 1, 2025, depending on the convention used), since February 29 does not exist in 2025. Different software handles this edge case differently. This calculator uses the most common convention: one year from Feb 29 is Feb 28 of the following year.
Weeks, months, and years: how the breakdown works
Breaking a day count into weeks, months, and years requires different approaches:
- Weeks and days: Straightforward integer division. Total days ÷ 7 = whole weeks; remainder = extra days. This is exact and unambiguous because weeks are always exactly 7 days.
- Months and days: Months have 28, 29, 30, or 31 days, so we must use a calendar-based algorithm. Starting from the start date, we advance full calendar months until we reach or exceed the end date, then count remaining days. This gives accurate results regardless of which months are involved.
- Years, months, and days: Similar calendar-based approach: first count full years, then full calendar months in the remaining period, then remaining days. This is the same algorithm used by age calculators.
Weekdays and weekend days
For work scheduling, project planning, and legal deadlines, the distinction between weekdays (Monday through Friday) and weekend days (Saturday and Sunday) is crucial. The calculator counts both using a mathematical formula based on the starting day of the week and the total number of days — no iteration required, making it accurate for any date range, however long.
Note that this calculator does not account for public holidays, which vary by country, region, and year. For a business days calculation that excludes specific holidays, you would need a dedicated business days calculator with a holiday calendar for your jurisdiction.
Common uses for day counting
- Project management: Sprint planning, milestone tracking, and deadline calculation. Agile sprints are typically 10 or 14 days; knowing the exact end date from a start date is essential.
- Financial calculations: Interest accrual, bond duration, loan terms, and payment schedules all depend on exact day counts. A 30/360 day count convention (common in bonds) differs from an actual/actual count.
- Legal deadlines: Notice periods, statute of limitations, contract terms, and probationary periods are all measured in calendar days. Whether "30 days from service" means 30 exclusive or 31 inclusive can determine whether a filing is timely or in default.
- Event countdowns: Days until a birthday, wedding, vacation, graduation, or product launch. The anticipation of a major life event is heightened by seeing the exact count tick down.
- Age calculation: A person's exact age in years, months, and days from their date of birth is the most common use of date difference calculation. Medical records, insurance policies, and official documents often require exact age in months for infants and children.
- Historical research: How long ago did an event occur? How many days did a historical period last? Day counters span the full range of the Gregorian calendar for accurate historical calculations.
- Academic calendars: Semesters, academic years, exam periods, and research project timelines are often defined in days or weeks.
- Pregnancy and medical timelines: Gestational age is measured in weeks and days from the last menstrual period (LMP). Medical protocols, treatment courses, and follow-up intervals are often specified in exact days.
The Unix epoch and date arithmetic
Modern computers represent dates as the number of milliseconds elapsed since January 1, 1970 00:00:00 UTC — a reference point called the Unix epoch. This representation makes date arithmetic trivially easy: subtract two timestamps, divide by the number of milliseconds in a day, and you have the day count.
The key to accuracy is using UTC (Coordinated Universal Time) rather than local time. Local time zones observe daylight saving time (DST), which means a "day" in local time can be 23 or 25 hours on the days when clocks change. Using UTC ensures every day is exactly 86,400 seconds, regardless of what time zone you are in.
Calendar systems: a brief note
This calculator uses the proleptic Gregorian calendar for all dates, the Gregorian calendar extended backwards before its adoption in 1582. Historical dates before October 15, 1582 (or later, in countries that adopted the calendar later) were recorded in the Julian calendar, which had a slightly different leap year rule. For dates in the distant past, be aware that the calendar in use at the time may have differed from the Gregorian system this calculator uses.