Date Calculator Guide: How to Count Days Between Dates
Written and verified by Muhammad Haroon, founder of Numblox · Counting & adding dates in plain English · Leap years · The month-end clamp · Off-by-one traps · Updated 23 November 2026
How many days until the deadline? What date is 90 days from now? When exactly does a 6-month contract end? Date arithmetic sounds trivial and is quietly treacherous — months refuse to be the same length, February changes size every four years, and "one month from 31 January" has no obvious answer. This guide explains how the calculator handles all of it, with every example verified against the calculator itself.
Try it yourself: use the free Date Calculator on Numblox — count the exact days between any two dates, or add and subtract days, weeks, months and years from a date. Nothing you enter is stored or sent anywhere.
What this calculator does
The calculator has two tools. Days between dates: pick a start and an end date and it reports the distance in whole days, also expressed as weeks and leftover days. Add or subtract: pick a starting date, an amount and a unit — days, weeks, months or years — and it returns the resulting date. All counting is done in whole calendar days, and leap years are handled automatically, including the century rules.
How the counting works
Days between dates is a subtraction: the calculator converts both dates to a day count and takes the difference, so the answer is the number of midnights you cross travelling from the start date to the end date. Adding days or weeks is the same idea in reverse — days are simply added, and a week counts as exactly 7 days. Months and years are the interesting case, because they are not fixed lengths: adding a month means "the same day number in the next month", and when that day does not exist — there is no 31 February — the result clamps to the last day of the target month instead of spilling into the month after. That clamp is the standard, least-surprising behaviour, and the examples below show it in action. This is exactly the maths the Numblox calculator runs, and every figure in this guide was produced with that same code.
Worked examples — counting between dates
A full year, nearly: from 1 January 2026 to 31 December 2026 is 364 days — exactly 52 weeks. A non-leap year has 365 days, but the distance from its first day to its last is one less, because you do not count the starting day itself. (This is the single most common off-by-one surprise; see the FAQ below.)
A leap year: from 1 January 2024 to 1 January 2025 is 366 days (52 weeks and 2 days) — 2024 is a leap year, so February contributed 29 days. The same span a year later, 23 November 2025 to 23 November 2026, is 365 days. Leap years are years divisible by 4, except century years, which must be divisible by 400: 2024 and 2028 are leap years, 2026 is not, 2000 was, 1900 was not.
A countdown: from 1 December 2026 to 25 December 2026 is 24 days (3 weeks and 3 days) — the shape of every "days until Christmas / the wedding / the deadline" question. And the trivial case worth knowing: the same date to itself is 0 days, not 1.
Worked examples — adding and subtracting
Adding days: 21 November 2026 + 30 days = 21 December 2026. Adding weeks: 1 January 2026 + 12 weeks = 26 March 2026 (12 × 7 = 84 days). Subtracting days: 15 March 2026 − 45 days = 29 January 2026 — notice it crosses a month boundary backwards without fuss, because days are just days.
The month-end clamp: 31 January 2026 + 1 month = 28 February 2026 — not 3 March. February 2026 has only 28 days, so the 31st clamps down to the last day that exists. The same rule bites at longer range: 31 August 2026 + 6 months = 28 February 2027, and even leap day itself is not immune: 29 February 2024 + 1 year = 28 February 2025, because 2025 has no 29 February. Contracts, subscriptions and rent schedules that start on the 29th, 30th or 31st all meet this rule in real life — if a monthly payment leaves your account on the 31st, in February it leaves on the 28th (or the last working day), for exactly this reason.
Common questions
Why is 1 January to 31 December 364 days, not 365? Because the calculator measures distance, and distance does not count the starting point — just as the distance from Monday to Tuesday is 1 day, not 2. If you need the inclusive count (both endpoints counted — for example, the number of days in a hotel stay that includes arrival and departure days, or days of leave spanning both dates), add 1 to the calculator's answer. Knowing which of the two you need is the whole secret of date counting; most disagreements about dates are this one misunderstanding in disguise.
Does the calculator count weekends or working days? No — it counts calendar days, all seven days a week. Working-day counting depends on your country's weekends and public holidays, which vary too much for a single honest answer; if you need business days, count the calendar days here first, then subtract the weekends and holidays inside the span.
What does "add 1 month" mean from the 31st? The same date number next month, clamped to the month's last day when necessary: 31 January + 1 month = 28 February (or 29 February in a leap year). It never rolls over into the following month, which matches how most contracts, billing cycles and calendars treat monthly anniversaries.
How many days are in a year, exactly? 365 in a normal year and 366 in a leap year — the calculator's examples show both (2026 spans 365 days from 1 January to the next 1 January; the leap year 2024 spans 366). For very long spans the calculator counts the actual calendar, leap days included, rather than assuming 365 per year.
Check your own numbers
Pick your two dates in the Numblox Date Calculator — try your deadline, your next holiday, or the end of a contract — and test the add tool with a month-end starting date to watch the clamp work. Counting a person's age instead? The Age Calculator Guide explains the years-months-days method built on the same day counting.
Note: This article and the calculator provide general information. Date results are exact calendar arithmetic, but legal and contractual deadlines can follow their own counting rules (working days, clear days, time zones) — for anything with legal consequences, confirm the rule that applies to your case.
Related: Date Calculator · Age Calculator · GPA Calculator · All free calculators