Date calculator

Days between two dates, or a date a number of days out

—

How this was counted
Days— Calendar days— Weekend days— Holidays removed— Convention—

Date arithmetic is tested on every build against hand-worked cases, including month ends, leap days and two-digit years. How it is checked

Pick two dates to count the days between them, or switch to adding or subtracting days from a date. Both readings of "days between" are offered, and the answer always says which one it used. Every figure is computed here in your browser.

Which reading of "days between" you want

Two people asking how many days lie between the 1st and the 8th can want different answers. Seven is the gap: the number of nights, and the number you add to one date to reach the other. Eight is the count of dates involved, which is what "how long is my trip" means when both ends are days you are somewhere.

The calculator gives the gap unless you tick "Count both endpoints", and the sentence under the answer names the reading it used. Check that setting when you compare the result with another date count.

Why the arithmetic runs in whole days

A date here is a year, a month and a day, with no time of day attached. Every calculation converts to midnight UTC, does integer arithmetic on whole days, and converts back. That matters twice a year: local-time arithmetic across a daylight-saving change gains or loses an hour, and an hour is enough to land an answer on the wrong date. Local time is used only for the word "today", because that depends on where you are. The rules are written out in full, with the statute they come from.

Counting working days

Most shipping windows and legal deadlines count working days, with weekends and public holidays taken out. For those, the business days calculator takes out weekends and US federal holidays, and you can see every day it removed.

Every calculator on this site

One line each. Each one runs in your browser.

Questions

Is it seven days or eight days between the 1st and the 8th?
Both, for different questions. The gap between the 1st and the 8th is seven, the number of nights. Counting both dates gives eight, which is the answer for how long a trip or a stay lasts. This page gives the gap by default, offers the other with the “count both endpoints” box, and the line under the answer always names which one it used.
Does it handle leap years and the 29th of February?
Yes. It uses the full rule: a year is a leap year when it divides by four, except century years, which must divide by four hundred. So 2024 and 2028 have a 29 February, 2100 does not, and 2000 did. A 29 February in a year that has none is refused, and the page does not move it to 1 March.
Why does the answer not change when the clocks go forward?
Because the arithmetic never uses a clock. Dates are counted as whole days in UTC and converted back at the end. A daylight-saving change can make a local-time interval an hour shorter or longer, and whole-day UTC arithmetic avoids that shift.
Does anything I type here get uploaded?
No, and not as a matter of policy. This page is a static file and a script your browser downloads once; there is no server behind it to receive anything. The dates you enter are read by the script in your own browser and the answer is written back into the same page. Nothing is sent, nothing is stored, and no analytics or third-party script runs here.
Can it add months or years?
Yes, on the days-from-today page, which takes days, weeks, months or years. Adding a month can have more than one right answer: one month after 31 January 2026 is 28 February 2026, 3 March 2026 or an error, depending on the convention, and each of those is used in practice. So that page asks you which one to use. Clamp gives 28 February 2026, overflow gives 3 March 2026, and strict refuses and says the 31st does not occur in the target month. The answer names the convention you picked, so you can check the date.