Introduction
Many aptitude and reasoning problems ask for the exact number of days (or weeks) between two dates. Accurate counting requires handling month lengths (30/31/28/29), leap years, and inclusive/exclusive endpoints correctly.
Pattern: Counting Days Between Two Dates
Pattern
Compute total days by splitting the span into whole years, whole months and remaining days - account for leap years and choose inclusive/exclusive counting as required by the question.
Step-by-Step Example
Question
Find the number of days between 15 August 2023 and 15 August 2024 (inclusive of start date and end date).
Solution
Step 1: Decide inclusive/exclusive rule
The question says inclusive of start and end date. That means count both 15 Aug 2023 and 15 Aug 2024.Step 2: Count full years and check leap
From 15 Aug 2023 to 15 Aug 2024 is exactly one year. 2024 is a leap year (divisible by 4, and not a non-400 century) → this year has 366 days.Step 3: Translate "one year inclusive" to days
One full year inclusive of both endpoints = 366 days (because the span includes 29 Feb 2024). If the question had been exclusive of one end, subtract 1 day accordingly.Final Answer:
366 daysQuick Check:
Check leap: Feb 2024 exists (29 Feb) → ordinary 365 becomes 366 → inclusive endpoints confirm 366 ✅
Quick Variations
1. If endpoints are the same date and inclusive → 1 day; exclusive → 0 days.
2. For spans across months, convert months to days using month lengths (Jan 31, Feb 28/29, Mar 31, Apr 30…).
3. For long spans, count whole years first (use 365/366), then months, then leftover days to reduce mistakes.
Trick to Always Use
- Step 1 → Decide inclusive or exclusive counting at the start (this changes the final ±1).
- Step 2 → Break the interval into whole years, whole months, and remaining days; handle leap years when the span crosses Feb in a leap year.
Summary
Summary
- Break the span into whole years, months, and leftover days to simplify counting.
- Always determine whether endpoints are counted (inclusive) or not (exclusive) before computing.
- Account for leap years only if the range includes 29 February of a leap year.
- Quick method: years → convert to days (365/366), add month-days (use month table), then add leftover days; finally adjust for inclusive/exclusive.
Example to remember:
15 Aug 2023 → 15 Aug 2024 (inclusive) = one year; 2024 is leap → 366 days.
