Date Difference Calculator

Two dates — days, weeks, months, years between them. Bonus: age from birthdate + days until next birthday.

Runs entirely in your browser. Your data never leaves your device.

Date Difference

Total Days
—
Total Weeks
—
Total Months
—
Total Years
—
Years · Months · Days
—

Bonus: Age from Birthdate

Exact Age
—
Days Lived
—
Days Until Next Birthday
—

Calculation Method

Difference in days is computed using the UTC day numbers (ignoring local time zones), so DST transitions never affect the count. Calendar-aware months/years are computed by iterating whole months and then adding a remainder in days.

MetricHow
Days(UTC(dateTo) − UTC(dateFrom)) / 86,400,000
Weeksfloor(days / 7)
MonthsCalendar-aware: count whole months, remainder in days
YearsWhole calendar years, remainder in months/days

Test Data

From → ToDaysYears · Months · Days
2024-01-01 → 2025-01-01366 (leap year)1 · 0 · 0
2024-02-28 → 2024-03-0120 · 0 · 2
2023-06-15 → 2026-09-2311663 · 3 · 8

Manually verified. Last checked: September 2026.

When Not To Use This Calculator

Frequently Asked Questions

How are months and years calculated?

Days are exact (86,400 seconds). Months and years use calendar-aware math — the difference is computed by counting whole calendar months/years first, then expressing any remainder in days. This handles leap years and varying month lengths correctly.

Why is 'weeks' shown as well?

Because weeks are a handy mid-unit between days and months. Total days ÷ 7 gives you the total weeks between two dates, regardless of month boundaries.

Is my data sent to a server?

No. All calculations run locally in your browser. No dates or birthdates you enter are transmitted anywhere.

What happens if the end date falls before the start date?

Total Days goes negative, and the result shows the absolute value in parentheses right next to it, so a swapped pair of dates is easy to spot. Weeks, months and years follow the same sign.

For someone’s age, is this calculator or the Age Calculator the better pick?

This page includes a bonus age section, so either one works for a plain age. Reach for the Age Calculator when the birthdate is the whole point: it adds weeks and hours lived plus the Chinese and Western zodiac signs.

Once you know the span, plan with it: step a set number of days forward in the Date Adder and look up the sign of either date in the Chinese Zodiac Calculator.