Random Date Generator
Set a date range and generate one uniformly random date from within it.
How this is calculated
The generator counts the number of days spanned by your range (inclusive of both the earliest and latest date), then uses Math.random() to pick a uniformly random whole-number offset within that count. Adding the offset to the earliest date gives the result, so every day in the range — including the two dates you entered — has an equal chance of being picked.
Frequently asked questions
What is this useful for?
Common uses include picking a draw date for a raffle or giveaway, randomly assigning a start day for a challenge or icebreaker, and generating sample/test dates for a spreadsheet or app.
Is the randomness fair — every date equally likely?
Yes. It picks a uniformly random whole-number offset within the number of days in your range using Math.random(), so every day in the range has an equal chance of being chosen.
Can the range include today or past dates?
Yes, any two dates work, in whichever order you enter them — the earlier one is always treated as the start of the range and the later one as the end.