What this calculator does
The Days Since and Until Calculator tells you exactly how many days separate a target date from a reference date. If the target date is in the future you get a positive "days until" count; if it is in the past you get a negative "days since" count. It works for any pair of dates — birthdays, deadlines, anniversaries, contract dates, project milestones, or historical events. The tool is calendar-based and universal, so it applies anywhere in the world with no country-specific rules.
How to use it
Enter the target date (the date you are counting toward or from) using the year, month, and day fields. Then enter the reference date — by default this is today, but you can set it to any date to compare two arbitrary dates. The calculator returns the absolute number of days, a signed difference (negative for the past, positive for the future), and the equivalent number of weeks.
The formula explained
Each date is converted to a midnight timestamp in milliseconds. The difference between the two timestamps is divided by 86,400,000 (the number of milliseconds in one 24-hour day) and floored to a whole number:
$$\Delta = \left\lfloor \frac{\text{Target Date} - \text{Reference Date}}{86400000\ \text{ms}} \right\rfloor$$Because both dates are pinned to midnight, the result is the clean count of whole calendar days between them.
Worked example
Reference date: 1 January 2025. Target date: 31 January 2025. The difference is 30 days in the future, equal to about 4.29 weeks. If you swapped the dates — reference 31 January, target 1 January — the signed result would be −30 days (in the past), while the absolute count stays at 30 days.
$$\text{Weeks} = \frac{\left| \Delta \right|}{7} = \frac{30}{7} \approx 4.29$$FAQ
Does it count today? The difference is exclusive of the start date: from today to tomorrow is 1 day. Same-date inputs return 0.
Does it handle leap years? Yes. The calendar engine accounts for February 29 automatically.
Can the reference date be in the future? Absolutely — you can compare any two dates in either direction; the sign tells you which way.