"How many days until..." is one of the most asked calendar questions, whether you are counting project deadlines, billing days, notice periods or days between two dates for a travel plan. The good news: the calculation is simpler than the calendar looks.
Total days = one subtraction (with a leap-year catch)
Every date maps to a serial number on a timeline, so the fastest method is: convert both dates to a reference day count, then subtract. The formula most tools use counts each day from a fixed anchor and adds 1 for every leap day that falls in between. Two dates on the same month differ by simple subtraction; two dates across years need the leap adjustment.
Example: 1 January to 1 July in the same year is 181 days (or 182 in a leap year), because February adds or removes a day. 1 January 2026 to 1 January 2027 is 365 days - 2026 is not a leap year.
Weeks and months: the friendly units
Weeks are exact: divide the total days by 7. 45 days = 6 weeks and 3 days. Months are approximate because months vary from 28 to 31 days; most calculators use an average of 30.44 days per month, so 90 days is "about 3 months" rather than a precise calendar month. For deadline maths, always rely on the exact day count.
Leap years: the 29 February rule
A year is a leap year if it divides by 4, except century years, which must also divide by 400 - so 2024 and 2028 leap, 2100 does not. Crossing a leap day between your two dates adds exactly one day. A range spanning 1 March 2023 to 1 March 2028 includes leap day 29 February 2024, so it is 1827 days, not 1826.
Start or end date included?
Most online tools count from midnight of the start date to midnight of the end date and report the difference - so 1 January to 2 January shows 1 day. Be careful with legal or billing contexts, where "1 January to 2 January inclusive" can mean 2 days. When in doubt, clarify whether both endpoints should count.
Why the Date Calculator is the safer route
Hand arithmetic is prone to off-by-one and leap-year slips, especially over years. The free Date Calculator returns the exact total days plus the same span in weeks and rough months, instantly. If you need to extend the maths to age, the Age Calculator uses the same calendar logic with years, months and days.