Non-random numbers. Random number generators: how to choose the right service? Random number generator using the random function

Various lotteries, sweepstakes, etc. are often held in many groups or publics in, etc., and are used by account owners to attract new audiences to the community.

The result of such drawings often depends on the user's luck, since the recipient of the prize is determined randomly.

To make this determination, lottery organizers almost always use a generator random numbers online or pre-installed, distributed free of charge.

Choice

Quite often, choosing such a generator can be difficult, since their functionality is quite different - for some it is significantly limited, for others it is quite wide.

Enough is being implemented large number such services, but the difficulty is that they differ in scope.

Many, for example, are tied in their functionality to a certain social network(for example, many generator applications only work with links from this one).

The simplest generators simply randomly determine a number within a given range.

This is convenient because it does not associate the result with a specific post, which means it can be used for sweepstakes outside the social network and in various other situations.

They essentially have no other use.

Advice! When choosing the most suitable generator, it is important to consider what it will be used for.

Specifications

For the fastest process of choosing the optimal online random number generation service, the table below shows the main technical specifications and functionality of such applications.

Table 1. Features of the functioning of online applications for generating a random number
NameSocial networkMultiple resultsSelect from a list of numbersOnline widget for the siteSelect from a rangeDisabling repetitions
RandStuffYesYesNoYesNo
Cast LotsOfficial website or VKontakteNoNoYesYesYes
Random numberOfficial websiteNoNoNoYesYes
RandomusOfficial websiteYesNoNoYesNo
Random numbersOfficial websiteYesNoNoNoNo

All applications discussed in the table are described in more detail below.

RandStuff

You can use this application online by following the link to its official website http://randstuff.ru/number/.

This is a simple random number generator, characterized by fast and stable operation.

It is successfully implemented both in the format of a separate stand-alone application on the official website, and as an application in .

The peculiarity of this service is that it can select a random number both from a specified range and from a specific list of numbers that can be specified on the site.

  • Stable and fast work;
  • Lack of direct connection to a social network;
  • You can select one or several numbers;
  • You can only choose among the specified numbers.

User reviews of this application are as follows: “We determine winners in VKontakte groups through this service. Thank you,” “You are the best,” “I only use this service.”

Cast Lots

This application is a simple function generator, implemented on the official website in the form of a VKontakte application.

There is also a generator widget for inserting into your website.

The main difference from the previous application described is that this allows you to disable the repetition of the result.

That is, when carrying out several generations in a row in one session, the number will not be repeated.

  • Availability of a widget for inserting into a website or blog;
  • Ability to disable result repetition;
  • The presence of the “even more randomness” function, after activation of which the selection algorithm changes.

User reviews are as follows: “It works stably, it’s quite convenient to use”, “Convenient functionality”, “I only use this service”.

Random number

Various lotteries, sweepstakes, etc. are often held in many groups or public pages on social networks, Instagram, etc., and are used by account owners to attract new audiences to the community.

The result of such drawings often depends on the user's luck, since the recipient of the prize is determined randomly.

To make this determination, lottery organizers almost always use an online or pre-installed random number generator that is distributed free of charge.

Choice

Quite often, choosing such a generator can be difficult, since their functionality is quite different - for some it is significantly limited, for others it is quite wide.

A fairly large number of such services are being implemented, but the difficulty is that they differ in scope.

Many, for example, are tied by their functionality to a specific social network (for example, many generator applications on VKontakte work only with links from this social network).

The simplest generators simply randomly determine a number within a given range.

This is convenient because it does not associate the result with a specific post, which means it can be used for sweepstakes outside the social network and in various other situations.

They essentially have no other use.

<Рис. 1 Генератор>

Advice! When choosing the most suitable generator, it is important to consider what it will be used for.

Specifications

For the fastest process of choosing the optimal online service for generating random numbers, the table below shows the main technical characteristics and functionality of such applications.

Table 1. Features of the functioning of online applications for generating a random number
Name Social network Multiple results Select from a list of numbers Online widget for the site Select from a range Disabling repetitions
RandStuff Yes Yes No Yes No
Cast Lots Official website or VKontakte No No Yes Yes Yes
Random number Official website No No No Yes Yes
Randomus Official website Yes No No Yes No
Random numbers Official website Yes No No No No

All applications discussed in the table are described in more detail below.

<Рис. 2 Случайные числа>

RandStuff

<Рис. 3 RandStuff>

You can use this application online by following the link to its official website http://randstuff.ru/number/.

This is a simple random number generator, characterized by fast and stable operation.

It is successfully implemented both in the format of a separate independent application on the official website, and as an application on the VKontakte social network.

The peculiarity of this service is that it can select a random number both from a specified range and from a specific list of numbers that can be specified on the site.

Pros:

  • Stable and fast work;
  • Lack of direct connection to a social network;
  • You can select one or several numbers;
  • You can only choose among the specified numbers.

Cons:

  • Inability to conduct a VKontakte drawing (this requires a separate application);
  • Applications for VKontakte do not run in all browsers;
  • The result sometimes seems predictable because only one calculation algorithm is used.

User reviews of this application are as follows: “We determine winners in VKontakte groups through this service. Thank you,” “You are the best,” “I only use this service.”

Cast Lots

<Рис. 4 Cast Lots>

This application is a simple function generator, implemented on the official website in the form of a VKontakte application.

There is also a generator widget for inserting into your website.

The main difference from the previous application described is that this allows you to disable the repetition of the result.

That is, when carrying out several generations in a row in one session, the number will not be repeated.

  • Availability of a widget for inserting into a website or blog;
  • Ability to disable result repetition;
  • The presence of the “even more randomness” function, after activation of which the selection algorithm changes.

Negative:

  • Inability to determine several results at once;
  • Inability to select from a specific list of numbers;
  • To select a winner in publics, you must use a separate VKontakte widget.

User reviews are as follows: “It works stably, it’s quite convenient to use”, “Convenient functionality”, “I only use this service”.

Random number

<Рис. 5 Случайное число>

This service is located at http://randomnumber.rf/.

Simple generator with minimum functions and additional features.

Can randomly generate numbers within a specified range (maximum from 1 to 99999).

The site does not have any graphic design, and therefore the page loads easily.

The result can be copied or downloaded with the click of a button.

Negative:

  • Lack of a widget for VKontakte;
  • There is no possibility of holding draws;
  • There is no way to embed the result into a blog or website.

Here's what users say about this service: “A good generator, but not enough functions”, “Very few features”, “Suitable for quickly generating numbers without unnecessary settings.”

Randomus

<Рис. 6 Рандомус>

You can use this random number generator at http://randomus.ru/.

Another one, quite simple, but functional random number generator.

The service has sufficient functionality for determining random numbers, but it is not suitable for conducting draws and other more complex processes.

Negative:

  • Impossibility of holding draws based on reposts of posts, etc.
  • There is no application for VKontakte or a widget for the site;
  • It is not possible to disable repeating results.

Please help the service with one click: Tell your friends about the generator!

Online number generator in 1 click

The random number generator, which is presented on our website, is very convenient. For example, it can be used in sweepstakes and lotteries to determine the winner. The winners are determined in this way: the program produces one or more numbers in any range specified by you. Fraudulent results can be immediately ruled out. And thanks to this, the winner is determined by an honest choice.

Sometimes it is necessary to obtain a certain number of random numbers at once. For example, I want to fill out lottery ticket“4 out of 35”, trusting to chance. You can check: if you toss a coin 32 times, what is the probability that 10 reverses will appear in a row (heads/tails may well be assigned the numbers 0 and 1)?

Random number online video instruction - randomizer

Our number generator is very easy to use. It does not require downloading a program to your computer - it can be used online. To get the number you need, you need to set the range of random numbers, the quantity and, if desired, the number separator and eliminate repetitions.

To generate random numbers in a specific frequency range:

  • Select a range;
  • Specify the number of random numbers;
  • The “Number separator” function serves for the beauty and convenience of their display;
  • If necessary, enable/disable repetitions using the checkbox;
  • Click the "Generate" button.

As a result, you will receive random numbers in a given range. The result of the number generator can be copied or sent by e-mail. It would be best to take a screenshot or video of this generation process. Our randomizer will solve any of your problems!

Numbers accompany us everywhere - house and apartment numbers, telephone numbers, cars, passports, plastic cards, dates, email passwords. We choose some combinations of numbers ourselves, but most we get by chance. Without realizing it, we use randomly generated numbers every day. If we come up with PIN codes, then unique credit or salary card are generated by reliable systems that exclude access to passwords. Random number generators provide security in areas that require processing speed, security, and data independence.

The process of generating pseudorandom numbers is subject to certain laws and has been used for a long time, for example, in lotteries. In the recent past, drawings were carried out using lottery machines or lots. Now in many countries winning numbers state lotteries are determined precisely by the set of generated random numbers.

Advantages of the method

So, a random number generator is an independent modern mechanism for randomly determining combinations of numbers. The uniqueness and perfection of this method lies in the impossibility of external intervention in the process. The generator is a set of programs built, for example, on noise diodes. The device generates a stream of random noise, the current values ​​of which are converted into numbers and form combinations.

Generating numbers provides instant results - it takes a few seconds to create a combination. If we talk about lotteries, participants can immediately find out whether the ticket number matches the winning one. This allows drawings to be held as often as participants want. But the main advantage of the method is its unpredictability and the impossibility of calculating the algorithm for selecting numbers.

How pseudorandom numbers are generated

In fact, random numbers are not random - the series starts from a given number and is generated by an algorithm. A pseudorandom number generator (PRNG or PRNG - pseudorandom number generator) is an algorithm that generates a sequence of seemingly unrelated numbers, usually subject to a uniform distribution. In computer science, pseudorandom numbers are used in many applications: cryptography, simulation modeling, Monte Carlo method, etc. The quality of the result depends on the properties of the PRNG.

The source of generation can be physical noise from cosmic radiation to noise in a resistor, but such devices are almost never used in network security applications. Cryptographic applications use special algorithms that generate sequences that cannot be statistically random. However, a properly chosen algorithm can produce series of numbers that pass most randomness tests. The repetition period in such sequences is greater than the working interval from which the numbers are taken.

Many modern processors contain a PRNG, such as RdRand. As an alternative, sets of random numbers are created and published in a one-time pad (dictionary). The source of numbers in this case is limited and does not provide complete network security.

History of PRNG

A prototype of a random number generator can be considered board game Senet, common in Ancient Egypt in 3500 BC. According to the conditions, two players participated, the moves were determined by throwing four flat black and white sticks - they were a kind of PRNG of that time. The sticks were thrown at the same time, and points were counted: if one fell up with the white side, 1 point and an additional move, two white ones - two points, and so on. Maximum result The player who threw out four sticks with the black side received five points.

Nowadays, the ERNIE generator has been used for many years in the UK for lottery draws. There are two main generation methods winning numbers: linear congruent and additive congruent. These and other methods are based on the principle of random selection and are provided by software that endlessly produces numbers whose sequence is impossible to guess.

The PRNG operates continuously, for example, in slot machines. According to US law, this prerequisite, which all software providers must comply with.

In this article we will look at the features of the algorithm random number generator in Excel, and with examples we will look at how to use the RAND and RANDBETWEEN functions in Excel to generate random numbers, random numbers with a given number of decimal places, dates and times.

Random number generator using RAND function

The RAND function is one of two functions specifically designed for generating random numbers in Excel. This function returns a random decimal number (real number) between 0 and 1.

RAND() is a volatile function, which means that every time the worksheet is evaluated, a new random number is created. And this happens every time you perform any action on the worksheet, such as updating a formula (not necessarily a RAND formula, any other formula on the worksheet), editing a cell, or entering new data.

The RAND function is available in all versions: Excel 2016, Excel 2013, Excel 2010, Excel 2007, Excel 2003.

Since Excel's RAND function has no arguments, you simply enter =RAND() in a cell and then copy the formula to as many cells as you want:

Now let's take it a step further and write some RAND formulas to generate random numbers according to certain conditions.

Random number generator from zero to a given upper range limit

To go from zero to any value N, you perform the RAND function using N several times:

For example, to create a sequence of random numbers greater than or equal to 0 but less than 50, use the following formula:

RAND()*50

Note: The upper bound value is never included in the returned random sequence. For example, if you want to get random numbers from 0 to 10, including 10, correct formula=RAND()*11.

Random number generator in range

To create random number in range, i.e. random number between any two numbers you specify, use the following RAND formula:

RAND() * (B - A) + A

Where A is the lower bound value ( smallest number), and B is the upper bound value ( greatest number).

For example, to make a random number generator from 10 to 50, you can use the following formula:

RAND()*(50-10)+10

Note: This random number generation formula will never return a number equal to the largest number in the specified range (value B).

Random Integer Generator in Excel

To have Excel's RAND function produce random integers, take one of the above formulas and wrap it in the INTEGER function.

To go from 0 to 50:

INTEGER(RAND()*50)

To generate random integers from 10 to 50:

INTEGER (RAND()*(50-10)+10)

Random Number Generator in Excel - Generating Random Integers

Random number generator in Excel in a range using the RANDBETWEEN function

RANDBETWEEN is another function in Excel to create random number generator.. It returns random integers in the specified range:

RANDBETWEEN (lower bound; upper bound)

Obviously, the lower bound is the smallest number and the upper bound is the largest number in the range of random numbers you want to get.

Similar to RAND, RANDBETWEEN in Excel is a volatile function and it also returns a new random integer every time your table is recalculated or modified.

For example, in order to make a random integer generator From 10 to 50 (including 10 and 50) use the following RANDBETWEEN formula:

RANDBETWEEN(10, 50)

Random number generator in Excel - Generate random numbers in a given range

The RANDBETWEEN function in Excel can create both positive and negative random numbers. For example, to get a list of random numbers from -10 to 10, enter the following formula in the worksheet:

RANDBETWEEN(-10;10)

The RANDBETWEEN function is available in the following versions: Excel 2016, Excel 2013, Excel 2010 And Excel 2007.

In an earlier version Excel 2003, you can use the RAND formula discussed above.

Generate random numbers with a specified number of decimal places

Although the RANDBETWEEN function in Excel was designed to generate random integers, you can use it to generate random decimal numbers with as many decimal places as you want.

RANDBETWEEN(lower bound*10; upper bound*10)/10

For example, to get a list of numbers with one decimal place, you multiply the bottom and top values ​​by 10, and then divide the return value by 10:

The following RANDBETWEEN formula returns random decimal numbers from 1 to 50:

RANDBETWEEN(1*10;50*10)/10

Random number generator in Excel - Generate random numbers with one decimal place

Likewise, to make a random number generator from 1 to 50 to two decimal places, you multiply the arguments of the RANDBETWEEN function by 100, and then divide the result by 100:

RANDBETWEEN(1*100; 50*100)/100

Random number generator in Excel - Generating random numbers with two decimal places

Random Date Generator in Excel

To return a list of random dates between given two dates, use the RANDBETWEEN function in combination with DATE:

RANDBETWEEN(DATE(start date); DATE(end date))

For example, to get a list of dates between September 1, 2017 and November 20, 2017, inclusive, enter the following formula in a worksheet:

RANDBETWEEN(DATE(2017,9,1),DATE(2017,11,21))

Remember to apply a date format to the cell(s) and you will get a list of random dates like this:

Random number generator in Excel - Generating random dates

Random Time Generator in Excel

In the internal Excel system, times are stored as decimal numbers, and you can use the standard Excel function RAND to insert random real numbers and then simply apply the time format to the cells:

Random number generator in Excel - Generating random time using the RAND function and applying the Time format to it

To make a random time generator within a specified range requires a more specific formula. Let's take a closer look.

Random time generator in a specified range

To insert an arbitrary time between any two time intervals you specify, use the TIME function in combination with Excel RAND:

TIME (start time) + RAND() * (TIME (start time) - TIME (end time))

For example, to insert random time between 5:30 and 18:00, you can use one of the following formulas:

TIME(5,30,0)+RAND()*(TIME(18,0,0)-TIME(5,0,0))

Random number generator in Excel - Generate random time in a given interval

Random letter generator in Excel

To insert a random letter, you need to use a combination of three different functions:

CHAR(RANDBETWEEN(CODECHAR("A"),CODECHAR("Z")))

Where A is the first character and Z is the last character in the range of letters you want to include (in alphabetical order).

Let's analyze the functions in the above formula:

  • CODE Returns the ANSI numeric codes for the specified letters.
  • RANDBETWEEN accepts the numbers returned by the CODE functions as the lower and upper values ​​of a range.
  • CHAR converts random ANSI codes returned by RANDBETWEEN into corresponding letters.

Random number generator in Excel - Generating random letters

Because ANSI codes differ for uppercase and lowercase letters, this formula is case sensitive.

If someone knows the ANSI character codes by heart, there is nothing stopping you from passing the codes directly to the RANDBETWEEN function.

For example, to get arbitrary capital letters between A (ANSI code 65) and Z (ANSI code 90), you write:

CHAR(RANDBETWEEN (65,90))

To generate lowercase letters between a (ANSI code 97) to z (ANSI code 122), you use the following formula:

CHAR(RANDBETWEEN(97,122))

To insert a random special character, for example! "# $% & "() * +, -. /, use the RANDBETWEEN function with the bottom parameter set to 33 (ANSI code for "!") and the top parameter set to 47 (ANSI code for "/").

CHAR(RANDBETWEEN(33,47))

Random Number Generator in Excel - Generating Random Symbols

How to prevent RAND and RANDBETWEEN from being recalculated

If you want to have a permanent set of random numbers, dates, or text strings that won't change every time, that is, to fix the random numbers when the worksheet is recalculated, use one of the following methods:

  1. To stop the RAND or RANDBETWEEN functions from recalculating in one cell, select that cell, switch to the Formula bar, and press F9 to replace the formula with its value.
  2. To prevent the random number function in Excel from automatically updating values ​​in several cells, use the Paste function. Select all cells with a random value generation formula, click Ctrl+C to copy them, then right-click the selected range and click " Insert special"--> "Values".

Random Number Generator in Excel - Inserting Values

Random Number Generator Using Data Analysis

With a data analysis package you can, for example, or other distribution. By default, this package is not enabled, so you need to download it. How to do this is described in this.

An example of generating random numbers of normal distribution

In order to generate random numbers of normal distribution, go to the “DATA” tab, in the “Analysis” group select “Data analysis”.

Random Number Generator in Excel - Data Analysis

In the list that opens, select “ Random number generation" and press the " OK " button.

Random number generator in Excel - Random number generation

In the window that opens, in the list " Distribution» select « Normal ", enter the number of variables, the number of random numbers, the mean and variance, and the location where you want to place the generated random numbers.

Random Number Generator in Excel - Generate Normal Distribution Random Numbers

After all the data has been entered, click the “OK” button, and as a result we obtain generated random numbers of normal distribution.

Well, that's all. Now you have learned how to make a random number generator, numbers in a range, numbers with a specified number of decimal places, random dates, random times, and random letters, as well as generate random numbers of normal distribution. Thus, with this knowledge, you can create not only random number generator in Excel, but also .