How to count days between two dates (and why it's trickier than it looks)
Counting days between dates sounds like subtraction. Then a leap year sneaks in and your deadline is suddenly wrong. Here's how calendar math really works.
The basic idea
Every date maps to an absolute day number (day 0 = some fixed reference). The difference between two dates is simply the difference between their day numbers — our date calculator does exactly this instantly, including hours and minutes.
Leap years: the whole reason it's hard
A year is 365.2422 days, so we add February 29 every 4 years — except centuries, except every 400 years. 2000 was a leap year; 1900 wasn't; 2100 won't be. Any span crossing February 29 must account for it or your count is off by one.
Inclusive vs exclusive counting
'Days between Monday and Wednesday' is 2 by subtraction — but some contexts count inclusively and say 3 (Monday, Tuesday, Wednesday). Always check which convention a contract or app uses; this off-by-one has broken software and missed deadlines for decades.
Real-world uses
Project timelines, billing cycles, age in days, pregnancy tracking, and countdowns all rely on this math. For 'how old am I' style questions, our age calculator gives exact years, months and days — leap years included.