Days Between Two Dates Calculator

Days Between Two Dates Calculator

Leading AI Skill PRO

Enter Calculation

Formula

Days=End Date−Start Date\text{Days} = \text{End Date} - \text{Start Date}
Usage stats

Advertisement

Results

Days Between Dates
365
Start Date 2024-01-01
End Date 2024-12-31
Days Between 365

January 2024

Sun Mon Tue Wed Thu Fri Sat
31 1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31 1 2 3
4 5 6 7 8 9 10

December 2024

Sun Mon Tue Wed Thu Fri Sat
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31 1 2 3 4
5 6 7 8 9 10 11

Report an error on this page

What This Calculator Does

The Days Between Two Dates Calculator tells you exactly how many calendar days separate one date from another. It is useful for counting down to a deadline, working out the length of a project, calculating an age in days, tracking a notice period, or simply settling a friendly argument about how long ago something happened. The result is a whole number of days that correctly accounts for different month lengths and leap years, so you never have to count on a calendar by hand.

Timeline showing counting days from a start date to an end date
The calculator counts the days along the span from the start date to the end date.

The Two Inputs

You only need to provide two pieces of information:

  • Start Date — the earlier (or first) date you want to measure from.
  • End Date — the later (or second) date you want to measure to.

Both dates are entered in standard year-month-day (ISO) format, for example 2024-01-15.

The Formula

The calculator parses both entries as calendar dates and computes the difference using a simple, exact rule:

Days Between = End Date − Start Date

Internally it counts the number of full days from the start date up to the end date. The count is exclusive of the start date and inclusive of the end date — in other words, it measures the gap, not the number of dates touched. If the end date is earlier than the start date, the result is negative, which tells you the end date comes before the start date.

Worked Example

Suppose you enter:

  • Start Date: 2024-01-01
  • End Date: 2024-12-31

The calculator returns 365 days. Because 2024 is a leap year, it includes the extra day on 29 February — counting from 1 January up to 31 December gives 365 days of gap (1 January to 1 January the following year would be 366). This automatic handling of leap years is exactly why a calculator beats manual counting.

Advertisement

Converting Days Into Weeks, Months, and Years

Once you know the number of days between two dates, you can convert that figure into approximate weeks, months, and years. Weeks are exact (1 week = 7 days), but months and years vary in length, so those conversions are approximations. The values below use an average month of about 30.44 days and an average year of 365.25 days (which accounts for leap years).

Days Weeks Months (approx.) Years (approx.)
7 1 0.23 0.02
30 4.29 0.99 0.08
90 12.86 2.96 0.25
180 25.71 5.91 0.49
365 52.14 11.99 1.00
730 104.29 23.98 2.00

Conversion formulas used: \(\text{Weeks} = \dfrac{\text{Days}}{7}\), \(\text{Months} \approx \dfrac{\text{Days}}{30.44}\), and \(\text{Years} \approx \dfrac{\text{Days}}{365.25}\). Because calendar months range from 28 to 31 days and a year can be 365 or 366 days, treat the month and year columns as estimates rather than exact counts.

Diagram converting a total number of days into weeks, months and years
A total day count can be broken down into weeks, months, and years.

Common Date Span Examples

The number of days between two dates is calculated as \(\text{Days} = \text{End Date} - \text{Start Date}\). This counts the gap between the two dates and does not include the start date itself. If you want to count both the start and end dates (an inclusive count, common for booking nights or event durations), add 1 to the result.

Start Date End Date Days (exclusive) Notes
Jan 1, 2023 Dec 31, 2023 364 Same non-leap year; add 1 (365) to count both endpoints.
Jan 1, 2024 Dec 31, 2024 365 2024 is a leap year, so the span includes Feb 29.
Jan 1, 2023 Jan 1, 2024 365 Exactly one calendar year (non-leap).
Jan 1, 2024 Jan 1, 2025 366 One calendar year spanning the leap day Feb 29, 2024.
Jan 15, 2023 Feb 15, 2023 31 One month apart; length depends on the month (January has 31 days).
Feb 15, 2023 Mar 15, 2023 28 One month apart; February 2023 has 28 days.
Mar 10, 2024 Mar 10, 2024 0 Same date returns zero days difference.

As shown, identical-looking spans (such as "one month" or "one year") can yield different day counts depending on which months are crossed and whether a leap year is involved. Always confirm whether you need an inclusive or exclusive count for your purpose.

How to Count Days Between Two Dates by Hand

The calculator returns the plain subtraction \(\text{Days} = \text{End Date} - \text{Start Date}\), but you can reproduce the same figure with pencil and paper. The method below assumes the Gregorian calendar, the civil calendar used in most of the world today; historical dates before its local adoption (1582 in Catholic Europe, 1752 in Britain and its colonies, later elsewhere) need special handling.

  1. Put the earlier date first. Decide which date is the start and which is the end. If you enter them the other way round, the result is simply negative — the magnitude is the same.
  2. Count the days remaining in the start month: \(\text{days in start month} - \text{start day}\). This deliberately excludes the start date itself.
  3. Add the full length of every whole month in between, using 31 / 30 / 28 (or 29) as appropriate for each calendar month.
  4. Add the day-of-month of the end date.
  5. Check for 29 February inside the span. A year is a leap year if it is divisible by 4, except that century years must also be divisible by 400. If a 29 February falls between your two dates, that February contributes 29 days, not 28.
  6. Read the result as an exclusive-start, inclusive-end gap — the number of nights or 24-hour periods from start to end. If instead you need the number of calendar dates touched (an inclusive count, e.g. billable days or days of a hotel stay counted by date), add 1.

Worked example: 18 November 2023 → 5 March 2024

  1. Earlier date first: start 2023-11-18, end 2024-03-05.
  2. Days left in November: \(30 - 18 = 12\).
  3. Whole months in between — December 2023, January 2024, February 2024: \(31 + 31 + 29 = 91\).
  4. Day-of-month of the end date: \(5\).
  5. Leap check: 2024 ÷ 4 = 506 exactly and 2024 is not a century year, so 2024 is a leap year and February 2024 has 29 days — already used above.
  6. Total: $$12 + 91 + 5 = 108\ \text{days}$$

So the span is 108 days. Counting inclusively — every date from 18 November through 5 March — gives \(108 + 1 = 109\) dates.

Quick check with day-of-year numbers

When both dates are in the same year, subtract their day-of-year numbers from the reference table below. For 1 January 2024 to 31 December 2024: \(366 - 1 = 365\), so the span is 365 days, even though 2024 itself is 366 days long — because 1 January is the start boundary and is not counted.

Advertisement

Key Date Terms Explained

Start date
The earlier boundary of the span. In a standard day count it is excluded: the count begins with the day after it.
End date
The later boundary. It is included in the count — day 1 of the span is the first day after the start date, and the final day counted is the end date.
Calendar day
One dated day on the civil calendar, from midnight to midnight in the local time zone. Day counting ignores clock times, so daylight-saving shifts (a 23- or 25-hour day) do not change the count.
Exclusive count vs inclusive count
The exclusive (or "difference") count is \(\text{end} - \text{start}\) — the number of nights between the dates. The inclusive count is the number of distinct dates from start to end and equals \(\text{end} - \text{start} + 1\). They always differ by exactly 1 because the inclusive version also counts the start date itself. Hotel nights and interest accrual usually use the exclusive count; event days, leave days and rental days are often counted inclusively.
Leap year
A year containing 29 February. Gregorian rule: divisible by 4 is a leap year, except years divisible by 100, unless also divisible by 400. So 1900 was not a leap year, but 2000 was.
Common year vs leap year
A common year has 365 days; a leap year has 366. Over one 400-year Gregorian cycle there are 97 leap years and 146,097 days.
ISO 8601 date format
The international standard written form YYYY-MM-DD (e.g. 2026-08-04). It sorts correctly as text and removes the ambiguity between the US MM/DD/YYYY and the common European DD/MM/YYYY orders.
Average month and average Julian year
A Gregorian year averages 365.2425 days; the older Julian year of exactly 365.25 days is still widely used as a rounding convention (and gives the average month \(365.25 \div 12 = 30.4375 \approx 30.44\) days). These averages are for estimating only — never use them to count a specific span.
Negative result
A negative number of days means the end date falls before the start date. The absolute value is still the correct size of the gap; swap the two dates to make it positive.
Business / working days
Calendar days minus weekends and public holidays. Business-day counts are jurisdiction-specific because public holidays differ by country, and in some regions the weekend is not Saturday–Sunday. This calculator counts calendar days, so it does not exclude weekends or holidays.

Days in Each Month and Year Reference Table

Cumulative totals give the day-of-year number of the last day of each month, so two dates in the same year can be differenced directly.

Month lengths and cumulative day-of-year totals (Gregorian calendar)
Month Days (common year) Days (leap year) Cumulative at month end (common) Cumulative at month end (leap)
January 31 31 31 31
February 28 29 59 60
March 31 31 90 91
April 30 30 120 121
May 31 31 151 152
June 30 30 181 182
July 31 31 212 213
August 31 31 243 244
September 30 30 273 274
October 31 31 304 305
November 30 30 334 335
December 31 31 365 366
Year and quarter lengths
Period Length in days Note
Common year 365 No 29 February
Leap year 366 Includes 29 February
Average year (Julian convention) 365.25 Estimation only; the Gregorian mean is 365.2425
Average month 30.44 \(365.25 \div 12 = 30.4375\)
Q1 (Jan–Mar) 90 (91 in a leap year) 31 + 28/29 + 31
Q2 (Apr–Jun) 91 30 + 31 + 30
Q3 (Jul–Sep) 92 31 + 31 + 30
Q4 (Oct–Dec) 92 31 + 30 + 31

Quarters here are calendar quarters starting in January; organisations using a fiscal year that begins in another month will have different quarter boundaries and lengths.

Leap years to remember: 2016, 2020, 2024, 2028, 2032 and 2036 are all leap years. Watch the century exception: 1900 was not a leap year (divisible by 100 but not 400), while 2000 was (divisible by 400). The next skipped century year is 2100 — a common source of off-by-one errors in long-range date arithmetic and in older spreadsheet date systems.

Frequently Asked Questions

Does the result include both the start and end dates?
No. It counts the number of days between them, so it includes the end date but not the start date. If you want to count both endpoints (for example, total days you stayed somewhere), add 1 to the result.

What happens if I swap the dates?
If your end date is earlier than your start date, you will get a negative number. The size of the number is still correct — just ignore the minus sign, or swap the dates to get a positive value.

Are leap years and varying month lengths handled?
Yes. The calculation works on real calendar dates, so February 29, 30-day months and 31-day months are all counted accurately without any extra effort from you.

Last updated:

Most popular in Time and Date

View all Time and Date calculators