A random number generator is an algorithm that produces numbers with no predictable pattern. It decides the outcome of every digital game at a mobile casino: slots, blackjack, roulette, crash games, keno and instant games. Its key property is unpredictability, so each spin, card or roll is independent of the one before. This guide explains how RNGs work, how they are tested and what their maths means for the games you choose. More guides are in our guides section.
What a random number generator is
An RNG is a program that generates numbers that are statistically random. It has three parts: a seed value, a mathematical algorithm and an output mapping that turns raw numbers into game results. Each number carries no memory of the numbers before it.
There are two main types:
- True random number generators (TRNGs) take randomness from physical events, such as atmospheric noise or radioactive decay.
- Pseudo-random number generators (PRNGs) derive randomness from an algorithm and a seed.
True random number generators
A TRNG measures unpredictable physical sources such as atmospheric noise, thermal noise or radioactive decay. No two measurements can be repeated exactly, and because the source sits outside the software, it is hard to attack. TRNGs are slower, so casinos use them less for fast, high-volume games.
Pseudo-random number generators
A PRNG starts from a seed and applies fixed mathematical steps to it, producing millions of values a second. Most mobile casino games run on PRNGs. Some use algorithms such as the Mersenne Twister, which has a period of 2^19937 − 1 before its sequence repeats; casino-grade generators add cryptographic functions on top. The numbers are not truly random, but they are statistically random and cannot be predicted in practice.
How an RNG decides a round
The RNG turns a seed into a continuous stream of numbers, and it runs constantly in the background, even when nobody is playing. The seed comes from changing system values and is refreshed all the time. Each round takes three steps:
- Seed: the generator takes a fresh seed from changing system values.
- Calculate: it produces the next number with a fixed algorithm.
- Map: the number is turned into a symbol, a card or a pocket.
The RNG does not store past results. Each number is generated on its own, so there is no hot or cold streak to follow.
How RNGs work in each game type
The same tested algorithm drives every game type; what changes is how its numbers are mapped to results.
| Game | What the RNG decides | Typical return or edge |
|---|---|---|
| Slots | A stop position on each virtual reel | RTP set by each game's paytable |
| Blackjack | The order of the virtual deck, reshuffled every hand | Lowest edge of the common games with basic strategy |
| Roulette | One of 37 pockets (European) or 38 (American) | Lower edge on European, higher on American |
| Crash games | The crash multiplier, set before the round starts | RTP set by the studio |
| Keno | 20 numbers drawn from 80 | Highest edge in classic versions; often far lower online |
| Instant games | The whole result, the moment you tap | RTP set by the provider |
Slots
The RNG picks a stop position on each virtual reel strip at the moment you spin. A 5-reel, 3-row slot has millions of possible combinations, and the RNG selects one. Check the RTP in the game's info screen.
Blackjack
The RNG shuffles a virtual 52-card deck before every hand, which makes card counting impossible. With basic strategy, a standard game has one of the lowest house edges in the casino.
Roulette
The RNG picks one of 37 pockets on a European wheel or 38 on an American wheel, each spin independent of the last. The house edge is lower on European roulette than on American roulette, because the American wheel adds a double zero.
Crash games
The RNG sets the crash point, for example a low multiplier or a very high one, before the round begins. Many crash games are provably fair: they publish a cryptographic hash of the result in advance, so you can check it afterwards. A typical crash game returns most of each stake over time, and the house keeps the rest.
Keno
The RNG draws 20 numbers from 80. Payouts rise sharply as you match more numbers. Classic keno carries a much higher house edge than slots or roulette, though many online versions are set much lower; check the game's RTP.
Instant games
The RNG settles the whole result, such as a scratch card, the moment you tap. RTPs vary by provider.
How RNGs keep games fair
An RNG removes human control from the result. No casino staff member or player can steer an outcome, and every player faces the same odds. Without one, digital casino games could not be trusted.
Testing and certification
Independent labs verify that the RNG output is random. They run statistical analysis, randomness checks and simulations of millions of rounds. The three best-known labs are eCOGRA, iTech Labs and Gaming Laboratories International (GLI). A casino with certified games often shows the lab's seal on its site; licensed casinos also have their games re-tested regularly.
Can you beat an RNG?
No. An RNG's output is independent and unpredictable, for five reasons:
- Unpredictability: the output shows no pattern to detect.
- Speed: millions of numbers a second rule out timing tricks.
- Independence: no memory of past results, so streak betting fails.
- Regulation: labs such as eCOGRA test the RNG regularly.
- Cryptography: modern RNGs use cryptographic functions that block reverse engineering.
Skill still matters in blackjack and poker. It does not change the RNG, but correct decisions lower the house edge.
Choosing a casino with reliable RNGs
- Licensing: regulators such as the Malta Gaming Authority require regular RNG testing. A valid licence is the most important check.
- Testing: look for certification from labs such as eCOGRA or iTech Labs.
- Reputation: player reviews show how fair a casino feels in practice.
- Transparency: casinos that publish RTPs and testing details have less to hide.
- Game studios: established studios such as Microgaming, NetEnt and Playtech build certified RNGs into their games.
Using RNG maths when you play
Every RNG game comes with an RTP, a house edge and payout ratios, and the edge holds steady over thousands of rounds. Four ways to use that:
- Compare RTPs before you pick a slot: a slot with a higher published RTP returns more over time than one with a lower RTP.
- Choose European roulette over American: a lower edge beats a higher one.
- Check keno's RTP: classic versions carry a much higher edge, which drains a budget fast.
- Use basic strategy in blackjack to bring the edge down to its lowest level.
Set a budget before you play, because the RNG makes sure the house edge holds over time. Treat every round as independent, and stop at a fixed limit: no betting system beats a negative expected value. Our bankroll management guide shows how.
Where RNG technology is heading
- Better randomness: newer algorithms draw on larger entropy sources.
- Blockchain: public ledgers can record each result so players can verify it, as provably fair games already do.
- Virtual reality: RNGs will drive results in interactive virtual casinos.
- AI monitoring: AI models can watch RNG output for anything unusual.
What the seed does on a phone
A pseudo-random number generator on a mobile casino starts from a seed, which is a number the algorithm uses as its first input. The seed is drawn from entropy the server collects, such as timing noise. The game client on the phone does not choose the seed.
The casino server applies the algorithm to that seed and sends the mapped result to the handset. The seed changes for each round, so the next spin does not continue a sequence the player can watch on screen. A pseudo-random number generator still follows fixed steps. A laboratory can replay a recorded seed and match the published result.
Casino software refreshes the seed so the sequence does not repeat. Players cannot supply a seed on a standard mobile slot, blackjack table or roulette wheel.
How a raw number becomes a game result
The generator produces a raw integer. The game then maps that integer onto a result the rules already define. Mapping is a separate step from generating the number.
A slot uses a reel strip with a fixed count of stops. The integer is reduced to a position on that strip, and the symbol on that stop is what the phone shows. Blackjack maps the integer onto the cards still in the shoe, so the next card is one draw from what remains. Roulette maps the integer onto 37 pockets on a European wheel or 38 pockets on an American wheel. The pocket count is a rule of the wheel. The generator only picks an index inside that count.
Crash games map the integer onto a multiplier curve the studio publishes. Keno maps it onto a draw from a fixed pool of numbers. Instant games map it onto a prize table with stated odds for each prize. The house edge sits in the mapping and the paytable. Two games can share one generator and still pay differently.
What an independent RNG test checks
An independent test lab receives the generator, or a build the operator identifies as the live one, and runs a large set of outputs. The lab checks that those outputs pass statistical tests for uniformity and independence. eCOGRA, iTech Labs and Gaming Laboratories International are the names most often printed on mobile casino certificates.
A certificate names the product and the build. The certificate does not name every game the casino later adds. The test also checks that the mapping matches the rules the studio filed: reel lengths, deck composition, pocket count or prize weights.
A generator can be uniform and still feed a paytable with a high house edge. The certificate says the device behaves like the filed maths. A seal in the lobby points at that paperwork. The seal is not a live reading of the last spin.
What an RNG certificate does not decide
A certificate does not remove the house edge. European roulette still has 37 pockets and a payout built for 36, so the edge on an even-money bet is higher than on the European wheel. American roulette still has 38 pockets, so the edge on the same bet stays higher. Blackjack still depends on the rules and on basic strategy. The low blackjack edge holds only when those rules and that strategy both apply.
A certificate does not make streaks meaningful. The generator keeps no count of recent results, so a run of losses is not a signal that a win is due. Classic keno still draws 20 numbers from 80 in the form that carries a much higher house edge. Many mobile keno paytables are milder. The paytable is what you compare, and the generator brand does not change it.
A certificate does not set your stake. The edge applies to every round you choose to play, and a larger stake only scales the same percentage. A budget and a stop point sit outside the generator.
How a random number generator is built
A random number generator is built from three working parts. The first part is the state, a block of memory that holds the current value and any internal counters the algorithm needs. The second part is the update step, a fixed mathematical rule that moves the state forward each time a number is requested. The third part is the output step, which takes the state and returns a number that the game can use. Each part is ordinary software, so the generator is only as sound as its code and its tests.
The state never resets to a value that players can see. When a game server starts, the generator is initialised from entropy, which is the unpredictable input the system gathers from timing noise, input events and hardware counters. Casino software treats that initial value as sensitive data, because anyone who learned it could reproduce the sequence that follows. For that reason the seed stays on the server and is not sent to the handset in readable form.
The update step runs constantly. A game server asks for numbers thousands of times while the platform is live, including periods when no player is at a table or spinning a reel. Because the generator keeps moving, the value a player sees at any given moment depends on a state that changed many times before the request arrived. Timing alone therefore tells an observer nothing useful about the next outcome.
The output step decides how much of the internal state leaves the generator. Well designed generators discard part of their state before they release a number, so an observer who sees a long run of outputs cannot work backwards to the state. This property is one reason modern casino generators use cryptographic constructions rather than simple arithmetic alone.
What the period of a generator tells you
The period is the number of values a generator produces before its sequence starts to repeat. A short period would let a determined analyst find the cycle, so generators used in casino games are designed with very long periods. A long period does not by itself make a generator fair. The output also has to pass statistical tests for uniformity and independence, which the period alone cannot prove.
Testing therefore covers more than length. A lab checks whether the values spread evenly across their range, whether successive values show any link to each other, and whether groups of values appear more often than chance would allow. A generator that fails any of these checks is not certified for live play, however long its period.
Why streaks and patterns do not predict results
A streak is a run of similar results, such as several losing spins in a row. Players often treat a streak as evidence that a win or loss is due, a pattern that researchers call the gambler's fallacy. A random number generator does not keep count of recent outcomes, so a streak has no effect on the next result. Each round starts from the current state and produces an outcome that the generator has not yet produced.
Streaks still happen. Independent random events produce runs of every length, and short runs of losses or wins appear in any long sequence of results. A player who watches a few rounds sees a small sample, and small samples look patterned even when the source is random. The sample is too short to show the long-run rate that a game's published return describes.
Long-run and short-run results answer different questions. The long-run rate describes what a game returns across a very large number of rounds. The short-run result describes a few rounds and carries most of the randomness. A game can have a stable long-run return and still produce a losing session, because the rounds in that session were drawn from the same distribution as every other session.
What volatility means for your session
Volatility describes how spread out the results of a game are around its average return. A high volatility game pays small amounts rarely and occasionally pays large amounts. A low volatility game pays more often and in smaller sizes. The random number generator behaves the same way in both cases. The difference sits in the paytable and in the frequency of winning combinations that the mapping step produces.
The practical effect falls on your bankroll rather than on the odds. A high volatility session can run a long way below its starting balance before a large payout arrives, and it can also end quickly if no large payout comes. A low volatility session moves more gently. Neither style changes the game's return over many rounds. It changes how the path to that return feels from one hour to the next.
Before choosing a game, read the information screen for its volatility label and its maximum win. Those two values describe the shape of the results you should expect. They do not tell you which spin will pay, because each spin is still independent of the last.
Reading a game's information screen
Every licensed mobile game has an information screen that describes the rules the random number generator is applied to. The screen usually lists the return to player, the volatility, the bet range and the maximum win. Some games also show the hit frequency, which is how often a spin returns any win at all. Each item describes a rule of the game rather than a prediction of the next round.
The return to player is the long-run share of wagers that the game pays back. It is calculated from the paytable and from the mapping of random numbers to symbols, so a studio's figure is a property of the game's design. Two games from the same studio can carry different figures because they use different paytables. The random number generator is the same tested component in both.
The bet range matters as much as the return. A game with a high minimum stake can lock out a small budget, and a game with a high maximum bet can drain a balance quickly if the stake is set too high. Check the bet range before you start, then choose a stake that keeps the session comfortable through several losing stretches.
Common myths about random number generators
A widespread belief holds that a machine is due for a win after a long losing run. The generator does not track losses, so no machine is due in that sense. Each spin is drawn fresh from the same distribution.
Another belief says that playing at a certain time of day changes the odds. The generator runs continuously on the server, and the clock on the phone has no influence on the result. Time of day can change how long you stay in a session, which is a different matter.
A third belief says that a game turns cold after a big win. The next spin draws from the same distribution as the spin before the big win. A large payout does not reduce the chance of the next payout, and it does not raise it either.
Some players believe that changing the bet size between spins changes the odds. The odds of each outcome stay the same for a given bet. A larger bet raises both the potential win and the potential loss, in proportion. The sizing decision belongs to your budget, not to the generator.
What a random number generator cannot protect you from
The generator makes each result fair in the sense that the game follows its published rules. It does not protect your bankroll. A fair game still returns less than it takes over time, so every session carries a cost that grows with the number of rounds you play.
The generator also does not control the terms of a bonus. A bonus with wagering requirements asks you to bet a multiple of the bonus before you can withdraw it, and the generator has no role in whether those bets are reasonable. Read the terms and calculate the total stake before you accept an offer.
Account security is a separate matter. A strong password, two-factor login where it is offered, and caution with links in messages protect your balance from unauthorised access. None of that depends on the random number generator, and a compromised account can be drained whatever the fairness of its games.
Connection quality is a final practical point. A dropped connection during a round is handled by the casino's rules for interrupted games, which are set out in its terms. Check those terms before you play on an unstable network, because the rules decide how an unfinished round is settled.