GenerateRandomSearch

Date Range Splitter

Splitting a date range into equal parts sounds trivial until you do it and lose a day. Divide 366 days by four and you get 91.5, and every way of rounding that loses or duplicates a day at a boundary. This splits the range so the parts differ by at most one day, each one starts the day after the previous ends, and together they cover the range exactly — which is asserted rather than assumed.

What this generator does

Partitions a range rather than sampling from it. The random date range generator here produces a range; this takes one you already have and divides it. The guarantee is the useful part: the chunks are contiguous, they cover every day exactly once, and their lengths differ by at most one — which is the same largest-remainder discipline this site uses for words, minutes and column widths.

How to use this tool

  1. Enter the start and end dates as YYYY-MM-DD.
  2. Choose how many parts you want.
  3. Read the table, or copy it as CSV.

Understanding the controls

From and to
Both dates are included. A single-day range is a valid range with one day in it.
How many parts
If you ask for more parts than there are days, you get one part per day and no empty parts — an empty chunk is not a chunk.

Worked examples

2024 in four parts
92, 91, 91, 92 days — 366 in total, because 2024 is a leap year.
2024 in twelve parts
Six parts of 31 days and six of 30, adding to 366.
Ten days into three parts
4, 3, 3.
Three days into ten parts
Three parts of one day — never more parts than days.

Common use cases

  • Chopping a year into equal reporting periods
  • Batching a long date range into windows for an API that limits how much you can request
  • Dividing a project timeline into equal phases
  • Splitting a study or campaign period into comparable blocks
  • Producing sprint or iteration boundaries from a start and end date

How this generator works

The total number of days is divided by the part count; every part gets the floor of that, and the remainder is handed out one day at a time to the earliest parts. Each chunk then starts the day after the previous one ended. The result is checked before display: the day counts must sum to the range, the first chunk must start at the start, the last must end at the end, and no two chunk lengths may differ by more than one.

Randomness and fairness

Nothing here is random. The same range and part count always produce the same split, which is what makes it safe to use for reporting boundaries.

For how randomness is produced across the whole site, see how Generate Random works.

Assumptions this tool makes

  • Both the start and end dates belong to the range, and the parts should be as equal as whole days allow.

Limitations and good to know

  • Parts are equal in days, not in working days, months or business value. A quarter of a year by day count is not a calendar quarter.
  • It does not skip weekends or holidays; use the business day calculator if the working days are what matter.
  • The chunk boundaries are not stored, so copy the CSV before the settings that produced them are gone.

Common mistakes

Expecting calendar months
Twelve equal parts of a year are not the twelve months — months are between 28 and 31 days. If you want months, use months.
Rounding the day count yourself
That is where the lost day comes from. Spreading the remainder is the only way the parts add back up to the range.

Practical tips

  • Copy the CSV straight into whatever is going to loop over the windows — the boundaries are already correct.
  • For API batching, pick a part count that keeps each window under the limit rather than picking a window size and hoping.

Privacy and your data

The dates you type stay in your browser. Nothing is uploaded, nothing is stored between visits, and nothing is written into the page address. Analytics records only that the tool was used.

Frequently asked questions

Do the parts overlap?
No. Each part starts the day after the previous one ends, and that is checked before the table is shown. Every day in the range belongs to exactly one part.
Why are some parts a day longer?
Because the range rarely divides exactly. The alternative is losing a day or duplicating one, so the remainder is spread across the earliest parts and the lengths differ by at most one.
Can I split by working days instead?
Not here — this splits calendar days. The business day calculator will tell you how many working days each resulting window contains.