Date Calculator

Two dates and a question that sounds trivial until someone else answers it differently. A payroll period, a 90-day notice, a rental that runs to the end of the month — the number depends on whether the first day counts, and nobody says which they meant.

Difference mode only
Negative to go backward. Add mode only.
One per line, date first. These are removed on top of the boxes above.
Date Calculator — Days Between Two Dates, and What Date Falls N Days OutBuildFigure

The first day is the whole argument

Ask three people how many days there are from the first of the month to the tenth and you get nine, ten, and "depends". All three are defensible. Subtracting the two dates gives nine. Counting the squares you would cross off on a calendar gives ten. The difference is whether the day you start on is one of the days being counted.

This page subtracts by default: the start date is not counted, the end date is. That matches how notice periods and "within 30 days" clauses are normally read, and it is why the first of January to the thirty-first of December in the same year comes out as 364 rather than 365. Tick the box to count both ends and it becomes 365 — the right number when you are counting nights booked, shifts worked, or days a permit is valid.

Whichever you pick, pick it once. Most date disputes are not arithmetic errors; they are two people using different conventions and neither saying so.

Adding a month to the thirty-first

There is no thirty-first of February, so "one month after January 31" has to mean something chosen rather than something computed. Left alone, JavaScript rolls the overflow forward and hands back March 3rd. That is almost never what anyone wanted.

This page clamps instead. Adding a month moves to the same day number in the target month, or to the last day of that month if the day number does not exist there. January 31 plus one month is February 28, or February 29 in a leap year. The same rule applies to years: February 29, 2028 plus one year is February 28, 2029.

Clamping is the common reading in contracts and billing, but it is not universal, and it is not reversible — February 28 minus one month is January 28, not the January 31 you started from. If a payment schedule matters, work every date from the original start date rather than chaining one month onto the last result.

Working days, and whose calendar they follow

Sundays always come out. Saturdays come out unless you switch them back on, which is worth doing for trades and shops that run six days. US federal holidays are optional and are computed from the rules rather than looked up in a table, so they work for any year: the fixed dates (January 1, June 19, July 4, November 11, December 25) plus the floating Mondays and the fourth Thursday in November.

Fixed-date holidays get the federal observance shift — a Saturday holiday is observed the Friday before, a Sunday holiday the Monday after. That is what closes the office, so that is the day removed.

The federal list is a starting point, not your calendar. States add their own days, banks and courts keep different schedules, and plenty of employers trade a federal day for a floating one. The box for your own non-working days is there for exactly that: paste in the shutdown week, the local holiday, the day the office closes early. Those come out on top of everything else.

What the calendar breakdown is doing

The years-months-days line is not the day count divided down. It walks the calendar: count whole years, then whole months, then the leftover days. That is why two spans of identical length can produce different breakdowns depending on which months they cross. A span running through February looks shorter in months than the same number of days running through July.

The decimal months line is the other approach — days divided by 30.4375, the average month length across a four-year cycle. Use it for rough planning and rate work; use the breakdown when a human is going to read it.

Related pages

For a countdown to a single date with checkpoint dates, use the D-Day Calculator. To spread one deadline's stages backward across working days, the Deadline Backward Schedule does that. To expand a range into every date at a fixed interval, see the Date List Generator.

Questions people ask

Why does January 1 to December 31 come out as 364 days?

Because the start date is not counted by default. There are 365 days in 2026 and you are standing on one of them, so 364 remain. Tick "count both the start and the end date" and it reads 365.

Does it handle February 29?

Yes. Leap years are real days in the count, and a date like 02/29/2028 is accepted while 02/29/2027 is rejected rather than quietly turned into March 1. Any span crossing a leap day is one day longer than the same span in a common year.

What does "working days" do if the start date is itself a holiday?

Nothing, in difference mode — the count begins the day after the start date, so the start date is never included either way. If you tick the both-ends box, the start date is added back only when it is a working day.

Are daylight saving shifts accounted for?

The day counts are unaffected because every date is built at local midnight and compared as a calendar date, not as an elapsed number of hours. The hours line is days times 24, which is one hour off across a spring-forward or fall-back boundary if you are treating it as elapsed time.

Related