Bulls & Cows

A code-breaking puzzle: crack the secret 4-digit number in 10 guesses. Bulls mean right digit in the right spot, cows mean right digit but wrong position. Use the clues from each guess to narrow it down.

Guesses: 0 / 10

Enter your first guess, all digits must be different

How to use

  1. The game generates a secret 4-digit number with all unique digits (no repeats).
  2. Type any 4-digit guess (all different digits) and press Enter.
  3. Normal mode: 🐂 Bull = right digit, right position. 🐄 Cow = right digit, wrong position.
  4. Easy mode: each digit turns green (right spot) or yellow (wrong spot) like Wordle.

Bulls and Cows is a classic codebreaking game played with numbers. The computer picks a secret 4-digit number with no repeated digits and your job is to figure it out in 10 guesses. After each guess you get two clues: a Bull means a digit is correct and in the right position, and a Cow means the digit is in the number but in the wrong spot.

The game rewards systematic thinking. Your first guess should use four digits you have not tried yet, then you update your mental model after every clue. If a guess gives zero bulls and zero cows, you have just eliminated four digits entirely. Most players crack the code in 5 to 7 guesses with a logical approach, and getting it in three is considered very strong.

Frequently Asked Questions

What is the difference between a Bull and a Cow?

A Bull means you have the right digit in the right position. A Cow means the digit is in the secret number but placed in the wrong position.

Can the secret number start with 0?

Leading zeros are avoided so the number always reads as a proper 4-digit number.

How many guesses do I get?

You get 10 guesses to crack the 4-digit code.

How is this different from Mastermind?

Mastermind uses colors while Bulls and Cows uses digits. The logic is very similar but this version needs no physical board.

Bulls and Cows - Crack the 4-Digit Code | ToolHaven