Date & Time Runs locally Ready to use Built-in examples No tracking

Day Counter

Pick a start date to count time together in years/months/days plus total days and live seconds, and see the next 100-day, 1000-day and anniversary dates with countdowns.

The number of days since a wedding, a move or the start of a project changes every second, and answering it properly takes more than one division. From a start date this tool accumulates the calendar difference (X years, X months, X days), the total days, weeks, hours and seconds, and works out when the next round hundred days, round thousand days and anniversary fall — as useful for project milestones as for personal ones.

The calendar difference advances month by month: whole years first, then whole months, then the remainder in days, with month-end overflow clamped to the last day — 31 January plus one month is 28 February, and an anniversary starting on 29 February lands on 28 February in a common year. Reversed dates are swapped with a note, and setting the end date in the future turns the page into a countdown.

How to use

  1. Enter the start date; leave the end date blank to use today.
  2. Read the calendar difference and the total days, weeks, hours and seconds.
  3. Check the dates of the next round hundred and thousand days and the next anniversary.
  4. Use a future end date to run it as a countdown.

How it works

Calendar-day basis and live refresh

Days are counted as calendar days: the number of calendar days between the start day at 0:00 and the end day at 0:00. It uses the "UTC noon method" (fixing the local date at noon before subtracting) to avoid the +/-1 day jitter from 23-/25-hour daylight-saving switch days. Leaving the end date blank counts to today with a per-second page refresh and a live total-seconds figure; a specific end date gives a fixed-range count.

Month advance and month-end truncation

The "X years X months X days" calendar difference advances by month: estimate total months from the year-month difference, add those months to the start day (month-end overflow truncates to the month's last day, so Jan 31 plus 1 month is Feb 28), step back a month if it exceeds the end day, and the remaining calendar days are the days. For those born Feb 29, common-year anniversaries land on Feb 28 — the convention shared by mainstream calendar libraries (date-fns, moment).

Milestones and anniversaries

Milestones are anchored to the start day: the next round hundred or thousand day is the calendar day of "day N," and anniversaries follow the month-advance rule above. The table shows both the target date and days remaining; if today is the anniversary, it says "today is exactly the Xth anniversary." For a countdown, just set the end date to a future day; reversed dates swap automatically.

Code example

JavaScript Normalise to UTC before subtracting (dodges DST)

// plain (d2 - d1) / 86400000 yields 23- or 25-hour days in DST time zones -> fractional days
const dayDiff = (a, b) => {
  const toUTC = (d) => Date.UTC(d.getFullYear(), d.getMonth(), d.getDate());
  return Math.round((toUTC(b) - toUTC(a)) / 86400000);
};

dayDiff(new Date('2026-01-01'), new Date('2026-03-01'));   // 59

// adding N days works the same way: build at UTC, read back the calendar fields
function addDays(date, n) {
  const t = Date.UTC(date.getFullYear(), date.getMonth(), date.getDate() + n);
  const d = new Date(t);
  return [d.getUTCFullYear(), d.getUTCMonth() + 1, d.getUTCDate()];
}
addDays(new Date('2026-02-27'), 1);        // [2026, 2, 28]

Shell Counting days on the command line

# Linux (GNU date): convert to epoch seconds, then subtract
a=$(date -d 2026-01-01 +%s)
b=$(date -d 2026-03-01 +%s)
echo $(( (b - a) / 86400 ))

# macOS (BSD date): -j -f takes the input format
a=$(date -j -f %Y-%m-%d 2026-01-01 +%s)
b=$(date -j -f %Y-%m-%d 2026-03-01 +%s)
echo $(( (b - a) / 86400 ))

# what date is 30 days from today?
date -d "+30 days" +%F            # Linux
date -v+30d +%F                   # macOS

FAQ

How is "X years X months X days" computed?

By calendar advance: count full years, then full months, and the remainder is days. Month-end overflow truncates to the last day of the month — Jan 31 plus 1 month is Feb 28 — so the result is 1 month 1 day rather than a negative number.

How are anniversaries for Feb 29 handled?

A common year has no Feb 29, so under the month-end-truncation convention the anniversary is Feb 28 (the 1st anniversary of 2020-02-29 is 2021-02-28). Whole-year day counts still use real calendar days, gaining a day in leap years.

Which day is the 100th? Does the start day count?

The start day is day 0; the 100th is the start date + 100 calendar days. The milestone table shows that date and the days remaining directly, no manual counting.

What does leaving the end date blank mean?

It counts to today with a per-second refresh, so total seconds tick live; entering a specific date counts up to that day, good for a fixed range.

What happens if I enter the dates backwards?

The tool treats the earlier date as the start and shows an "auto-swapped" note; the result is unaffected — no need to clear and re-enter.

Does total seconds tick live?

When the end date is blank, yes — the page refreshes every second and the seconds elapsed since midnight today keep increasing; with a specific end date, all numbers are fixed.

Is date data uploaded?

No. Date calculation runs entirely in your browser, with no upload or storage; on-page history stays in local browser storage and can be cleared anytime — gone in incognito mode on close.