Days Between Dates Calculator
Calculate the exact number of days, weeks, months, and years between two dates with support for inclusive/exclusive counting, custom weekends, and holiday exclusions.
Updated
What is the Days Between Dates Calculator?
Days Between Dates Calculator
The Days Between Dates Calculator is a precise, client-side tool for measuring the exact duration between any two calendar dates.
Features
- Calculates the total number of calendar days between any two dates
- Provides duration breakdowns in:
- Years
- Months
- Weeks
- Days
- Supports both:
- Inclusive counting (includes both start and end dates)
- Exclusive counting (excludes one endpoint)
- Uses UTC-normalized arithmetic to eliminate timezone and daylight saving time (DST) discrepancies
- Suitable for:
- Project planning
- HR leave and vacation tracking
- Software development and scheduling
- Academic and research use
- Runs entirely in your browser with no data sent to any server
Privacy
All calculations are performed locally on your device. No dates, inputs, or personal information are stored, transmitted, or shared.
How it works
How to Use the Days Between Dates Calculator
1. Select a Start and End Date
Choose your start and end dates using the built-in date pickers.
You can also use convenient presets such as:
- Today
- Last 7 Days
- Next 7 Days
- Last 30 Days
- Next 30 Days
- This Year
2. Choose a Counting Mode
Select how the calculator should count the date range:
- Inclusive — includes both the start and end dates
- Exclusive — excludes the end date from the calculation
3. Configure Weekend Rules
Define which days should be treated as weekends.
Options include:
- Default weekends: Saturday and Sunday
- Custom weekends: Adapted to regional work schedules (e.g., Friday/Saturday)
4. Add Optional Holidays
Specify holidays or non-working dates to exclude from working-day calculations.
This is especially useful for:
- HR leave management
- Project planning
- Business scheduling
- Academic calendars
5. View Results Instantly
As soon as you enter your dates, the calculator provides:
- Total calendar days
- Years / months / days breakdown
- Weeks and remaining days
- Weekday distribution
- Working-day calculations
- Leap day detection
6. Copy Your Results
Export your calculations with a single click using the clipboard copy feature.
Privacy & Accuracy
- All calculations are performed locally in your browser
- No data is uploaded or transmitted to any server
- UTC-normalized date arithmetic helps prevent timezone and daylight-saving-time (DST) discrepancies
Examples
Vacation planning
You are planning a trip from July 15 to July 22 and want to know the exact duration. Set start to 2026-07-15 and end to 2026-07-22 with inclusive counting. The result shows 8 total days, 1 week and 1 day, 6 weekdays, and 2 weekend days.
Project timeline with holidays
A project runs from January 6 to January 17, 2026, but January 1 (New Year) and January 20 (MLK Day) are company holidays. You only care about working days. Set the dates, keep weekends as Sat/Sun, and add 2026-01-01 and 2026-01-20 to the holidays field. The tool shows 8 working days, 2 weekend days, and 0 holidays in range (since the listed holidays fall outside the selected range).
Inclusive vs exclusive counting
A contract starts on March 1 and ends on March 5. Exclusive counting gives 4 days (March 1–4). Inclusive counting gives 5 days (March 1–5). Toggle the "Include end date" switch to see both values instantly.
Custom weekend regions
In some Middle Eastern countries, the weekend is Friday and Saturday. Set the start to 2026-06-01 and end to 2026-06-14, then select only Fri and Sat as weekend days. The tool recalculates working days to reflect Sunday–Thursday as the work week.
Leap year awareness
Calculate days between February 28, 2028 and March 1, 2028. The tool flags that February 29, 2028 (a leap day) falls within the range and shows 2 total days (inclusive) or 1 day (exclusive).
Frequently asked questions
Why does this calculator show a different result than Excel or another tool?
Why does this calculator show a different result than Excel or another tool?
Different date calculators often use different calculation methods, which can lead to varying results. This calculator normalizes all dates to UTC midnight before performing calculations, helping avoid common issues caused by local timezone arithmetic and Daylight Saving Time (DST) transitions. Key differences include:
- Eliminates timezone drift and DST-related inconsistencies.
- Produces consistent results regardless of local system settings.
- Allows you to choose between inclusive and exclusive counting modes.
- Avoids off-by-one errors commonly found in date calculations.
What is the difference between inclusive and exclusive counting?
What is the difference between inclusive and exclusive counting?
Counting modes determine whether the start and end dates are included in the total calculation. Exclusive Counting Measures the gap between two dates. Example:
- March 1 → March 2 = 1 day Inclusive Counting Includes both the start date and end date in the total. Example:
- March 1 → March 2 = 2 days Use:
- Exclusive counting when calculating the distance between dates.
- Inclusive counting when calculating a duration that includes both dates.
How do I calculate only business or working days?
How do I calculate only business or working days?
Business day calculations exclude weekends and any holidays you specify. You can:
- Choose which days count as weekends (default: Saturday and Sunday).
- Add custom holiday dates.
- Automatically exclude non-working days from calculations.
- Support regional weekend schedules such as Friday–Saturday. This makes it easy to calculate working days for projects, payroll, leave planning, and scheduling.
Can I count days across multiple years or centuries?
Can I count days across multiple years or centuries?
Yes. The calculator supports the full JavaScript date range and can accurately calculate durations across:
- Multiple years
- Decades
- Centuries
- Historical dates
- Future dates It also correctly handles leap-year rules, including century exceptions such as:
- 1900 was not a leap year.
- 2000 was a leap year.
Why do I need to enter holidays manually instead of selecting a country?
Why do I need to enter holidays manually instead of selecting a country?
Holiday calendars vary significantly between countries, regions, organizations, and employers. Manual holiday entry provides the most accurate results because:
- Public holidays differ by location.
- Company-specific holidays may not match official calendars.
- Holiday schedules can change from year to year.
- You can customize calculations for your exact situation.
Holiday dates should be entered in the format:
YYYY-MM-DDMultiple dates can be separated by commas, spaces, or line breaks.
What format should I use for holiday dates?
What format should I use for holiday dates?
Use the following format for all holiday entries:
YYYY-MM-DD
Example:
2026-12-25
You can enter multiple dates using:
- Commas
- Spaces
- New lines The calculator automatically validates entries and highlights invalid dates.
Does the tool handle time zones or DST changes?
Does the tool handle time zones or DST changes?
No—and this is intentional. All dates are treated as UTC midnight values to ensure consistent calculations. Benefits include:
- Avoiding Daylight Saving Time errors.
- Preventing issues caused by 23-hour or 25-hour days.
- Ensuring every calendar day is treated as exactly 24 hours.
- Delivering predictable and repeatable results across devices and regions.
What is the day-by-day breakdown and how is it useful?
What is the day-by-day breakdown and how is it useful?
The day-by-day breakdown shows how many times each weekday occurs within the selected date range. For example, it can count:
- Mondays
- Tuesdays
- Wednesdays
- Thursdays
- Fridays
- Saturdays
- Sundays This feature is useful for:
- Scheduling recurring events.
- Planning meetings and appointments.
- Workforce and attendance analysis.
- Estimating workloads based on specific weekdays.
Can I use this to calculate someone's age in years, months, and days?
Can I use this to calculate someone's age in years, months, and days?
Yes. To calculate age:
- Enter the birth date as the start date.
- Enter today's date or another target date as the end date.
- The calculator will display the exact age in years, months, and days.
This provides functionality similar to Excel's
DATEDIFformula while presenting the results in a more user-friendly format.
Is my data sent to a server?
Is my data sent to a server?
No. All calculations run locally within your browser. Your data:
- Is never transmitted to external servers.
- Is not stored remotely.
- Remains entirely on your device.
- Continues to work offline after the page has loaded. This approach provides strong privacy protection and fast performance.
Related tools
More utilities you might find handy.
Absolute Difference Calculator
Calculate the absolute difference between two numbers with percentage comparisons and midpoint analysis.
Age Calculator
Calculate your exact age in years, months and days from your date of birth.
Aspect Ratio Calculator
Calculate aspect ratios, simplify dimensions, and solve for missing width or height with a live visual preview.