Skip to content
CalculatorAtlas

Days Between Dates Calculator

Tested

Count days between two dates.

Tested, not yet published. The formula for this calculator is implemented and passes its automated checks. This page stays non-indexable until it is reviewed and published.

Advanced options

Results

Enter your values and press Calculate. Results appear here.

  • • Result

Quick answer

The number of days between two dates is the later date minus the earlier one. Counting the end date as well adds one day: 1 January to 3 January is 2 days, or 3 days if both end dates count. Choose whether to count the end date, and the calculator also shows weeks and days and years, months and days.

The order of the dates does not matter; the calculator uses the earlier one as the start. Use exclusive counting for things like nights in a hotel and inclusive counting for things like the days of an event, where both the first and last day are part of it.

Related tools: Date Calculator: Add or subtract days, weeks, months or years from a date. Time Duration Calculator: Elapsed time between two clock times, including across midnight. Age Calculator: Calculate your exact age in years, months and days.

How to use the Days Between Dates Calculator

  1. Pick start date.
  2. Pick end date.
  3. Choose count end date?: No and Yes (inclusive).
  4. Press Calculate to see the result, and use Reset to start again.
Inputs of the Days Between Dates Calculator
InputWhat to enterAllowed values
Start dateA calendar date—
End dateA calendar date—
Count end date?Choose one: No; Yes (inclusive)Starts at No

Formula and method

Formula

days = |end − start| (+1 when inclusive)

Exact integer day arithmetic in UTC; no daylight-saving or time-zone effects.

Difference of day numbers; the order of the dates does not matter.

Worked examples

These examples are verified: each one is an automated test case that the live calculator must reproduce exactly.

Example 1

Inputs: Start date = 2025-01-01; End date = 2025-12-31; Count end date? = No.

Results of example 1
ResultValue
Days between364 days
Weeks and days52 weeks, 0 days
Years, months, days11 months, 30 days

Example 2

Inputs: Start date = 2025-01-01; End date = 2025-12-31; Count end date? = Yes (inclusive).

Results of example 2
ResultValue
Days between365 days
Weeks and days52 weeks, 1 day
Years, months, days11 months, 30 days

Example 3

Inputs: Start date = 2024-03-01; End date = 2024-02-01; Count end date? = No.

Results of example 3
ResultValue
Days between29 days
Weeks and days4 weeks, 1 day
Years, months, days1 month

The first line is the headline result (days between). Below it the days Between Dates Calculator lists weeks and days and years, months, days, which describe the same case from other angles. Exact integer day arithmetic in UTC; no daylight-saving or time-zone effects.

Which count should I use?

A hotel booking from 1 to 3 January is 2 nights (exclusive). A conference held on 1, 2 and 3 January lasts 3 days (inclusive). Using the wrong one is the usual cause of an off-by-one difference between two calculations of the same period.

1 to 3 January 2025, exclusive and inclusive

Every figure in this table comes from running this calculator, so it matches what the form returns.

1 to 3 January 2025, exclusive and inclusive
Count end date?Days betweenWeeks and days
No20 weeks, 2 days
Yes (inclusive)30 weeks, 3 days

What happens with invalid input

These messages are produced by the calculator itself, so you know what to fix.

  • Start date: entering "2025-02-30" shows "Start date must be a valid date." beside that field and no result.

Choosing between the Days Between Dates Calculator and similar calculators

Each row shows what a related calculator on this site asks for and what it returns, so you can pick the one that matches your question.

Choosing between the Days Between Dates Calculator and similar calculators
CalculatorYou enterIt returns
[Date Calculator](/date-calendar/date-calculator/)start date and operationResulting date
[Time Duration Calculator](/time/time-duration-calculator/)start time and end timeDuration
[Age Calculator](/time/age-calculator/)date of birthYour age
[Hours Calculator](/time/hours-calculator/)start time and end timeHours worked
[Weeks Between Dates Calculator](/date-calendar/weeks-between-dates-calculator/)start date and end dateWeeks and days

Background: dates and times

Date and time results depend on the conventions a tool uses: whether the end date counts, whether weekends and holidays are skipped, how months of different lengths are handled and whether time zones are applied. This page states its convention, and the worked examples show it.

Dates use the Gregorian calendar and calendar days unless the page says otherwise; check deadlines against the rule in your contract or regulation.

Assumptions and limitations

  • Identical dates give 0 (1 when inclusive)

If a required value is empty, not a number, or outside its allowed range, the form marks that field with a message and shows no result instead of a misleading number. The automated checks deliberately try invalid entries for start date to confirm this.

Frequently asked questions

Does the calculator include the end date?

Only if you choose to. By default it counts the days between the dates, not including the end date; turn on the end-date option to add one day.

What does the Days Between Dates Calculator calculate?

Number of days, weeks and months between two dates. It returns Days between, Weeks and days and Years, months, days.

What formula does the Days Between Dates Calculator use?

days = |end − start| (+1 when inclusive). Difference of day numbers; the order of the dates does not matter.

What do I need to enter in the days Between Dates Calculator?

You enter Start date, End date and Count end date?.

How is the result rounded or limited?

Exact integer day arithmetic in UTC; no daylight-saving or time-zone effects. Identical dates give 0 (1 when inclusive).

What does the “Count end date?” option change?

It sets how the days Between Dates is worked out. The choices are No and Yes (inclusive).

What is an example of a days Between Dates result?

With start date 2025-01-01, end date 2025-12-31 and count end date? No, the days between is 364 days.

Sources

  • ISO 8601-1: Date and time, representations for information interchange (calendar dates, ordinal dates and week dates)
  • Gregorian calendar reform, papal bull Inter gravissimas (1582): the leap-year rule used for all dates

Content last reviewed 2026-11-04. Formulas and worked examples are checked by automated tests against independently computed values.