Date Calculator
Calculate the difference between two dates, add or subtract durations, and find business days. Essential for deadline planning and date math.
Date Difference
365
Days
52 w 1 d
Weeks
1y 0 mo
Months
261
Business Days
From: Fri, April 24, 2026To: Sat, April 24, 2027
Add / Subtract Duration
Result
2026-05-24
Sun, May 24, 2026
Quick Presets
How to Use Date Calculator
- 1Select two dates to calculate the difference between them.
- 2See the result in days, weeks, months, and years.
- 3Use the date arithmetic section to add or subtract a duration.
- 4View business days (excluding weekends) between the dates.
Zenovay
Privacy-first analytics for your website
Understand your visitors without invasive tracking. GDPR compliant, lightweight, and powerful.
Related Tools
Color ConverterConvert colors between HEX, RGB, HSL, and CMYK formats. Live preview with color picker.
Unit ConverterConvert between units of length, weight, temperature, area, volume, speed, and more.
Number Base ConverterConvert numbers between binary, octal, decimal, and hexadecimal bases.
Unix Timestamp ConverterConvert between Unix timestamps and human-readable dates. Show ISO 8601, UTC, local time, and relative time.
Frequently Asked Questions
How do I count the days between two dates?▾
Subtract the earlier date from the later date in milliseconds and divide by 86,400,000 (ms per day). In JavaScript: Math.round((new Date(end) - new Date(start)) / 86400000). Whether you include both start and end dates depends on convention — for "how many days does an event span", include both; for "how many days until", exclude the start date.
How are business days calculated?▾
Business days exclude Saturdays and Sundays. To count them, iterate day by day between the two dates and count days where getDay() is not 0 (Sunday) or 6 (Saturday). For more precise calculations that also exclude public holidays, you need a country-specific holiday calendar, which this tool does not include.
How do I add months to a date correctly?▾
Adding months requires care with month-end dates. Adding 1 month to January 31 should give February 28/29, not March 2/3. Most date libraries handle this by clamping to the last valid day of the resulting month. In JavaScript: set the month with setMonth(), then check if the day changed — if so, set back to the last day of the previous month.
What is a Unix timestamp?▾
A Unix timestamp is the number of seconds (or milliseconds in JavaScript) since January 1, 1970 00:00:00 UTC. It provides a timezone-independent reference point. new Date().getTime() returns milliseconds since epoch. Unix timestamps are always in UTC — they have no timezone. To display them, convert to a Date object and format in the desired timezone.
How do I calculate age from a birthdate?▾
Age = current year - birth year. But you must subtract 1 if the birthday hasn't occurred yet this year (month/day comparison). A reliable method: start with (currentYear - birthYear), then subtract 1 if today is before the birthday month/day combination. This handles leap year birthdays correctly in most cases.