How to Play Bulls and Cows
To play Bulls and Cows, guess the four-digit code the computer has hidden. Every guess uses four different digits, and it is scored in bulls — digits right and in the right place — and cows — digits in the code but in the wrong place. Use each score to rule codes out, and name the whole code, four bulls, within ten guesses.
The rules, step by step
- 1The computer hides a codeFour different digits from 0 to 9 in Numbers, a leading zero allowed, or four pegs from six colours in Colours, where a colour may repeat.
- 2Every guess is scored in bulls and cowsA bull is a right digit or colour in the right place; a cow is one that is in the code but in a different place.
- 3Guess four different digitsIn Numbers every guess must use four different digits too. A repeated digit is refused as you type it and never costs a guess.
- 4Count repeated colours onceIn Colours each peg of the code can be matched only once, bulls first: two Reds in a guess against one Red in the code earn one match between them.
- 5Crack it within ten guessesFour bulls wins. If the tenth guess still falls short the game ends and the code is shown, so you always see what you were chasing.
- 6Keep notes, and take a hint when stuckTap a digit or colour in the notes strip to rule it out or confirm it. Hint fills in a guess that fits every score so far.
Try it — the rules above, running
New game hides a fresh code in the mode you last chose — Numbers, four different digits, or Colours, four pegs from six colours — and the three-dot menu switches mode and holds today’s shared code. Hint fills in a guess that fits every score so far; press Enter to play it. Tap a digit in the notes strip once to rule it out and again to mark it confirmed.
Your statistics · Numbers
- Played
- 0
- Won
- 0
- Win rate
- 0%
- Streak
- 0
- Best streak
- 0
- Best time
- —
- Fewest guesses
- —
How a guess is scored
- Bull — the right digit in the right place.
- Cow — a digit in the code, but in a different place.
Today’s code
Everyone who opens today’s game gets the same secret code — one for Numbers and one for Colours — and it changes at midnight UTC.
Keyboard
- 0 – 9
- Type a digit
- Backspace
- Delete the last one
- Enter
- Play the guess
- H
- Hint
- Shift + key
- Cycle its note
- N
- New code
- F
- Full screen
How does a game of Bulls and Cows go?
- 1Choose Numbers or ColoursNumbers hides four different digits; Colours hides four pegs from six colours, repeats allowed. The three-dot menu switches between them, the choice is remembered, and each mode keeps its own statistics.
- 2Make an opening guessAny four different digits open a Numbers game equally well. In Colours a pair and two singles, such as Red Red Yellow Green, splits the codes best.
- 3Read the scoreGold studs are bulls and hollow rings are cows. Bulls plus cows says how many of your digits are in the code; bulls alone says how many are already in place.
- 4Mark what you have learnedTap a digit in the notes strip once to rule it out and again to confirm it. The keys of the pad show the same marks, so a ruled-out digit is never typed by accident.
- 5Guess again, keeping every score trueThe strongest next guess is one that could still be the answer — one that would have produced every score on the board. The hint always proposes one.
How do you score a guess by hand?
On paper one player holds the code and scores the other's guesses. This is the whole procedure, and it works for colours with repeats as well as for digits.
- 1Count the bullsCompare the guess with the code position by position. Every position where they agree is a bull.
- 2Count the matches, symbol by symbolFor each digit or colour, take the smaller of how many times it is in the code and how many times it is in the guess, and add those numbers up.
- 3Subtract to get the cowsMatches minus bulls is the number of cows. With four different digits that is simply the digits in the code but out of place.
Why does three bulls and one cow never happen?
Because the fourth symbol has nowhere to be a cow. If three positions are right and the fourth guessed symbol is somewhere in the code, it can only be in the one position the bulls have not claimed — its own — and that makes it a bull. Of the 15 ways to share out up to four markers between bulls and cows, it is the only one that cannot occur, so either mode has exactly 14 possible scores.
How do two people play Bulls and Cows on paper?
Each player writes down a secret four-digit number with no repeated digit and keeps it hidden. They take turns calling out a guess at the other's number, and the owner answers with the count of bulls and cows — never which digits they are. The first to score four bulls wins. This board plays the code-holder's part for you: every guess is scored instantly, and it never makes an arithmetic slip.
How do you win more often?
- Welcome a score of nothing0 bulls, 0 cows on a Numbers opening happens for 360 of the 5,040 codes and clears four digits with one guess: everything left is built from the six you did not play. It is the most useful bad-looking score in the game.
- Settle which digits before where they goBulls plus cows says how many of your four digits are in the code, whatever their order. Pin down the set first — swapping one or two digits between guesses shows which ones count — and only then spend guesses on positions.
- Change one thing at a time to find a bullWhen a guess scores a bull, keep three digits where they are and move or change the fourth. If the bull disappears you have found it; if it stays you have ruled out a position. One change per guess keeps every score readable.
- Play codes that could be the answerA guess that fits every score so far can win outright, and it is what the hint always proposes. Played that way on every turn, each of the 5,040 Numbers codes falls within eight guesses, 5.32 on average.
- Open Colours with a pair and two singlesFollowed by the hint's own choices, an opening of Red Red Yellow Green cracks the 1,296 codes in 4.42 guesses on average, against 4.45 for four different colours, 4.46 for two pairs and 4.56 for three of one colour.
Common questions about bulls and cows
- What is a good first guess in Bulls and Cows?
- In Numbers, any four different digits — every opening is the same position with the digits renamed. In Colours, a pair and two singles such as Red Red Yellow Green: followed by the hint's own choices it averages 4.42 guesses over all 1,296 codes, against 4.46 for two pairs.
- How many guesses should it take to crack a code?
- Following the hint on every turn cracks a Numbers code in 5.32 guesses on average and never more than eight; perfect play averages about 5.21 and never needs more than seven. Ten guesses leaves room for a few spent gathering information.
- How is Bulls and Cows different from Word Guess?
- Word Guess marks every letter of a real word, position by position. Bulls and Cows gives only totals, so you learn how many digits are right without being told which ones — less to go on, and purer deduction.
Ready to stop reading? Play bulls and cows on the full board, with controls and statistics tailored to that game.