ThisCalculator

Date and time

Date Calculator: How Many Days Between Dates

Updated · Standard formula, shown below

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.

Date Calculator: How Many Days Between Dates

A date calculator works out the exact number of days between two calendar dates, or the date you land on after adding or subtracting a set number of days, weeks, or months. You enter a start date and either an end date or a duration, and the calculator returns the day count, often broken into weeks, months, and years for context.

Formula

The core formula is simple subtraction: Days = End Date − Start Date. Each date is first converted to a serial number (the number of days since a fixed reference point, like January 1, 1900, in many spreadsheet systems). The difference between the two serial numbers is the number of days between them, exclusive of the start date and inclusive of the end date by default.

For adding or subtracting, the formula is Result Date = Start Date ± N days. Months and years are trickier because they have variable lengths, so most calculators convert months to an average of 30.44 days or use calendar-aware logic that adjusts for the actual month lengths.

Worked Example

Using the defaults from the calculator above: start date January 1, 2024, end date December 31, 2024.

  1. Convert both dates to serial numbers. January 1, 2024 is day 1 of that year; December 31, 2024 is day 366 (2024 is a leap year).
  2. Subtract: 366 − 1 = 365 days.
  3. Weeks: 365 ÷ 7 = 52.1 weeks.
  4. Workdays (Mon–Fri): 365 total days minus 104 weekend days (52 Saturdays + 52 Sundays) = 261 weekdays.

The calculator shows 365 days, 52.1 weeks, and 261 weekdays.

When to Use a Date Calculator

People reach for a date calculator in dozens of everyday situations:

  • Project planning: How many days until a deadline or launch date.
  • Billing and contracts: Counting days between invoice dates or service periods.
  • Travel: Length of a trip in days, or the exact return date after booking a set number of nights.
  • Fitness and habits: Tracking streaks or days since a milestone.
  • Legal and administrative: Counting days for notice periods, warranties, or court deadlines (always confirm with local rules).
  • Age calculations: Days lived between birth date and today.

The result is only as good as the dates you enter—use the correct format (usually YYYY-MM-DD) and decide whether the start day counts or not.

How to Read the Result

The headline number is the total days between the two dates. If you want “days from today,� set the start date as today and the end date as your target. If you want “days until a deadline,� the same applies.

Pay attention to inclusivity: some calculators count both endpoints, others count only the difference. The formula above gives the difference (exclusive of start, inclusive of end), which matches how most people think of “between.� For example, from Monday to Friday is 4 days by this method, not 5.

Weekday counts matter for business contexts. The workday calculation above assumes Monday–Friday, but if your schedule includes Saturdays or excludes holidays, you need a more advanced tool that accepts a holiday list.

Common Mistakes and Unit Mix-Ups

The most frequent error is mixing date formats. Entering 03/04/2025 could mean March 4 or April 3 depending on your region. Always use unambiguous YYYY-MM-DD when possible.

Another mistake is forgetting leap years. 2024 had 366 days, not 365. A simple “multiply years by 365� shortcut fails across a leap year boundary. The calculator handles this automatically because it works with serial numbers.

Time-of-day issues also cause off-by-one errors. If you enter dates with times (e.g., 2025-01-01 23:59 vs 2025-01-02 00:01), the difference is 2 minutes, not 1 day. Most date calculators ignore time and use midnight as the default, but check if your input includes hours.

Finally, don’t confuse “days between� with “business days.� A 10-day period might contain only 7 workdays. If your context is payroll or delivery, use a business-day calculator that excludes weekends and holidays.

Limits of the Simple Formula

The basic subtraction formula works perfectly for dates after 1900 and before 2100 in most systems, but it has limitations:

  • Historical dates: Calendar reforms (like the switch from Julian to Gregorian) create gaps that simple serial numbers don’t handle.
  • Time zones: A date is a date, but if you cross time zones, “todayâ€� can differ by a day. The calculator assumes local time.
  • Month and year arithmetic: Adding “1 monthâ€� to January 31 gives February 28 (or 29 in a leap year), not February 31. Some calculators round up to March 3; others clamp to the last day of the month. Know which behavior you need.
  • Holidays: No generic calculator knows your local public holidays. You must supply them for accurate business-day counts.

For most practical purposes—scheduling, tracking, billing—the simple formula is accurate to the day. For legal or financial calculations where a single day matters, verify with official sources or a specialized tool.

Alternatives and Related Calculators

If you need more than a day count, several related tools exist:

  • Business day calculator: Counts only weekdays, optionally excluding a list of holidays.
  • Age calculator: Gives years, months, and days between a birth date and today.
  • Date add/subtract calculator: Lets you add or subtract a specific number of days, weeks, months, or years to a date.
  • Time duration calculator: Handles hours, minutes, and seconds between two timestamps.
  • Week number calculator: Tells you which ISO week a date falls in.

Spreadsheet software (Excel, Google Sheets) has built-in functions like DATEDIF and DAYS that do the same math. Online date calculators are simply a more accessible wrapper around those formulas.

Frequently Asked Questions

How many days are between two dates?

Enter the start and end dates into the calculator above. The result is the number of 24-hour periods between them, counting the end date but not the start date. For example, January 1 to January 2 is 1 day, not 2.

Does the calculator count the start day?

No, by default it counts the difference—so the start day is not included. If you need to count both endpoints (e.g., “from Monday to Friday inclusive�), add 1 to the result.

How do I calculate days from today?

Set the start date to today’s date and the end date to your target date. The calculator will show the number of days from today (exclusive of today) to that target date.

What is the difference between calendar days and business days?

Calendar days include every day of the week. Business days are typically Monday through Friday, excluding weekends and public holidays. For example, a 5-calendar-day period might contain only 3 business days if it includes a weekend.

Why does my date calculation seem off by one day?

This usually happens because of inclusivity. If you count both the start and end dates, you get one more than the difference. Also check for time-of-day inputs—if you included times, the difference is measured in hours and minutes, not whole days.

Can I add months or years with this calculator?

This specific tool only counts days between two dates. For adding or subtracting months or years, use a dedicated date add/subtract calculator, because month lengths vary and the result depends on how the calculator handles end-of-month dates.

Related

Formula used
in start | Start date | - | 2024-01-01 | 0
in end | End date | - | 2024-12-31 | 0
out days | Days between | days | end - start | 0
out weeks | Weeks (approx) | weeks | (end - start) / 7 | 1
out workdays | Weekdays (Mon-Fri) | days | (end - start) - 2 * floor((end - start + 1) / 7) | 0

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.