Random Generator Kit

HomeEveryday › Date

Random Date Generator

Set the two ends of the range and press the button. Every date between them, including both ends, has exactly the same chance of coming up. The result is shown in ISO, US and UK formats, with the day of the week, the day of the year and the ISO week number, because those are the things people need a random date for.

Set a range and press the button for a date.

The twelve months, and how long each one is

MonthNumberDaysIn a leap yearQuarter
January13131Q1
February22829Q1
March33131Q1
April43030Q2
May53131Q2
June63030Q2
July73131Q3
August83131Q3
September93030Q3
October103131Q4
November113030Q4
December123131Q4

February is the only month whose length changes. Every other month is fixed, which is why a random date generator that picks a month and then a day between 1 and 31 produces 30 February about once in every four hundred tries.

How this list was built

Every day in the range is equally likely, and that is harder than it sounds. The obvious approach — pick a year, then a month, then a day — is wrong twice over. It over-weights short months, because February's 28 days get the same share as March's 31, and it produces dates that do not exist. This page counts the actual days between your two dates and picks one of them, so 29 February can only appear in a year that has one.

Both ends are included. If you ask for 1 January to 31 December, both of those dates can come up. Ranges that quietly exclude the last day are a common source of off-by-one errors in test data.

The result is given in three formats because 03/04/2026 is ambiguous. In the United States that is 4 March. In most of the rest of the world it is 3 April. ISO 8601 — 2026-04-03, year first — is unambiguous, sorts correctly as plain text, and is what you should use in filenames, databases and anything a computer will read.

The ISO week number is not the same as “the nth week of the year”. ISO weeks start on Monday, and week 1 is the week containing the first Thursday of January. That means 1 January can fall in week 52 or 53 of the previous year, which catches out reports and rotas every January.

Dates are handled in UTC. Picking dates in your local time zone would mean the result shifts by a day for some users depending on where they are and whether daylight saving is in effect. The date you get is the date, everywhere.

Sources. The calendar rules here are the Gregorian calendar and ISO 8601. The leap-year rule is that a year is a leap year if it is divisible by 4, except years divisible by 100, unless they are also divisible by 400 — so 1900 was not a leap year and 2000 was. Nothing on this page is an estimate; the calendar is arithmetic.

Common questions

How do I get a random date in a particular year?

Set the range to 1 January and 31 December of that year. Every day in it, including 29 February if the year has one, is equally likely.

Can it pick a date in the past, or the future?

Yes, either. The two date boxes accept any dates your browser will accept, so you can pick a birthday in the 1950s or a deadline in 2075.

Why is the date shown three different ways?

Because the same eight digits mean two different days depending on which country you are in. The ISO form, with the year first, is the one that cannot be misread and the one to use in any file or system.

Which years are leap years?

Those divisible by 4, except century years, which must be divisible by 400. So 2024 and 2000 were leap years; 1900 and 2100 are not. The result tells you whether the year it picked is one.

Is this suitable for generating test data?

For test fixtures, sample records and picking a date to check a form with, yes — the distribution is even and the edge cases are handled. It uses your browser's own random number generator, so it is not suitable where cryptographic randomness is required.

Does the range include both dates I enter?

Yes. Both the start date and the end date can come up, and so can every day between them. Ranges that quietly exclude the last day are a common source of off-by-one errors, so this one does not.

Other generators