Dates Passed Calculator: How to Count Days
The calculator for this page is switched off while it is checked. The formula is below, and the worked example in the article shows how to use it by hand.
This calculator works out how many days have passed since a date you choose, up to today. You enter a start date and it returns the total number of days elapsed, plus the equivalent in weeks and months. It is a simple, free tool for anyone tracking a deadline, an anniversary, or a personal milestone.
Formula
The calculator uses the current date (today) as the endpoint and subtracts your chosen start date. The core formula is:
Days passed = floor((Today − Start Date) / 86,400,000)
Where:
- Today – the current date at the moment you click calculate (in milliseconds since 1970-01-01).
- Start Date – the date you enter, also converted to milliseconds.
- 86,400,000 – the number of milliseconds in one day (24 × 60 × 60 × 1000).
- floor() – rounds down to the nearest whole day, so partial days count as zero.
Because the calculator uses the exact current date, the result updates every day. It does not count the start date itself; a difference of 0 days means the start date is today.
Worked Example
Suppose today is 2025-06-15 and you enter 2024-01-01 as the start date.
- Convert both dates to milliseconds. The difference is about 531 days (2024 was a leap year, so there are 366 days in 2024, plus 165 days into 2025).
- Divide by 86,400,000: 531 / 1 = 531 days.
- Weeks: 531 ÷ 7 = 75.857, rounded to 75.9 weeks.
- Months: 531 ÷ 30.4375 = 17.45, rounded to 17.5 months.
The calculator shows 531 days, 75.9 weeks, and 17.5 months for those defaults. If you run it on a different day, the days number will be slightly higher.
How the Date Difference Is Calculated
Most programming languages store dates as the number of milliseconds since January 1, 1970 (Unix epoch). The calculator subtracts the start date from the current date, converts the difference to whole days, and rounds down. This method is exact for dates after 1970 and works for any date from 1900 onward.
One subtlety: the calculator uses your local time zone. If you are in a time zone far from UTC, the result might differ by one day from a UTC-based calculation, but for most practical purposes the difference is negligible.
When to Use This Calculator
People often use a “days passed� calculator for:
- Tracking how long since a major life event (birth, wedding, moving, starting a job).
- Counting days since a deadline or project kickoff.
- Checking how many days have passed in a challenge or habit streak.
- Verifying a date difference for legal or personal records.
The result is a whole number of days, which is useful for most everyday purposes. If you need to include the start date as day 1, add 1 to the result.
Common Mistakes and Misconceptions
A frequent error is confusing “days passed� with “days including the start date.� For example, if you start a 30-day trial on March 1, the trial ends on March 30, not March 31. This calculator counts the difference, so March 1 to March 30 is 29 days passed, but the trial includes day 1, so it lasts 30 days.
Another mistake is mixing up time zones. If you enter a date in UTC but your local time is behind, the calculator might show one day less than expected. Always use your local date.
Also, remember that the calculator uses the current date at the moment you press calculate. If you leave the page open and come back later, the result will still be from the earlier calculation unless you refresh.
Limitations of the Formula
The formula assumes a constant 24-hour day, which is true for most civil purposes. It does not account for daylight saving time changes, which can make a day 23 or 25 hours long in some regions. For most date differences, this effect is minor and only matters for very long periods or precise scientific use.
The month conversion uses an average month length of 30.4375 days (365.25 ÷ 12). This is a simplification; actual months vary from 28 to 31 days. If you need exact calendar months (e.g., March 15 to April 15), this calculator gives an approximate value.
For dates before 1900, the calculator may not work reliably because many systems do not support dates before that. The default minimum is 1900-01-01, which covers most practical uses.
Alternatives and Related Calculations
If you need to know the date that is a certain number of days from today, use a “date adder� calculator instead. If you need the difference between two arbitrary dates (not including today), use a “date difference� calculator. This tool is specifically for the elapsed time from a past date to now.
For more precise time tracking, you can also compute hours or minutes passed by multiplying the days by 24 or 1440, but this calculator focuses on days.
Frequently Asked Questions
Does the calculator include the start date?
No. It counts the number of full days between the start date and today. If you want to include the start date as day 1, add 1 to the result.
What if I enter a future date?
The calculator will show a negative number, because the difference is negative. You can use that to see how many days are left until that date, but the label will say “days passed.�
Why does the number of days change every day?
Because “today� is updated each time you click calculate. The calculator does not store a fixed date; it uses the current date from your device.
Can I use this for dates before 1970?
Yes, the calculator supports dates from 1900 onward. It converts them to milliseconds correctly for that range.
Is the month value exact?
No. It uses an average month length of 30.4375 days, so it is approximate. For exact calendar months, count the months manually or use a calendar.
Why is the result one day off from what I expected?
This is usually due to time zone differences or because you are counting the start date as day 1. Check your local time zone and whether you need to add 1.
Related
Formula used
in d | Start date | - | 2024-01-01 | 1900-01-01 out days | Days passed | days | floor((today - d) / 86400000) | 0 out weeks | Weeks passed | weeks | floor(days / 7) | 1 out months | Approx. months | months | round(days / 30.4375, 1) | 1
Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.