📅 Random Date Generator
Pick a start and end date, and get one or more random dates in between.
How a date is picked
The range is converted to a whole number of days, then each result is an offset counted forward from the start date:
days = (end - start) / 86,400,000 + 1
date = start + a whole number from 0 to days - 1
The + 1 makes both ends inclusive, so 1 January to 31 December
2026 is 365 candidates, each with a 1 in 365 chance - 0.274%. The offset comes
from crypto.getRandomValues with a rejection loop, which discards
draws that would not divide evenly across the range, so no day is favoured over
another. Leap days inside the range are ordinary candidates like any other.
Things worth knowing before you use the output
- Dates can repeat. Every pick is independent, so this is a draw with replacement, not a shuffle. Ask for 30 dates from a one-year range and there is a 70.6% chance at least two are the same day.
- The list comes back in date order, not the order it was drawn, so you cannot use the position in the list to mean anything.
- Weekends are not excluded. Two days in seven are a Saturday or Sunday, so expect about 29% of results to land on one. The weekday name is shown beside each date so you can drop the ones you do not want.
Frequently asked questions
Are the start and end dates themselves included?
Yes, both. A range of 1 March to 3 March can return any of those three days, not just the 2nd.
Can the same date come up more than once?
Yes. Each draw is made fresh from the whole range, so repeats are normal rather than a fault - and they are commoner than they feel. Ten dates from a year already carry an 11.7% chance of a collision.
How do I get one random date in a specific year?
Set From to 1 January and To to 31 December of that year, and How many to 1. For a month, use the first and last day of that month instead.