Skip to content
TToolnest

Date & Time · Guide

How to Count the Days Between Two Dates (Correctly)

Counting days sounds trivial until leap years, inclusive-vs-exclusive counting, and "how many weeks until" trip you up. The rules that make date math come out right every time.

Updated 2026-07-13

Use the toolDate Duration CalculatorOpen

“How many days until the launch?” You subtract, you get a number, and you’re probably off by one — or by a leap day. Counting days is deceptively fiddly. Here are the few rules that make it reliable.

Short answer: The two things that trip everyone up are whether you count both end dates and leap years. Decide if you want the gap (start-to-end) or an inclusive span (both days counted), then let the Date & Duration Calculator handle the calendar so leap years don’t bite you.

The off-by-one problem

This is the mistake behind most date-math errors. Ask what you’re really counting:

  • A duration / gap. “Days until the deadline.” From the 1st to the 4th is 3 days — you count the spaces between, not the dates themselves.
  • An inclusive span. “The sale runs the 1st through the 4th — how many days is that?” That’s 4 days, because both the first and last day count.

Same two dates, answers that differ by one. Neither is “correct” in the abstract — it depends on your question. Pin that down before you subtract and most date errors disappear.

Leap years quietly break hand-counting

Every four years February gains a 29th day (with the century exceptions: 2000 was a leap year, 1900 wasn’t, because years divisible by 100 must also be divisible by 400). Any span crossing a February 29th is a day longer than “years × 365” suggests, and across several years the extra days pile up.

This is the real reason to stop counting long spans by hand: the calendar has rules that are easy to forget and tedious to apply. The Date & Duration Calculator applies them for you, so a span from this March to next March comes out as 365 or 366 correctly, without you having to remember which years qualify.

“How many weeks” and “what date is X days from now”

Once you have the day count, the useful follow-ups are easy:

  • Weeks: divide days by 7. 100 days is about 14 weeks and 2 days — handy for pregnancy, project sprints, or savings goals.
  • A future date: “90 days from today” for a return policy or a notice period. Rather than counting on your fingers past the end of the month, add the days on a calculator that rolls over month lengths correctly.

Where date math shows up

The same counting rules underpin a surprising amount of everyday life:

  • Deadlines and notice periods — contracts often say “within 30 days,” and whether day one is today or tomorrow can matter legally.
  • Age and anniversaries — figuring an exact age is the same problem with a fixed endpoint; the Age Calculator handles that specific case, leap days included.
  • Tracking effort over time — if you’re counting working days rather than calendar days, pair the date math with the Time Tracker to see where the hours actually went.

The habit that keeps you right

Two questions, every time: “Gap or inclusive?” and “Does this span cross a February 29th?” Answer those and the arithmetic is trivial — or better, hand both dates to the Date & Duration Calculator and let it count. Curious how the same logic gets stretched and abused elsewhere? See dog years in human years, where the “just multiply” shortcut famously falls apart.

Frequently asked questions

Do I count both the start and end date?+

That is the single biggest source of errors, and the answer depends on what you are counting. For a duration — "how many days until the deadline" — you count the gap, so from the 1st to the 4th is 3 days. For an inclusive span — "how many days is this festival that runs the 1st through the 4th" — you count both ends, which is 4 days. Decide which you mean before you subtract.

How do leap years affect the count?+

A leap year adds February 29th, so any span crossing that date is one day longer than a naive calculation assumes. Over multiple years the effect compounds — this is exactly why counting days by hand across years is unreliable, and why a calculator that knows the calendar rules is worth using.

How many days are there until a date next year?+

It is not simply 365. Depending on whether a February 29th falls in the span, the answer is 365 or 366 — and if you are counting from today, the current day's partial hours matter too. Enter the two dates into a calculator to get the exact figure rather than assuming a fixed year length.

Ad

Tools in this guide

Related guides