What is a Bulls & Cows?
Bulls & Cows is a number puzzle in which you find a hidden five-digit number whose digits are all different, in ten guesses, with each guess answered only by counts: how many digits are in exactly the right place, how many are in the number but elsewhere, and how many are absent.
Also known as: Mastermind with digits, cows and bulls, digit guessing game.
How do you solve a Bulls & Cows?
- 01
Open with two guesses that cover all ten digits
Two five-digit guesses with no digit in common test every digit once. The present counts from those two rows tell you how the five secret digits are split between the two sets, which is the foundation for everything after. Zero from one row means all five secret digits are in the other.
- 02
Move digits, do not swap sets
Once you know a set contains, say, three of the secret digits, find out which by carrying that set forward and replacing one digit at a time with a digit known to be absent. The present count drops by one exactly when the digit you removed was a secret digit.
- 03
Use the bull count to fix positions
When the present count is stable and only the bull count changes between two rows, the difference is caused by the digits you moved. Shifting a single digit into a new column and watching the bulls go up or down by one places that digit without disturbing anything else.
- 04
Keep the notes tidy
Because the game reports nothing about which digit scored, a written table is essential: for each digit, whether it is in, out or unknown, and which columns it has been ruled out of. Every row should be a deliberate test with a predicted result, so that the actual result confirms or eliminates a hypothesis.
- 05
Finish with arrangements
With the five digits known, the endgame is ordering them, and the bull count alone is the signal. Each guess is a permutation; choose one that disagrees with your previous guesses in as many columns as possible, and the bull counts across three or four rows determine the order.
Common Bulls & Cows mistakes
- Repeating a digit within a guess. It is not allowed, since the answer's digits are distinct, and the game refuses the row.
- Starting with a zero. A five-digit number cannot begin with zero, so the guess is refused, though zero may sit in any other column.
- Changing several things at once. Altering three digits between rows produces counts you cannot attribute, and the row is wasted.
Where does Bulls & Cows come from?
Bulls and Cows is a pencil-and-paper game that predates computers. One player writes down a secret number with no repeated digits; the other guesses, and each guess is scored with bulls, the digits right in place, and cows, the digits present but misplaced. It directly inspired Mastermind, the peg-and-board version devised by Mordecai Meirowitz in 1970.
This site's Bulls & Cows is its own implementation of the classic. The secret is five distinct digits with no leading zero, and every guess must be the same. Nothing is coloured while you play: a row is answered with three numbers, and the deduction is entirely yours. With over twenty-seven thousand possible answers and only counts to go on, the budget is ten guesses.
How many guesses do you get in Bulls & Cows?
Ten. Counts carry far less information than coloured tiles, and there are over twenty-seven thousand five-digit numbers with distinct digits, so a six-guess budget would be unreasonable.
Is Bulls & Cows free, and when does the number change?
It is free and needs no sign-up. A new number is set every day at midnight UTC, and a timed mode lets you solve as many as you can against the clock. An account is only needed for the leaderboard. It plays on a phone as well as a desktop.

