By Tim King · Updated
Random Date Generator
Pick Random Dates Between Two Dates
OneTask is free, with no sign-up, and built by one person.
If this tool saved you time, a coffee helps keep new ones coming.
How the Random Date Generator works
This random date generator picks dates between a start date and an end date, both included. Limit the draw to weekdays or weekends, stop dates repeating, and choose ISO, day-first, month-first or a long written format, which suits test data, rotas, quiz questions and surprise days out.
How the random date generator works
The tool lists every day from the start date to the end date, keeps only the days that match your filter, then picks from that list with the browser's cryptographic random source. Every matching day has the same chance. The formula is simple: chance of one day = 1 ÷ matching days, where matching days counts only the weekdays, only the weekends, or every day in the range. Dates are calculated in UTC, so a daylight-saving change never adds or drops a day.
First example. Pick one date in 2026. The year has 365 days, so any single date has a 1 in 365 chance. Restrict it to weekdays and there are 261 matching days, a 1 in 261 chance each.
Second example. Draw 10 dates in February 2028 with no repeats. That February has 29 days because 2028 is a leap year, so the tool draws 10 different days from 29, and the 29th can be among them.
How many dates can you draw without repeats? No more than the matching days in the range. Ask for 10 weekend days in one week and the tool tells you there are only 2.
Days, weekdays and weekend days in common date ranges, with the chance of drawing any single day
| Range | All days | Weekdays | Weekend days | Chance of one day |
|---|---|---|---|---|
| January 2026 | 31 | 22 | 9 | 1 in 31 |
| February 2026 | 28 | 20 | 8 | 1 in 28 |
| February 2028 (leap) | 29 | 21 | 8 | 1 in 29 |
| Q1 2026 | 90 | 64 | 26 | 1 in 90 |
| Q2 2026 | 91 | 65 | 26 | 1 in 91 |
| Q3 2026 | 92 | 66 | 26 | 1 in 92 |
| Q4 2026 | 92 | 66 | 26 | 1 in 92 |
| First half 2026 | 181 | 129 | 52 | 1 in 181 |
| Second half 2026 | 184 | 132 | 52 | 1 in 184 |
| 2024 (leap) | 366 | 262 | 104 | 1 in 366 |
| 2025 | 365 | 261 | 104 | 1 in 365 |
| 2026 | 365 | 261 | 104 | 1 in 365 |
| 2027 | 365 | 261 | 104 | 1 in 365 |
| 2028 (leap) | 366 | 260 | 106 | 1 in 366 |
| 2020s decade | 3,653 | 2,609 | 1,044 | 1 in 3,653 |
| 1990s decade | 3,652 | 2,610 | 1,042 | 1 in 3,652 |
| 20th century | 36,525 | 26,089 | 10,436 | 1 in 36,525 |
| 21st century so far (to 2026) | 9,496 | 6,784 | 2,712 | 1 in 9,496 |
| A 30-year span (1970–1999) | 10,957 | 7,827 | 3,130 | 1 in 10,957 |
| Unix era to 2038 | 24,856 | 17,754 | 7,102 | 1 in 24,856 |
| Millennium 2001–3000 | 365,242 | 260,888 | 104,354 | 1 in 365,242 |
Tips and pitfalls
Day-first and month-first dates look the same for the first twelve days of a month, so 03/04/2026 is 3 April in the UK and 4 March in the US. Use ISO format for anything a computer will read, because it sorts correctly as text. For test data, include a leap year and month ends in the range to catch date bugs.
FAQ
How do I generate a random date between two dates?
Enter the start date and the end date, choose how many dates you want and press Generate. Both dates are included in the range, and each matching day has exactly the same chance of being picked.
Can I get only weekdays or only weekends?
Yes. Choose "Weekdays only" for Monday to Friday or "Weekends only" for Saturday and Sunday. The stats show how many days in the range match, which is also the most you can draw without repeats.
Does the random date generator handle leap years?
Yes. Every calendar day in the range is listed, so 29 February appears in leap years such as 2024 and 2028 and never in other years. The days-in-range stat shows the exact count.
Can I use this to generate random birthdays?
Yes. Set a range covering the birth years you want, such as 1960 to 2005, and generate as many dates as you need. Allow repeats if you want the realistic chance of two people sharing a birthday.
What date format should I choose?
Use ISO (year-month-day) for spreadsheets, databases and code, because it is unambiguous and sorts correctly. Use day-first or month-first to match local custom, and the long format when the date will be read by people.
See also: all Lists & Lines tools, Writing & Editing, Markdown & HTML, Ciphers & Alphabets.
Related tools
Random Number Generator
Fair random whole numbers in any range, with or without repeats.
Random Name Picker
Draw random winners from a list of names or entries.
Coin Flip
A fair heads-or-tails coin flip, single or in bulk with statistics.
UUID Generator
Random v4 or time-ordered v7 UUIDs, generated in your browser.
Random String Generator
Cryptographically random strings in any length and character set.