Skip to content
UnitFormula

The number of days between two dates is the end date minus the start date, counted in whole calendar days. Enter a start and an end date, and the calculator counts every day in between, correctly handling different month lengths and leap years. From 2026-01-01 to 2026-12-31 is 364 days; a full leap year like 2024 is 366 days.

Days Between Dates Calculator

Whole days from Jan 1, 2026 to Dec 31, 2026.

Days between364

Quick examples

How it's calculated

  1. Days = end date − start datedays=endstart\text{days} = \text{end} - \text{start}
    end
    = 20,818
    start
    = 20,454
    364
Days between364

How it works

To count the days between two dates, subtract the earlier from the later:

days = end date − start date

Internally each date is turned into a day number, and the difference is the count of days between them. This automatically accounts for the different lengths of months (28 to 31 days) and for leap years, so you never have to add them up by hand.

A year is a leap year — with 366 days instead of 365 — if it is evenly divisible by 4, except for centurial years, which must be divisible by 400. So 2000 was a leap year but 1900 was not. February gains a 29th day in a leap year, which the count includes when the range spans it.

The result is the number of nights between the two dates. If you want to include both the start and end date themselves (an inclusive count), add one.

Worked example

From 2026-01-01 to 2026-12-31 is 364 days — a common year has 365 days, and this range stops one day short of the next January 1. All of 2024 (2024-01-01 to 2025-01-01) is 366 days because 2024 is a leap year. One month, 2026-01-01 to 2026-02-01, is 31 days.

Frequently asked questions

How many days are between two dates?

Subtract the start date from the end date: days = end − start. The calculator converts each date to a day number and takes the difference, so month lengths and leap days are handled automatically. From 2026-01-01 to 2026-12-31 is 364 days.

Does the count include the start and end dates?

The result counts the days *between* the dates — effectively the number of nights — so the start date is not counted and the end date is. To count both endpoints inclusively (for example, the total number of days in a trip), add one to the result.

How are leap years handled?

Automatically. A leap year has 366 days (an extra February 29), and any range that spans a February 29 includes it. A year is a leap year if divisible by 4, except centurial years, which must be divisible by 400 — so 2000 was a leap year and 1900 was not.

Can the result be negative?

Yes. If the end date is earlier than the start date, the difference is negative, telling you how many days *before* the start the end date falls. Swap the dates to get a positive count.

How many days are in a year?

A common year has 365 days and a leap year has 366. Over long spans this averages about 365.2425 days per year under the Gregorian calendar, which is why the leap-year rule skips three leap days every 400 years.

How do I count business days instead?

This calculator counts every calendar day, including weekends and holidays. Counting only working days requires excluding weekends and a list of holidays, which vary by country and region — that is a separate calculation.