When to use this calculator
Count calendar days from a start date to an end date. Excludes the end boundary: the same date returns zero. Calendar dates are evaluated in UTC to avoid daylight-saving hour shifts.
Explore the calendar dates & age calculators for other questions in this topic. For a related calculation, use the Date to Unix Timestamp Calculator: Convert a civil date at UTC midnight into Unix seconds.
Calendar days and inclusive counts answer different questions
From 1 January to 2 January there is one elapsed calendar day. Counting both labelled dates gives two dates instead. This tool uses the elapsed day difference. For a hotel stay, that usually corresponds to nights; for a deadline, check the organisation’s start/end rules and holiday treatment.
PUTTING IT INTO PRACTICE
Date Difference: a worked example
The values below are an illustrative example, not a recommendation. Replace them with measurements or assumptions that match your question.
| Input | Example value |
|---|---|
| Start date | 2026-01-01 |
| End date | 2026-02-01 |
| Result | 31 days |
- Check the input labels and enter the example values above.
- Apply the relationship: Days = (end civil date − start civil date)/one day..
- The result is 31 days, rounded for display.
How to interpret your result
Excludes the end boundary: the same date returns zero. Calendar dates are evaluated in UTC to avoid daylight-saving hour shifts.
Choose whether an interval includes the start or end boundary. Month and year additions use explicitly stated clamping rules when a destination day does not exist. Date-only arithmetic is kept independent of local daylight-saving hour shifts.
Frequently asked questions
Does daylight saving change the day count?
No. Date-only calculations use UTC calendar dates to avoid local clock shifts. If you need elapsed hours between actual instants, use an appropriate time-zone-aware calculation.
Does adding one month always add the same number of days?
No. Calendar months vary in length. A day-count addition and a calendar-month addition solve different questions.
When is the date difference calculator useful?
Count calendar days from a start date to an end date. Excludes the end boundary: the same date returns zero. Calendar dates are evaluated in UTC to avoid daylight-saving hour shifts.
How do I use the date difference calculator?
Enter start date, end date. The result updates automatically. Use the units shown beside each input; the example values illustrate the method.
Which formula does this calculator use?
Days = (end civil date − start civil date)/one day..
What should I check before using the result?
Excludes the end boundary: the same date returns zero. Calendar dates are evaluated in UTC to avoid daylight-saving hour shifts.
How are results rounded?
Scalar numbers display up to six decimal places, with scientific notation for very large or small values. Text, fraction, date and schedule outputs use the format described on the tool. Intermediate calculations use JavaScript floating-point arithmetic. Keep sensible precision for your measurements.
Further reading
For background on this topic, see MDN: date values and calendar handling ↗. This is a topic reference, not an external review or endorsement of this tool.
Calculators Map editorial process · Updated · Methods and limitations