Date Calculations Without the Off-by-One: D-Days, Anniversaries, Age and Months Old
How many days until the exam? When is the 100th day? How many months old is the baby? Date maths is full of one-day differences, so it pays to know the rule being used.
D-day counting labels the target date D, the day before D-1 and the day after D+1. The days remaining are simply target date minus today. On 28 October 2026, 25 December is D-58.
Start: 2026-03-01
Elapsed days: 2026-06-08 is 99 days after the start
Day number: 2026-06-08 is the 100th day
How counting the first day changes D-day and anniversary results, how to calculate age in years, and how calendar-month ages and month-end dates work.Read guide →