← CrunchWise

Date Calculator

Find days between dates, add or subtract time from any date, or look up the day of the week for any date in history.

Select Two Dates

Between Dates

Wednesday, February 18, 2026Friday, March 20, 2026

Total Days

30

forward

Weeks

4w 2d

forward

Duration Breakdown

In days30 days
In weeks4 weeks, 2 days
In months1 months, 2 days
In years0 years, 1 months, 2 days

Date Info

Start Date

Wednesday

February 18, 2026

End Date

Friday

March 20, 2026

Date Calculation: Finding Days Between Dates

How calendars work, why date math is trickier than it looks, and practical applications for date calculations.

Why Date Math Is Complicated

Counting days between two dates seems simple — just subtract. But our calendar system makes this surprisingly tricky. Months have different lengths (28, 29, 30, or 31 days). Years have either 365 or 366 days. Time zones, daylight saving time, and historical calendar reforms add more complexity.

The safest approach for counting days between dates is to convert both dates to a common timestamp (milliseconds since a fixed epoch, as JavaScript does), find the difference, and divide by the number of milliseconds in a day (86,400,000). This avoids the pitfalls of manual month arithmetic.

Adding months and years is where most errors occur. Adding "one month" to January 31 could give February 28 or 29 (the last day of February), not an invalid date. Date libraries like date-fns, Luxon, and Temporal handle these edge cases correctly.

Leap Years: The Rules

A year is a leap year if it is divisible by 4 — with two exceptions. Years divisible by 100 are NOT leap years, unless they are also divisible by 400.

  • 2024: Divisible by 4, not by 100 → Leap year
  • 1900: Divisible by 100, not by 400 → NOT a leap year
  • 2000: Divisible by 400 → Leap year

This system keeps our calendar aligned with Earth's actual orbital period of approximately 365.2425 days. Without leap years, our calendar would drift by one full day every ~4 years — meaning July 4th would eventually fall in winter.

Practical Uses for Date Calculations

  • Age calculation: Find your exact age in years, months, and days. This is exactly what courts, medical professionals, and insurance companies do — a person is not 30 years old until the anniversary of their 30th birthday.
  • Contract deadlines: Contracts often specify terms in days. Adding 90 days to a signing date gives you the exact due date, accounting for month lengths.
  • Project planning: Counting business days (excluding weekends) is common in project management. 30 calendar days is typically 20–22 business days.
  • Investment holding periods: Tax treatment of capital gains depends on whether an asset was held more or less than 365 days. The exact date matters.

The Gregorian Calendar and Its History

The calendar we use today — the Gregorian calendar — was introduced by Pope Gregory XIII in 1582 as a correction to the Julian calendar, which had accumulated a 10-day drift over 12 centuries. Countries adopted it at different times: Catholic countries in 1582, Britain and its colonies in 1752, Russia not until 1918.

This means historical dates before 1918 can be ambiguous — depending on whether you use the Julian or Gregorian (proleptic) calendar. George Washington's actual birthday is February 11, 1731 on the Julian calendar in use at his birth, but is celebrated on February 22 using the Gregorian conversion.

This calculator uses the proleptic Gregorian calendar — applying modern calendar rules to all dates, including ancient ones. For precise historical work, consult a calendar conversion tool.

Day of the Week Calculation Methods

Several algorithms can determine the day of the week for any date. The most famous is Zeller's congruence, a formula published in 1882. Another is the Doomsday algorithm, invented by mathematician John Conway, which enables mental calculation of any day of the week.

The Doomsday algorithm works by memorizing that certain memorable dates always fall on the same day of the week in any given year — called the "doomsday" for that year. For example, 4/4, 6/6, 8/8, 10/10, and 12/12 always share a day. Once you know the doomsday, you count forward or backward from the nearest anchor.

Modern computers simply store dates as a count of days from a fixed epoch (January 1, 1970 in Unix time) and use modular arithmetic to find the day of the week.

Notable Date Intervals

MilestoneDays
1 year (non-leap)365
1 year (leap)366
100 days100
1 month (average)30.44
13 weeks (quarter)91
10,000 days old~27.4 years
1,000,000 seconds~11.6 days

© 2026 CrunchWise. For educational purposes only.