Time calculators

Days Calculator

Updated Nov 10, 2026 By Infinity Calculator Formulas Sources
Rate
Days Between Two Dates
Leave both times at 00:00 to skip hours and minutes.
Include end date in the count?
Choosing "Yes" counts the end date itself, adding one day to the total.
Days of the week to count

Result

Summary
Total days
—
—

Day-of-Week Distribution Across the Span
Step-by-Step Solution

Introduction

The Days Calculator helps you count days between dates, add or subtract days from a date, and find out how many days are left until a future date. Just type in your dates and get an answer right away.

This free date calculator has three tools in one:

  • Days Between Two Dates – Count the days from a start date to an end date. You can also add a start and end time to get hours and minutes.
  • Add / Subtract Days – Pick a date, type a number of days, and see the new date. Use a negative number to go back in time.
  • Days Until a Date – See how many days are left until a birthday, due date, holiday, or deadline. It counts from today.

You can choose to count the end date, and you can pick which days of the week to count. That makes it easy to count only weekdays, only weekends, or only one day like every Monday.

Each answer also shows your total in weeks, months, and years, plus a chart of the days of the week and a step-by-step solution so you can see how the math works. People use this tool to plan trips, track work days, count down to big events, and check contract or school deadlines.

How to use our Days Calculator

Pick a tab, type in your dates, and the calculator shows the total days, weeks, months, and years between them, plus a step-by-step solution and a day-of-week chart.

Tab choice: Click "Days Between Two Dates" to count days from one date to another, "Add / Subtract Days" to find a new date, or "Days Until a Date" to count down from today.

Start Date: Type or pick the first date you want to count from. Tap the "Today" button to fill in today's date fast.

Start Time (optional): Add a clock time if you want hours and minutes counted too. Leave it at 00:00 to skip times.

End Date: Type or pick the last date. If it comes before the start date, the tool counts backward and says so, much like the Days Since Calculator.

End Time (optional): Add the clock time for the end date. Leave it at 00:00 if you only need whole days.

Include end date in the count: Choose "No" for a plain gap between dates. Choose "Yes" to count the last day too, which adds one day.

Days of the week to count: Keep "Include all days?" checked for every day. Uncheck it to pick only the days you want, like Monday through Friday for work days.

Starting Date (Add / Subtract tab): Pick the date you want to move forward or back from.

Number of Days: Type a whole number. A plus number adds days, and a minus number like −45 subtracts days.

Target Date (Days Until tab): Pick the future or past date you care about, such as a birthday, due date, or holiday. The tool counts from today.

Calculate and Clear: Press "Calculate" to see your answer, or "Clear / Reset" to start over with fresh dates.

What Are Days Between Dates?

Counting days between two dates means finding how many times midnight passes from one date to the other. For example, from March 1 to March 8 is 7 days. Date math like this is used for due dates, deadlines, contracts, trips, pregnancy weeks, work leave, and countdowns to birthdays or holidays.

Why Day Counting Can Be Tricky

Months do not all have the same length. Some have 28, 29, 30, or 31 days. Approximately every four years, February has 29 days instead of 28.1 The average Gregorian calendar year is 365.2425 days long, not exactly 365.2 Because of this, you cannot just multiply months by 30 and get the right answer. Counting the real calendar days is the only exact way.

Counting the End Date or Not

There are two normal ways to count:

  • Do not include the end date: you count the gap between the dates. Monday to Friday is 4 days.
  • Include the end date: you count both dates and everything in between. Monday to Friday is 5 days.

Schools, courts, and jobs sometimes pick different rules, so check which one your task needs. Including the end date always adds exactly one day.

Counting Only Certain Weekdays

Sometimes you only care about work days. If you count Monday through Friday and skip Saturday and Sunday, you get business days. A full week always has one of each weekday, so a 28-day span holds exactly 20 weekdays and 8 weekend days. Holidays are not weekends, so you may need to subtract those yourself.

Adding or Subtracting Days from a Date

Date shifting means moving forward or backward on the calendar. If a rule says "pay within 30 days," you start at today's date and count 30 days ahead, rolling into the next month when needed. Subtracting works the same way going back in time. This is how people find things like a 90-day return window or a 180-day deadline.

Ways to Describe the Same Span

UnitHow It Works
DaysThe exact count. Most reliable.
WeeksDays ÷ 7, plus leftover days.
MonthsCounted by calendar, so month lengths differ.
YearsDays ÷ 365.2425, which handles leap years.
Hours / MinutesDays × 24, then × 60. Useful when times are added.

Helpful Facts to Remember

  • A common year has 365 days; a leap year has 366.1
  • Years divisible by 4 are leap years, except century years not divisible by 400.2 So 2000 was a leap year, but 1900 was not.2 The next leap year after 2024 is 2028.
  • Every date repeats the same weekday after 7 days, so 364 days later is the same weekday.
  • 52 weeks equal 364 days, which is one day short of a full year. That is why your birthday moves ahead one weekday each year, or two after a leap day.

Formulas used

Days between two dates (from millisecond difference) 3
D = \frac{|t_{\text{end}} - t_{\text{start}}|\ \text{in seconds}}{86400\ \text{s/day}}
Adjustment when the end date is included
D_{\text{adj}} = D + \begin{cases} 1 & \text{include end date} \\ 0 & \text{otherwise}\end{cases}
Result date when adding or subtracting days 4
t_{\text{result}} = t_{\text{start}} \pm n \cdot 86400000\ \text{ms}, \qquad D = |n|
Counting only selected days of the week
D_{\text{counted}} = \sum_{w \in S} c_w, \qquad c_w = \left\lfloor \frac{N}{7} \right\rfloor + \begin{cases} 1 & \exists\, i < (N \bmod 7):\ (w_{\text{start}} + i) \bmod 7 = w \\ 0 & \text{otherwise}\end{cases}
Days converted to weeks plus remaining days
W = \left\lfloor \frac{D}{7} \right\rfloor, \qquad d_{\text{rem}} = D - 7W
Calendar span in years, months, days converted to total months
M_{\text{total}} = 12Y + M, \qquad \text{span} = (Y,\ M,\ d)
Approximate total years (mean Gregorian year) 2
Y_{\text{dec}} = \frac{D}{365.2425}
Total hours and minutes in the span
H = D \times 24, \qquad \text{Min} = H \times 60

Frequently asked questions

Which include-end-date setting should I use for a hotel stay or a vacation?

For hotel nights, pick No. Checking in on the 5th and out on the 9th is 4 nights.

For days off work or days you will be away, pick Yes. The 5th through the 9th is 5 days.

How do I subtract days from a date?

Go to the Add / Subtract Days tab and type a minus sign in front of the number. For example, type -45 to go back 45 days. A plain number like 45 moves forward.

Why is 3 months not always 90 days?

Month lengths change. March 1 to June 1 is 92 days, but December 1 to March 1 is 90 days (91 in a leap year). If a rule says 90 days, count 90 days, not 3 months.

How do I find out how many weeks are between two dates?

Enter both dates and look at the Total weeks row. It shows full weeks plus leftover days, such as 12 weeks and 6 days. The math is simply days divided by 7.


Sources

  1. What Is a Leap Year? NASA Space Place. Accessed September 29, 2026.
  2. Leap Years. U.S. Naval Observatory, Astronomical Applications Department. The Rule; Background. Accessed September 29, 2026.
  3. The Open Group Base Specifications Issue 8 (IEEE Std 1003.1-2024), Base Definitions, Chapter 4 General Concepts. The Open Group. 2024;§ 4.19 Seconds Since the Epoch. Accessed September 29, 2026.
  4. ECMAScript Language Specification (ECMA-262), 21 Numbers and Dates. Ecma International. § 21.4.1 Time Values and Time Range (MillisecondsPerDay). Accessed September 29, 2026.