Days Between Dates

Calculate the total absolute number of days between two dates.

Select both a Start Date and End Date to compute the total days.

How to Use

1

Enter both dates

Select or type a 'From' date and a 'To' date in the two input fields.

2

Choose inclusive or exclusive counting

Toggle the mode based on whether both boundary dates should be counted in the total.

3

Read the total days

See the absolute number of days between the two dates, always shown as a positive value.

4

View weeks breakdown

See the total also expressed as complete weeks plus remaining days.

Inclusive vs Exclusive Days

You can toggle our calculator to either include or exclude the final end date. By default, it calculates the raw absolute difference without counting the final boundary day.

Real-World Examples & Use Cases

Event Planning and Countdown Tracking

Event planners calculating time until a wedding, conference, product launch, or holiday need a simple absolute day count. 'The wedding is 127 days away.' Project deadlines, subscription renewal reminders, and policy expiry dates are often expressed as 'N days from now' or 'N days apart'. The simple total-days format is more actionable for planning than a years/months/days breakdown for spans under a year.

Billing, Subscription, and Rental Period Calculations

Landlords calculating pro-rata rent for partial months, subscription services billing for exact days of service used, and daily-rate contractors invoicing clients use total-day counts for accurate billing. A contractor billed at $250/day who worked from March 15 to April 7 (inclusive) worked 24 days total. Pro-rata rent for a tenant who moved in March 17 and the month ends March 31 is 15 days × (monthly rent / 31 days).

Sports and Athletic Training Cycles

Athletes planning training cycles use day counts to structure periodization programs. A 16-week marathon training plan is 112 days. Tapering periods, peak training weeks, and recovery periods are specified in days from race day (T-14 days, T-7 days). Coaches and athletes tracking training blocks between competitions and performance tests use specific day intervals to structure progressive overload and recovery cycles precisely.

Academic Semester and Course Duration Tracking

Universities and online course providers calculate course durations in days for scheduling, accreditation documentation, and completion certificate dates. 'This 8-week course runs 56 calendar days.' Students planning study schedules divide total study days by chapters or topics. MOOC platforms calculate completion rates relative to the total number of days the course has been available. Academic sabbatical leave, research fellowship dates, and grant reporting periods are documented as specific day counts.

How It Works

Days between dates calculation: Core formula using UTC dates (avoids DST errors): const utcDate1 = Date.UTC(y1, m1-1, d1); const utcDate2 = Date.UTC(y2, m2-1, d2); const diffMs = Math.abs(utcDate2 - utcDate1); const diffDays = Math.floor(diffMs / (1000 × 60 × 60 × 24)); // This is the EXCLUSIVE count (start to end, not counting start or end) Inclusive count: inclusiveDays = exclusiveDays + 1; // Counts both the start day AND the end day Why UTC matters: Local time calculations can lose/gain an hour at DST transitions (e.g. March 8 to March 9 in US has only 23 hours in local time) Using UTC avoids this — UTC never has DST shifts Weeks and days breakdown: weeks = Math.floor(totalDays / 7); remainingDays = totalDays % 7; Result: N weeks and M days Example: From 2024-01-01 to 2024-04-01 (Jan 1 to Apr 1): Jan: 31 days, Feb: 29 days (2024 is a leap year), Mar: 31 days Total: 31 + 29 + 31 = 91 days exclusive

Frequently Asked Questions

What is the difference between inclusive and exclusive day counting?
Exclusive counting (default): the space between dates; from Monday to Friday = 4 days (Tuesday, Wednesday, Thursday, Friday — not counting Monday). Inclusive counting: counting every labeled day including both endpoints; Monday through Friday inclusive = 5 days. Use inclusive counting for 'how many days does a hotel stay cover?' (check-in day counts) and exclusive for 'how many days are left until an event?' (countdown style).
Why do I get different answers with different tools?
The most common difference is inclusive vs exclusive counting — adding 1 or not to the base calculation. Some tools also use local time instead of UTC, which can cause a 1-day discrepancy on days when Daylight Saving Time transitions occur (those days have 23 or 25 hours in local time rather than exactly 24). Our tool uses UTC dates for all day-count calculations to eliminate this DST ambiguity.
How many days are in different common time periods?
1 week = 7 days. 1 month = 28–31 days (average ~30.44 days). 1 quarter = 90–92 days. 1 year = 365 days (or 366 in leap years). 5 years = 1,826 days (typical, not accounting for exact leap year placement). 10 years = 3,652 or 3,653 days. A decade spanning 2020–2030 includes 3 leap years (2020, 2024, 2028) = 3,653 days.
Does the calculator work for historical dates before 1970?
Yes. Unlike Unix timestamps which use 1970 as epoch zero, JavaScript's Date object can handle dates back to approximately 100 CE (year 100 AD). The calculator correctly computes day differences for any Gregorian calendar date range. Note that dates before about 1582 (when the Gregorian calendar was adopted in Catholic countries) or before a specific country's adoption date may produce results inconsistent with contemporary historical records using the Julian calendar.
How do I calculate days remaining until a future date?
Enter today's date in the 'From' field and your target future date in the 'To' field. The result in days is your countdown. Alternatively, use the dedicated Days Until Calculator tool which automatically uses today's date as the start and only requires the target date input.

Related Tools

Explore other tools in this category.

Looking for something else?