Date Difference Calculator
How the Date Difference calculator works
Formula. Days are the absolute millisecond difference divided by 86,400,000 and rounded down. Weeks are days / 7, months are days / 30.44, and years are days / 365.25, each rounded down.
Example. January 1, 2024 to January 31, 2024 is 30 days. That is 4 weeks (30 / 7 rounded down), 0 months (30 / 30.44 rounded down), and 0 years.
Limitation. Months use a 30.44-day average and years use 365.25 days, so those units are not exact calendar months or calendar years.