Unique Days Counter
Count distinct days across overlapping intervals.
--
How Unique Days Counter Works?
The Unique Days Counter works by expanding every interval into individual dates, removing duplicates and counting what remains.
- 1
Enter intervals
Add date ranges or single dates.
- 2
Expand into dates
Each range becomes a list of its dates.
- 3
Remove duplicates
A date that appears in 2 or more intervals stays once.
- 4
Count
The total equals the number of distinct calendar days.
Unique Days Counter Formula
The Unique Days formula is Unique Days = |D₁ ∪ D₂ ∪ … ∪ Dₙ|, the size of the set of all dates.
Unique Days = |∪ Dᵢ| Duplicates = Σ |Dᵢ| − |∪ Dᵢ|
- Dᵢ:
- Set of dates in interval i
- | |:
- Number of elements in a set
Example: 3 site visits cover May 4, 2026–May 8, 2026, May 7, 2026–May 12, 2026 and May 12, 2026. The raw total is 5 + 6 + 1 = 12 days, and the unique total is 9 days.
Unique Days Counter Conversion Table
The table counts unique days for 5 sets of intervals in 2026.
| Intervals | Listed Days | Unique Days | Duplicates |
|---|---|---|---|
| May 4–8, May 7–12, May 12 | 12 | 9 | 3 |
| Jan 1–31, Jan 1–31 | 62 | 31 | 31 |
| Feb 1–14, Feb 15–28 | 28 | 28 | 0 |
| Aug 1–10, Aug 5, Aug 9 | 12 | 10 | 2 |
| Dec 20–31, Dec 24–26 | 15 | 12 | 3 |
What is Unique Days Counter?
A Unique Days Counter is a tool that counts distinct calendar days across overlapping intervals and single dates.
Residency rules, travel limits and attendance records count days, not entries. Being in 2 places on 1 date still counts as 1 day present.
The counter accepts single dates and ranges together, unlike the union calculator, which works on ranges only.
What are the uses of Unique Days Counter?
There are 5 main uses of the Unique Days Counter, including residency tests, attendance totals and site visits.
-
Residency tests
Expats count distinct days present in a country.
-
Attendance totals
Schools count distinct days attended from mixed records.
-
Site visits
Contractors count distinct days on site.
-
Usage days
Product teams count distinct active days per user.
-
Fieldwork
Researchers count distinct field days.
Related Date Ranges & Sets Tools
View All 141 Tools →Date Range Comparison Calculator
Compare the lengths of two date ranges.
Date Range Overlap Calculator
Find dates shared by two intervals.
Multiple Date Range Intersection Calculator
Find dates common to all supplied intervals.
Date Range Union Calculator
Combine ranges without double-counting dates.
Date Range Gap Calculator
Find uncovered days between supplied intervals.
Date Range Exclusion Calculator
Remove selected dates or intervals from a range.