Lança Moeda (cara ou coroa)

Determinístico por seed. 0 = cara, 1 = coroa.
Created by
Renato Passos, Eng. de Software
Reviewed by
Renato Passos, Eng. de Software

Last updated: Apr 18, 2026

Resultado
Coroa

Formula

0/1 pseudo-aleatório

About this calculator

This calculator simulates a coin toss, generating a deterministic result based on a seed provided by the user. The outcome is binary: 0 represents heads and 1 represents tails. Unlike purely random generators, this method allows the same result to be reproduced whenever the same seed is used, which is useful for testing, demonstrations, or situations requiring repeatability.

The result generation uses a deterministic pseudo-random algorithm, where the seed is processed by a hash function or linear congruential generator to produce a number between 0 and 1. If the value is less than 0.5, the result is heads (0); otherwise, it is tails (1). This ensures a uniform distribution and predictability for the same seed.

Use this calculator when you need to simulate a fair coin toss but with the ability to repeat the same outcome later. It is ideal for games, educational simulations, algorithm validation, or any scenario where randomness needs to be controlled and verifiable. The seed can be any integer, text, or combination.

Caution: the result is not cryptographically secure, as the algorithm is deterministic and predictable if the seed is known. For applications requiring true randomness (e.g., real gambling), use physical or cryptographic random number generators. Also, keep the seed secret if unpredictability is needed.

Frequently asked questions

What does seed mean and how do I use it?

The seed is an initial value that determines the result. You can enter any number or text. Using the same seed will always produce the same result.

Can I use this calculator for important real-life decisions?

Yes, but remember the result is deterministic. If you or someone else knows the seed, the outcome can be predicted. For decisions requiring unpredictability, use a truly random method.

What is the probability of heads or tails?

The probability is 50% for each, assuming a well-distributed seed. The algorithm is designed to be fair.

How many times can I toss the coin?

Each use generates a single result. For multiple tosses, use different seeds or repeat the query with the same seed (repeated result).

Is the result truly random?

No, it is pseudo-random and deterministic. If the seed is known, the result can be recalculated. Do not use for cryptographic purposes.

Other Probabilidade e Chances calculators