📅 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 are read at local midnight, so the day you get is the day you see. Pasting the same range into tools that parse dates as UTC can shift every result back by one.

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.