Random date generator
One date or a list between any two days, both ends included, with every day in the range equally likely.
How a date is drawn
The generator turns the range into a list of day numbers and draws a number. From 1 January to 31 December 2026 there are 365 days, numbered 0 to 364, so a draw of 282 gives 1 January plus 282 days, which is Saturday 10 October 2026. Each day number has exactly the same chance, picked by your browser’s cryptographic random generator with rejection sampling, so every date in the range is equally likely.
With “Weekdays only”, the numbers count weekdays instead. The 261 weekdays of 2026 are numbered 0 to 260: weekday 0 is Thursday 1 January, 1 is Friday 2 January and 2 is Monday 5 January, because the weekend is skipped. Every Monday to Friday has a 1 in 261 chance and no weekend date can come up. Drawing a date and redrawing weekends would give the same result; counting weekdays directly is simply quicker.
All the arithmetic uses whole days counted in UTC (Saturday 10 October 2026 is day 20,736 after 1 January 1970), so the result is a calendar date with no time attached, and time zones or clock changes never shift it. With “No repeats”, the day numbers are drawn from those still left, like tickets from a hat.
Leap years
A year has 366 days if its number divides by 4, except century years, which need to divide by 400. So 2028 and 2000 are leap years and 2100 is not. Over 400 years the Gregorian calendar has 97 leap years and exactly 146,097 days, which is 20,871 whole weeks, so the pattern of weekdays repeats every 400 years.
Because the generator counts actual days, a leap year gives each date a 1 in 366 chance rather than 1 in 365, and 29 February is as likely as any other date in that year. Across a longer range it is rarer, since it exists only in leap years: a random date from 2000 to 2099 is 29 February 25 times in 36,525, or 1 in 1,461.
Days and weekdays in common ranges
| Range, both ends included | Days | Weekdays |
|---|---|---|
| October 2026 | 31 | 22 |
| February 2028 (leap year) | 29 | 21 |
| October to December 2026 | 92 | 66 |
| 2026 | 365 | 261 |
| 2027 | 365 | 261 |
| 2028 (leap year) | 366 | 260 |
| 2020 to 2029 | 3,653 | 2,609 |
| 1950 to 2026 | 28,124 | 20,089 |
| 1900 to 1999 | 36,524 | 26,090 |
| 2000 to 2099 | 36,525 | 26,089 |
| Any 400 years, such as 2001 to 2400 | 146,097 | 104,355 |
The number in each column is also the chance of each date: one date from 2026 has a 1 in 365 chance of being any given day, and a weekday from 2026 a 1 in 261 chance. A year’s weekday count depends on which day it starts on, so 2028, a leap year starting on a Saturday, has one weekday fewer than 2026.
Uses for random dates
| Use | Settings |
|---|---|
| Choosing days to audit or sample records, such as 12 days of last year’s transactions | The year, how many 12, no repeats, earliest first |
| Unannounced spot checks or inspections on working days | The quarter, weekdays only, no repeats |
| Test data for software: birth dates, order dates and edge cases | A wide range, repeats allowed, ISO format; include ranges that cross 29 February and year ends |
| A date for a giveaway draw, a team social or a surprise | The next 30 days or this month, one date, long format |
| A random order of days for a rota or a study timetable | The whole period, how many equal to the days in it, no repeats, as drawn |
For a sample that must be repeatable, for example in a published audit, record the dates drawn, since this generator has no seed and cannot reproduce a draw. The guide to running a fair draw covers how to document one.
Questions
Are the first and last dates included?
Yes. A range from 1 to 31 October 2026 holds 31 days, and both 1 October and 31 October can come up, each with a 1 in 31 chance.
Does “Weekdays only” leave out bank holidays?
No. It removes Saturdays and Sundays only, so every Monday to Friday stays in, including public holidays. Holidays differ by country and region and change from year to year; if a date falls on one, draw again or leave it out by narrowing the range.
Can a time zone or a clock change move the date?
No. The generator works with whole calendar days counted in UTC, not with times, so a date never shifts by a day because of where you are or because summer time starts or ends. The default range is the calendar year of the date on your device.
How far back or forward can I go?
Any date from the year 1000 to 9999. Dates follow the Gregorian calendar throughout, extended backwards before it was adopted, so dates before October 1582, and in Britain before September 1752, are not the dates people used at the time.
Can I get the dates in order?
Yes. Choose “Earliest first” or “Latest first” under Order. “As drawn” keeps the order the dates came out, which matters if the first date drawn has a special role, such as the first slot in a rota.
Are the dates saved anywhere?
No. They are made in your browser and stay there. The address bar keeps your settings, not the dates, so a link you share opens the same range and draws new dates.