Random Date Generator

Generate random dates uniformly between any start and end date — for test data, sampling, scheduling lotteries and picking a random day.

Loading calculator…

What this tool does

Generate random dates uniformly between any start and end date — for test data, sampling, scheduling lotteries and picking a random day. Gregorian calendar dates in YYYY-MM-DD form; both endpoints are included in the range.

How to use the Random Date Generator

  1. Enter or select start date (yyyy-mm-dd).
  2. Enter or select end date (yyyy-mm-dd).
  3. Enter or select dates to generate.
  4. Read the calculated result; change any measurement to compare alternatives.

Formula

Every calendar day in the inclusive range is equally likely: the day offset is a uniform cryptographic integer between 0 and the number of days in the range, added to the start date in UTC so daylight-saving can never skew a day.
start
Start date (YYYY-MM-DD)
end
End date (YYYY-MM-DD)
count
Dates to generate

Gregorian calendar dates in YYYY-MM-DD form; both endpoints are included in the range.

Worked example

Sample draw: between 2026-01-01 and 2026-12-31, one random date might land on 2026-08-14. Every one of the 365 days in that range was equally likely — weekends included; there is no weekday-only filtering.

Inputs

  • Start date (YYYY-MM-DD)2026-01-01
  • End date (YYYY-MM-DD)2026-12-31
  • Dates to generate1

Result

  • Random resultA fresh cryptographic result is generated locally in the calculator above.

Results explained

Random date(s)
Random date(s) from the formula above. Gregorian calendar dates in YYYY-MM-DD form; both endpoints are included in the range.
Days in range
Days in range from the formula above. Gregorian calendar dates in YYYY-MM-DD form; both endpoints are included in the range.
Dates generated
Dates generated from the formula above. Gregorian calendar dates in YYYY-MM-DD form; both endpoints are included in the range.

Frequently asked questions

Yes. The generator counts the days in the range, draws a uniform offset with cryptographic randomness and adds it to the start date. A date in a 31-day month is not favoured over one in February — each individual day has the same chance.

Yes, both endpoints can be drawn. To exclude an endpoint, move it one day inward.

Yes — each requested date is drawn independently, so with a small range and a large count, duplicates are expected. For guaranteed-distinct dates, request fewer dates than the range contains and remove any repeats.

YYYY-MM-DD, for example 2026-08-14. Impossible dates like 2026-02-30 are rejected with an error rather than silently rolled into March.

Yes. Day arithmetic runs on real UTC calendar days, so 29 February exists exactly in leap years and is just as likely as any other day in a range that covers it.