Bulls and Cows (Number Guessing)
Crack the secret number from strike-and-ball clues
Loading the tool…
A number guessing game, also called Bulls and Cows or number baseball, in which you find a hidden number from bull and cow clues. You can guess the computer's number, let the computer guess yours, or play against another person on one device.
How to use
- Under "Mode", choose "Guess my number", "Computer guesses" or "Two players".
- Set the "Number of digits" (3 to 5), "Allow repeated digits" and "Allow 0", then press "New game".
- Type a number and press "Guess"; each result is added to "Guesses". Mark digits on the "Memo board" to keep track of what you have ruled out.
- In "Computer guesses", write your number on paper. For each guess, enter the bulls and cows and press "Send answer".
How it works
- A bull (S) is a right digit in the right place, a cow (B) is a right digit in the wrong place, and out means no digit matches.
- The computer guesses a number that still fits all answers and leaves the fewest possibilities in the worst case. If your answers contradict each other, it tells you.
- The current game and the best score for each set of rules are saved in this browser.
Questions and answers
- How do you score bulls and cows?
- If the secret is 427 and the guess is 724, the 2 is in the right place (1 bull) and the 4 and 7 are in the number but in other places (2 cows).
- How many possible numbers are there with 3 digits?
- With no repeats and the digits 1 to 9, there are 9 × 8 × 7 = 504 numbers; with 0 allowed, 10 × 9 × 8 = 720. Switch on "Show how many numbers are still possible" to see how many remain after your guesses.
- How does the two-player mode work?
- Each player hides a number, then you pass the device and take turns guessing. Player 2 always gets the same number of turns as Player 1, and finding both numbers in the same round is a draw.