Day Calculator
Calculate the number of days between any two dates. Find exact days, weeks, months, and years between dates for planning, deadlines, and events.
Day Calculator
Calculator
Adjust values & calculateEnter your values below. Every result is computed in your browser — no data is sent to any server.
Formula: Days = |End Date − Start Date| in days
Worked example — 365 days
Reviewed for accuracy by Daniel Agrici, Founder & Lead Developer · Editorial policy
Day Calculator Formula
Days = |End Date − Start Date| in days
Convert both dates to milliseconds since epoch, subtract, then divide by 86,400,000 ms/day. The result is rounded to the nearest whole day.
Day Calculator — Worked Examples
Example 1: Full year 2024 (leap year)
Problem:Start: January 1, 2024, End: December 31, 2024
Solution:2024 is a leap year (366 days). Dec 31 − Jan 1 = 365 days (exclusive of start date).
Result:365 days
Example 2: First half of 2024
Problem:Start: January 1, 2024, End: June 30, 2024
Solution:Jan: 30 remaining days, Feb: 29 (leap), Mar: 31, Apr: 30, May: 31, Jun: 30 = 181 days.
Result:181 days
Day Calculator — Frequently Asked Questions
What is the difference between calendar days and business days?
Calendar days count every day including weekends and public holidays. Business days (also called working days) count only Monday through Friday, excluding weekends and typically excluding public holidays. For deadlines, legal notices, and contract terms, always confirm which type of day is specified. Day Calculator counts calendar days.
How do you count days inclusively vs exclusively?
Exclusive counting (default) does not include either the start or end date — it counts only the days in between. Inclusive counting includes both endpoints. For example, from January 1 to January 3: exclusive = 2 days, inclusive = 3 days. Legal and financial calculations often specify which method to use, so check the context before applying the result.
Does Day Calculator account for leap years?
Yes. The calculation is based on the actual calendar difference between the two dates in milliseconds, so leap years with their extra day (February 29) are automatically accounted for. For example, January 1, 2024 to December 31, 2024 = 365 days because 2024 is a leap year with 366 days total.
How many days are in each month?
31 days: January, March, May, July, August, October, December. 30 days: April, June, September, November. 28 or 29 days: February (29 in leap years). A leap year occurs every 4 years (divisible by 4), except century years must be divisible by 400 — so 2000 was a leap year but 1900 was not.
How do I add or subtract days from a date?
To add days to a date, set the start date to your reference date and the end date to any future date — the calculator shows how many days separate them. To find a date that is N days in the future, work backwards: if today is the start date, adjust the end date until the result shows N days. Most spreadsheet apps (Excel, Google Sheets) also support date arithmetic with the =DATE() and =DAYS() functions.
Why does the result label the end date as after or before instead of returning a negative number?
The signed millisecond difference decides the direction, while the magnitude is reported as an absolute value, so the day count itself is never negative. Swapping the two fields returns the same number with the opposite label. That lets you enter the dates in whichever order you have them to hand and still read a sensible answer, which matters when one of the two is a deadline already in the past.
How are the years, months and weeks in the breakdown produced?
Each figure comes from dividing the total day count by an average length: 365.25 days for a year, 30.4375 for a month, which is 365.25 divided by twelve, and exactly 7 for a week. The components are then shown as remainders. Because every division is independent and uses an average rather than the real calendar, read the breakdown as an approximate magnitude and not as a strict anniversary-based decomposition.
What is the difference between a Julian year of 365.25 days and the Gregorian mean of 365.2425?
The Julian rule inserts a leap day every fourth year with no exceptions, giving an average of exactly 365.25 days. The Gregorian reform drops three of those leap days per 400 years, bringing the mean to 365.2425, much nearer the tropical year of about 365.2422 and leaving a residual error of roughly one day in 3,200 years. Astronomy still keeps the Julian year as a fixed unit, which is how the light-year is defined.
How do finance day-count conventions such as actual/360 change the answer?
They change the denominator rather than the elapsed days. Under actual/360 the real day count is divided by 360 instead of 365, so a full common year accrues 365/360 of the quoted rate: a loan priced at 6 percent actual/360 earns roughly 6.08 percent over 365 days. Actual/365 divides by the calendar year, while 30/360 discards the calendar entirely and assigns 30 days to every month.
Why does the day count always come out as a whole number?
Because both endpoints are anchored to the same instant of day. The date fields supply a date-only string in YYYY-MM-DD form, and ECMAScript parses that form as midnight UTC rather than local midnight, so the millisecond gap between them is always an exact multiple of 86,400,000. The rounding step in the formula is a safeguard that never has anything to correct here; it would matter if the endpoints carried clock times, or were parsed locally across a 23- or 25-hour daylight saving day.
Day Calculator — Background & Theory
History of the Day Calculator
References
Related Calculators
🧮Resume vs Job Match Score
Calculate resume vs job match score with interactive inputs and clear steps.
🧮Math Word Problem Solver
Calculate math word problem solver with interactive inputs and clear steps.
🧮Type Any Unit Conversion in Plain English
Calculate unit converter from natural language with interactive inputs and clear steps.
🧮Monte Carlo Risk Simulator
Calculate monte carlo risk simulator with interactive inputs and clear steps.
🧮Image Aspect Ratio Advisor
Calculate image aspect ratio advisor with interactive inputs and clear steps.