BestNo record

The digits never repeat, and the first digit can be 0

Type a 3-digit number and submit it

Type with the number keys · Enter to submit · Backspace to delete a digit

Bulls and Cows — Number Guessing Game

Use bulls and cows clues to crack a 3-, 4- or 5-digit code. Different digits, zero allowed first, unlimited guesses.

More Games

All ›
Advertisement
Advertisement

How to Play Bulls and Cows Online

In Bulls and Cows, you find a hidden code by comparing each guess with the clues it returns. A bull means the digit and its position are both correct; a cow means the digit is present but in a different position. This version gives you a computer-generated code with 3, 4 or 5 different digits, allows a leading zero, and has no guess limit. Match every position to win.

Choose a length, enter a full guess with the on-screen keypad or number keys, then press Submit. On a keyboard, Enter submits unless a button or link has focus; Backspace removes the last digit. Repeated digits are refused; an incomplete guess is not submitted. Neither creates a history row or spends a guess.

Read the clues · Worked guessing history · A deduction strategy · Possible answers · Controls and records · Versions and common mistakes

The code stays fixed for that round of Bulls and Cows. Choosing another length or New game replaces it and clears the current history. There is no countdown, daily shared code, multiplayer room, solver or hint button on this page. Give up reveals the answer and ends the round without updating your best score.

What Bulls and Cows Feedback Means

FeedbackWhat it tells youWhat it does not tell you
BullA guessed digit is in its correct positionWhich digit, unless other clues establish that
CowA guessed digit appears in another positionWhere it belongs
OUTNone of the guessed digits appear in the codeWhich of the untested digits are present

Bulls and cows count different matches: one digit is never both in the same result. Add the two counts to find how many guessed digits appear anywhere in the code. OUT is shown when that total is zero, not when just one of your guessed digits is absent. The live table omits bull or cow labels with a zero count; that does not make the row incomplete.

For example, suppose the three-digit secret is 427 and you guess 472. The 4 matches the first slot, giving one bull. The 7 and 2 are present in other slots, giving two cows. The result is 1 bull, 2 cows. From that feedback alone, however, you do not know that 4 is the correct slot: 274 or 742 could give the same response to 472.

A leading zero is a real digit in this Bulls and Cows game. 047 is a valid three-digit code, not a two-digit number with decorative padding. If it is the secret, 407 produces one bull and two cows. Keep all three positions when writing down or entering candidates.

A Bulls and Cows Guessing History, Step by Step

This Bulls and Cows teaching example uses the fixed secret 427. Your random round may have a different answer; the sequence is not a universal four-guess solution. The table is in chronological order, while the game's live history puts its newest row first.

GuessBullsCowsWhat you can conclude
89000 — OUTEliminate 8, 9 and 0 entirely
47212All three digits are present; the remaining arrangements are 427, 274 and 742
489108 and 9 are already excluded, so the bull must be 4 in the first slot. Only 427 remains
42730All positions match; the round is won in four valid guesses

Notice what makes the third Bulls and Cows guess useful. It isolates one position with the already excluded 8 and 9 as fillers, rather than simply repeating 472. Although 489 cannot be the answer, it is a legal guess with different digits. Keep a candidate only if it reproduces every earlier result: 274 and 742 match the second row, but both would return zero bulls and one cow for 489.

You can rehearse the reasoning on paper, then apply it to your own history. This page does not let you set a custom secret for a practice round. The first OUT above demonstrates elimination; once the second guess identifies all three digits, that OUT adds no further positional information.

A Practical Bulls and Cows Strategy

Before submitting a Bulls and Cows guess, ask what it will test: new digits, a suspected position, or a choice between remaining candidates. A valid guess that is identical to an earlier one spends another attempt and returns the same clues, so use the history instead of asking the same question again.

For a four-digit Bulls and Cows opening, 0123 and 4567 test disjoint sets. Add the bulls and cows in each result to count how many secret digits came from those sets. The number drawn from 8 and 9 is four minus those two totals. This identifies a quantity, not necessarily the individual digits or their positions, and it is an optional opening rather than a proven optimal strategy.

Once the digit set in Bulls and Cows is known, rearranging it tests positions. A result of zero bulls means every tested position is wrong even if all digits are present as cows. If you change only two positions and gain two bulls, both of those moved digits have reached their correct positions; the untouched slots explain no change in the count.

An OUT can be useful in Bulls and Cows because it rules out every digit in that guess. It is not always the best possible result, and you do not need to force an OUT before making progress. If the clues already identify a digit, spending further guesses to prove it again may add little information.

When stuck, write a few remaining candidates beside the history and score each against the previous guesses. Discard any mismatch. The worked example shows why a one-bull result does not identify its bull by itself. These habits make the reasoning explicit; they do not promise a measured average, an optimal first guess or a fixed number of attempts to win.

How Many Bulls and Cows Answers Are Possible?

There are ten choices for the first digit, including zero, then one fewer choice for each later slot because repeats are forbidden.

Selected lengthStarting candidate count
3 digits10 × 9 × 8 = 720
4 digits10 × 9 × 8 × 7 = 5,040
5 digits10 × 9 × 8 × 7 × 6 = 30,240

Bulls and Cows has a finite answer set here. Because attempts are unlimited, listing all legal candidates and testing each once would eventually find the answer in at most that many valid guesses. That is a deliberately inefficient exhaustive method, not a claim that the strategy above is optimal. Using feedback can eliminate candidates before you submit them.

Start with three digits if tracking positions feels difficult. Four and five digits add bookkeeping, not new feedback rules. The candidate counts above describe this version with a leading zero allowed; a game that forbids zero in the first slot has a different starting pool.

Bulls and Cows Controls, Results and Personal Records

Use the Bulls and Cows page's number keypad on a phone. On a computer, number keys enter digits, Backspace deletes, and Enter submits. If focus is on a button or link, Enter activates it instead; use Submit to send the guess. Typing in another text field does not enter game digits. Once all slots are full, delete a digit before replacing it.

A Bulls and Cows win shows the number of valid guesses and elapsed time. Time begins with the first accepted digit and ends on the winning submission; it is not a countdown or a speed requirement. Only the fewest valid guesses is saved as your personal best, separately for 3, 4 and 5 digits. A faster round with more guesses does not beat that record.

The first completed round establishes a best. New Best means you later used fewer guesses than that length's saved result; tying it does not count as an improvement. Give up, New game or a length change does not store an unfinished round as a win. Records live in the current browser when storage is available, with no account sync or global ranking; clearing site data can remove them.

Play again starts another round of Bulls and Cows with the current length. Share uses the device's sharing feature or attempts to copy your result and link; it does not send your active board to an opponent. Reloading does not restore the current secret and history.

Bulls and Cows, Number Baseball and Rule Variants

“Number Baseball” is a name used for a related digit-deduction game with strikes and balls. This page uses the familiar English bulls and cows terms: a bull corresponds to a correct digit and position, a cow to a correct digit elsewhere. Those names identify a rules family, not one uniquely branded product. Check each website's settings rather than assuming every version has identical rules.

Some Bulls and Cows games use four digits only, forbid a leading zero, allow repeats, limit attempts or give everyone a daily puzzle. Mastermind-style games may use colours and repeated symbols. Those changes affect clue interpretation and the candidate count. This version uses different digits, allows zero first, offers 3/4/5 slots, and has unlimited attempts. An online solver or another site's multiplayer feature is not built into this page.

Common mistakes are dropping a leading zero, treating a cow as a known position, ignoring an older clue, or confusing an incomplete/repeated input with a valid unsuccessful guess. If you are unsure, compare the full history before adding a row. For a different deduction-free challenge, try the reaction-time test; for a number puzzle based on arithmetic, try the Apple Game.

Bulls and Cows FAQ

How do you play Bulls and Cows online?

In Bulls and Cows, enter a guess with the selected 3, 4 or 5 different digits and press Submit. A bull means the digit and position match; a cow means the digit is present elsewhere. Keep comparing the clues until every position matches. This version has no guess limit and allows a leading zero.

Can Bulls and Cows start with zero?

Yes, this Bulls and Cows version allows it. A code such as 047 is a valid three-digit answer, with zero occupying the first slot. Other websites may forbid a leading zero, so their candidate counts or strategies may use different rules.

Can I repeat digits or an earlier guess in Bulls and Cows?

Digits cannot repeat within the secret or within one guess. A duplicate input is refused, and an incomplete entry is not submitted; neither spends a guess. You can submit the same valid guess again in a later row, but it counts as another attempt and returns the same clues for the unchanged secret.

What does 1 bull and 2 cows mean in Bulls and Cows?

Exactly one guessed digit matches its position and two other digits are present elsewhere. For a three-digit guess of 472, the secret could be 427, 274 or 742. The clue alone does not identify which digit is the bull; use earlier rows or a new guess to distinguish those candidates.

What does OUT mean in Bulls and Cows?

OUT means none of the digits in that guess appear anywhere in the secret. It is not shown merely because one digit is absent. The live table also omits individual bull or cow labels when their count is zero, so a missing label means zero of that match type.

How many guesses do I get in Bulls and Cows?

Attempts are unlimited here. A wrong but valid guess adds a history row and lets you continue; it does not trigger a fixed-attempt loss. The round ends when you solve the code, give up or start a new round. There is no countdown.

How many Bulls and Cows answers are possible?

With distinct digits from 0 to 9 and zero allowed first, there are 720 three-digit answers, 5,040 four-digit answers and 30,240 five-digit answers. These are ordered arrangements, so 047 and 407 are different candidates. A ruleset that forbids a leading zero has a smaller pool.

Is there a guaranteed Bulls and Cows strategy?

An exhaustive Bulls and Cows search guarantees an eventual answer here: test each legal candidate at most once and the finite answer set must contain the secret. Choosing an untried candidate consistent with all previous clues can eliminate others sooner. This does not establish an optimal method, an average guess count or a promise to win in a small fixed number of guesses.

Is Bulls and Cows the same as Number Baseball or Mastermind?

They are related code-breaking games, not one uniquely branded product with identical settings. Number Baseball uses strike and ball terms for positional and misplaced digits; this page uses bulls and cows. Mastermind-style games can use colours and repeated symbols. Check the version's length, zero and repetition rules before applying an example.

What counts as a Bulls and Cows best score?

Your fewest valid guesses in a completed round is saved separately for each length in the current browser when storage is available. The first win establishes a best; a later lower count earns New Best. A tie or a faster round with more guesses does not improve it. Elapsed time runs from your first accepted digit to the winning submission, but is not the saved ranking criterion.

Can I play Bulls and Cows on a phone or keyboard?

Yes. Use the on-screen number keypad on a phone. On a keyboard, digits enter the guess and Backspace deletes; Enter submits unless focus belongs to a button or link, which then receives Enter itself. Use the Submit button if unsure. Typing in a text field does not enter game digits.

Does this Bulls and Cows game have a solver or multiplayer?

No. This page is a single-player puzzle against a computer-generated code, with no solver, extra hint button, custom secret, daily shared puzzle or multiplayer room. Other sites may offer those features. Share sends or copies a result and page link, rather than creating an opponent's copy of the same round.

What happens when I restart or give up in Bulls and Cows?

Restarting Bulls and Cows with New game, Play again or another length creates a fresh code and clears the round's history. Give up reveals the current secret without saving a win or improving your best. Reloading does not restore the active round; saved best counts remain in the same browser unless its site data is cleared.