Days Since Calculator
Count how many days have passed since any historical date or personal milestone. Enter values for instant results with step-by-step formulas.
Calculator
Adjust values & calculateFormula
The difference in milliseconds between two JavaScript Date objects is divided by 86,400,000 (the number of milliseconds in a 24-hour day) to obtain the number of calendar days. Business days are computed by iterating through each day and excluding Saturdays and Sundays.
Last reviewed: December 2025
Worked Examples
Example 1: Days Since a Birthday
Example 2: Business Days in a Quarter
Background & Theory
The Days Since Calculator applies the following established principles and formulas. Date and time calculations underpin a vast range of applications from financial settlement to scheduling and age verification. The complexity arises because civil timekeeping uses irregular units: months have 28, 29, 30, or 31 days; years have 365 or 366 days; hours, minutes, and seconds use base-60 arithmetic; and time zones introduce offsets ranging from -12:00 to +14:00 relative to UTC. The Gregorian calendar's leap year rule is a compound condition: a year is a leap year if it is divisible by 4, except for century years, which must be divisible by 400. Thus 1900 was not a leap year but 2000 was. This rule keeps the calendar synchronized with the solar year to within about 26 seconds per year. For algorithmic date calculations, the Julian Day Number provides a continuous integer count of days since January 1, 4713 BCE, eliminating the irregularity of calendar months and making interval arithmetic straightforward. The Unix epoch, by contrast, counts seconds since 00:00:00 UTC on January 1, 1970, and is the basis of POSIX time used in most computing systems. ISO 8601 standardizes date and time representation as YYYY-MM-DD and combined datetime as YYYY-MM-DDTHH:MM:SSยฑHH:MM, ensuring unambiguous machine-readable interchange across locales that would otherwise differ in day/month/year ordering. Business day calculation requires excluding weekends and, optionally, a jurisdiction-specific list of public holidays. Duration calculations expressed in years, months, and days must account for the variable length of months, making them non-commutative: the interval from January 31 to February 28 is different from the interval from February 28 to March 31. Age calculation algorithms must handle the edge case of birthdays on February 29 and ensure that a person born on December 31 is not counted as one year older on January 1 of the following year until the clock passes midnight. Zeller's Congruence provides a closed-form formula to determine the day of the week for any Gregorian or Julian calendar date using only integer arithmetic.
History
The history behind the Days Since Calculator traces back through the following developments. The need to track time and predict astronomical events gave rise to calendrical systems independently across many civilizations. The Babylonians, around 2000 BCE, developed a lunisolar calendar with 12 months of alternating 29 and 30 days, inserting an intercalary month periodically to keep pace with the solar year. They also divided the day into 24 hours and the hour into 60 minutes, a sexagesimal convention that persists in every modern clock. The Egyptian civil calendar used 12 months of exactly 30 days plus five epagomenal days, totaling 365 days. Though simple for administrative purposes, it drifted against the solar year by one day every four years. Julius Caesar, advised by the Egyptian astronomer Sosigenes, reformed the Roman calendar in 45 BCE. The Julian calendar introduced a 365-day year with a leap day every four years, a system that served Europe for over sixteen centuries. By the 16th century, the accumulated error of the Julian calendar had shifted the spring equinox ten days from its ecclesiastically mandated date, disrupting the calculation of Easter. Pope Gregory XIII commissioned the calendar reform that bears his name, and the Gregorian calendar was introduced in Catholic countries in October 1582. The transition required skipping ten days: October 4 was followed by October 15. Protestant and Orthodox countries adopted the reform slowly; Britain and its colonies switched in 1752, Russia not until 1918, and Greece in 1923. The expansion of railways in the 1840s created an urgent practical problem: each city operated on its own local solar time, making train timetables impossible to coordinate. British railways adopted Greenwich Mean Time as a standard in 1847. The International Meridian Conference of 1884 in Washington formalized the prime meridian at Greenwich and established the global framework of 24 time zones. Daylight saving time was first adopted nationally during World War I to reduce coal consumption. The development of atomic clocks after World War II led to the definition of Coordinated Universal Time (UTC) in 1960, accurate to nanoseconds. The Y2K problem of 1999-2000 demonstrated that two-digit year storage in legacy systems could cause widespread failures, prompting a global remediation effort costing an estimated 300 to 600 billion dollars.
Frequently Asked Questions
Sources & References
Formula
Days = (End Date - Start Date) / 86,400,000 ms/day
The difference in milliseconds between two JavaScript Date objects is divided by 86,400,000 (the number of milliseconds in a 24-hour day) to obtain the number of calendar days. Business days are computed by iterating through each day and excluding Saturdays and Sundays.
Worked Examples
Example 1: Days Since a Birthday
Problem: How many days have passed since January 15, 1990, to March 21, 2026?
Solution: Start date: 1990-01-15\nEnd date: 2026-03-21\nDifference in ms: (2026-03-21) - (1990-01-15) = 1,141,516,800,000 ms\nTotal days = 1,141,516,800,000 / 86,400,000 = 13,214 days\nWeeks = 13,214 / 7 = 1,887 weeks and 5 days\nApprox years = 13,214 / 365.25 = 36.18 years
Result: 13,214 days | 1,887 weeks 5 days | ~36.18 years
Example 2: Business Days in a Quarter
Problem: How many business days are there from January 1, 2026 to March 31, 2026?
Solution: Total calendar days: 89\nWeekend days (Sat+Sun): 24\nBusiness days = 89 - 24 = 65\nWeeks = 89 / 7 = 12 weeks and 5 days\nMonths ~ 2.9
Result: 89 calendar days | 65 business days | ~12 weeks 5 days
Frequently Asked Questions
How does Days Since Calculator count the number of days between two dates?
Days Since Calculator computes the difference between two dates by converting both dates into milliseconds since January 1, 1970 (the Unix epoch), then subtracting the start date from the end date. The millisecond difference is divided by 86,400,000 (the number of milliseconds in one day) to get the total number of calendar days. It properly handles leap years because the underlying JavaScript Date object accounts for them automatically. You can also choose to include the end day in the count, which adds one extra day to the total, useful when you want to count both the start and end dates as full days.
What is the difference between calendar days and business days?
Calendar days include every single day in the range, whether it falls on a weekday or weekend. Business days, also called working days, only count Monday through Friday and exclude Saturdays and Sundays. For example, a span of 14 calendar days typically contains 10 business days and 4 weekend days. This distinction matters for legal deadlines, shipping estimates, project planning, and payroll calculations. Note that Days Since Calculator does not account for public holidays, which vary by country and region, so the business day count represents a standard working week without holiday adjustments.
How do I calculate the number of working days between two dates?
Count total calendar days, subtract weekends (roughly 2/7 of total days), then subtract any public holidays in the range. For accuracy, iterate through each day and check. Most spreadsheets have NETWORKDAYS functions that handle this automatically.
How do I get the most accurate result?
Enter values as precisely as possible using the correct units for each field. Check that you have selected the right unit (e.g. kilograms vs pounds, meters vs feet) before calculating. Rounding inputs early can reduce output precision.
What inputs do I need to use Days Since Calculator accurately?
Each field is labelled with the required unit (metric or imperial). Gather your source values before starting โ for example, a weight measurement in kilograms, a distance in metres, or a dollar amount โ and enter them exactly as measured. The formula section on this page lists every variable and explains what each represents.
Why might my result differ from another tool or reference?
Differences typically arise from rounding conventions, the specific version of a formula (for example, simple vs compound interest), or unit inconsistencies between inputs. Check that both tools are using the same formula variant and the same units. The References section links to the authoritative source behind the formula used here.
References
Reviewed by Abdullah, Technical Content Specialist ยท Editorial policy