Date into Intervals Splitter
Split any date range into equal intervals: days, weeks, months, quarters, or custom periods. Export timeline segments as CSV or JSON.
| # | Start Date | End Date | Duration | Days | Business Days | Status |
|---|
About
Accurate interval segmentation prevents scheduling conflicts, billing errors, and reporting misalignments. This tool divides any date range into precise sub-periods using calendar-aware logic that handles month-length variance (28-31 days), leap year corrections, and quarter boundaries. Unlike naive division by fixed milliseconds, calendar-based splitting respects natural period boundaries - splitting January 15 to April 15 into months yields three complete months, not 89.25 fractional days converted. The algorithm processes ranges spanning decades in under 50ms, outputting segments compatible with financial quarters (Q1 - Q4), ISO week numbering, or arbitrary n-day cycles.
Critical for payroll cycles, subscription billing, project milestones, and compliance reporting where period boundaries must align with fiscal calendars. The tool flags partial intervals at range termination, calculates business-day counts excluding weekends, and exports directly to spreadsheet-compatible formats. Limitation: does not account for locale-specific holidays - business day counts assume a standard Monday - Friday week.
Formulas
The total span in milliseconds between two dates:
For fixed-duration intervals of d days, the number of complete intervals:
where 86400000 is milliseconds per day. Each interval i spans:
For calendar months, the algorithm increments via setMonth(m + 1) while clamping overflow days (e.g., Jan 31 β Feb 28). Partial interval at range end:
where Ξt = total duration (ms), d = interval days, n = complete interval count, Ii = interval bounds, r = remainder duration.
Reference Data
| Interval Type | Duration | Common Use Cases | Boundary Handling |
|---|---|---|---|
| Day | 1 calendar day | Daily reports, medication schedules | Midnight to midnight (local time) |
| Week | 7 days | Sprint planning, payroll cycles | Configurable start (Mon/Sun) |
| Fortnight | 14 days | Bi-weekly billing, alternating schedules | Fixed from start date |
| Month | 28 - 31 days | Rent, subscriptions, loan payments | Same day-of-month or month-end |
| Quarter | 3 months | Fiscal reporting, OKR cycles | Q1: Jan - Mar, Q2: Apr - Jun, etc. |
| Half-Year | 6 months | Semi-annual reviews, tax periods | H1: Jan - Jun, H2: Jul - Dec |
| Year | 365/366 days | Annual contracts, age calculations | Anniversary date or calendar year |
| Custom (n days) | User-defined | Medication cycles, shift rotations | Fixed duration from start |
| ISO Week | 7 days (Mon - Sun) | International logistics, EU reporting | Week 1 contains Jan 4th |
| 4-4-5 Calendar | 4/4/5 weeks per month | Retail fiscal periods | 52/53 week years |
| Lunar Month | ~29.53 days | Cultural/religious calendars | Synodic month approximation |
| Dekad | 10 days | Agricultural planning, historical | Days 1-10, 11-20, 21 - end |
| Business Days | Mon - Fri only | SLA calculations, delivery estimates | Excludes Sat/Sun |
| Accounting Period | 4 or 5 weeks | 13-period accounting | 13 periods per year |
| Bimonthly | 2 months | Magazine subscriptions, billing | Every other month boundary |