Day Counter Calculator
Count calendar days, weeks, business weekdays, and year-month-day spans between two dates, or add and subtract calendar or business days.
How to Use
- Choose Days Between Dates to measure a range or Add / Subtract Days to shift from a base date.
- Pick your start and end dates (or starting date and day count) and toggle inclusive end-date or business-days-only counting as needed.
- Review the instant breakdown of total days, weeks, weekdays, weekends, and calendar years/months/days.
- Click Copy Summary to copy the full calculation or Reset to return to today's default window.
What is Day Counter Calculator?
A day counter calculator measures the exact duration between two calendar dates or projects a future or past target date by adding or subtracting days. Project managers, legal teams, travelers, and students use it to verify contract deadlines, invoice terms, sprint durations, and countdowns with clear separations between calendar days and Monday–Friday business days.
How It Works
Dates are parsed strictly as YYYY-MM-DD at UTC midnight (`parseIsoDateUtc`) so daylight-saving transitions never cause off-by-one-hour errors. In Days Between Dates mode, `countWeekdaysAndWeekends` computes total days, full weeks plus remainder, weekdays, weekend days, and exact calendar years/months/days in O(1) time. In Add / Subtract Days mode, `addOrSubtractDays` jumps across calendar or business weeks to output the target ISO date and weekday name.
Common Use Cases
- Contract and SLA deadline tracking — calculate 30, 45, or 90 business days forward while skipping weekends
- Billing period and lease calculations — measure exact inclusive or exclusive days and months between start and end dates
- Project sprint and milestone planning — inspect total weekdays available between kickoff and launch dates
- Age, anniversary, and event countdowns — view exact year-month-day calendar breakdowns alongside total hours
Technical Details
Uses deterministic SSR state hydrated on mount to local today via `useEffect`, strict leap-year-aware `parseIsoDateUtc` validation, O(1) UTC weekday/weekend counting (`countWeekdaysAndWeekends`), exact calendar borrowing (`computeCalendarBreakdown`), and O(1) business-day shifting (`addOrSubtractDays`).
FAQ
How does the Include End Date option affect the day count?
By default, date difference measures the elapsed interval between dates (for example, January 1 to January 2 equals 1 day). Enabling Include end date adds 1 day so both boundary dates are counted inclusively.
How are business weekdays and weekend days calculated?
The calculator uses O(1) UTC calendar arithmetic to count Monday through Friday as business weekdays and Saturday through Sunday as weekend days without daylight-saving time drift.
Can I add or subtract business days instead of calendar days?
Yes. Switch to the Add / Subtract Days tab, enter your starting date and day offset, and enable Business days only to skip Saturdays and Sundays automatically.
Is this Day Counter Calculator free and private?
Yes. All date parsing and calendar math runs locally in your browser with zero uploads or tracking.