Saved

Press the star next to a tool's name to save it.

All my tools

Monty Hall Problem Calculator

Use this Monty Hall problem calculator to find the chance of winning the car by staying or by switching, for three doors or any number, and for a host who does not know.

Restored your last values ·

Leave the boxes empty for the classic game with three doors. Or enter more doors, and how many the host opens, to see how the chances change. The calculator shows the chance of winning the car if you stay with your first choice, and if you switch to one of the other unopened doors.

Everything is worked out in your browser. Nothing you type is sent anywhere.

–

–

Enter the number of doors and the doors that the host opens, or leave them for the classic game, then press Calculate.

See full result

A Monty Hall problem calculator shows why you should switch doors. In the classic game, you pick one of three doors, with a car behind one and goats behind the other two, and the host opens a goat door and offers you a switch. Switching wins the car two times out of three. The calculator gives the chance of winning by staying and by switching for any number of doors and any number of doors that the host opens, and for a host who opens doors at random. It runs in your browser.

How to use the Monty Hall problem calculator

  1. Leave the boxes empty for the classic game, or enter the number of doors and the doors that the host opens.
  2. Choose the host's rules.
  3. Press Calculate.

The problem and the answer

The Wikipedia article on the Monty Hall problem states the game: you pick door 1, the host opens door 3 to show a goat, and offers you the chance to switch to door 2. It gives the answer: by the standard assumptions, switching has a 2/3 chance of winning the car, while keeping the first choice has only 1/3.[1] The standard assumptions are that the host always opens a door that you did not pick, always opens one that shows a goat and never the car, and always offers the switch. If you picked the car, the host chooses between the two goat doors at random.[1] The car is placed behind each door with equal chance.

Why switching works

The page gives a table of the three cases, with the car equally likely to be behind each door. If you stay, you win in one case out of three, and if you switch, you win in two.[1] Another way to see it is that your first choice has a 1/3 chance of being right and that never changes, so the other two doors together have 2/3, and the host's opening of a goat door passes all of that to the one that is left. The page quotes the view that switching is the same as taking both of the doors that you did not pick.[1] The conditional calculation agrees: the chance that the car is behind door 1 and the host opens door 3 is 1/3 × 1/2 = 1/6, and that the car is behind door 2 and the host opens door 3 is 1/3 × 1 = 1/3, so door 2 is twice as likely.[1]

More doors

The idea is clearer with many doors. The page's version has a million doors, in which you pick one and the host opens all of the others except one.[1] Your door still has a chance of 1 in a million, so the one that is left has the chance of 999,999 in a million. The calculator gives this result for 1,000,000 doors with 999,998 opened: staying wins 0.0001 percent, and switching wins 99.9999 percent.

The general formula

For n doors, with the host opening p goat doors, staying wins with a chance of 1 ÷ n. If you switch to one of the n − p − 1 other doors that are still closed, chosen at random, the chance is ((n − 1) ÷ n) × (1 ÷ (n − p − 1)). This is our own working from the same reasoning: the car is somewhere among the other n − 1 doors with a chance of (n − 1) ÷ n, and the host's openings leave n − p − 1 candidates. For 3 doors and 1 opened, it is 2/3. With 100 doors and 1 opened, switching wins 99 ÷ 98 of 1 percent, which is only about 1.01 percent, so the advantage of switching is small. With 4 doors and 2 opened, it is 75 percent.

A host who does not know

The answer changes if the host does not know where the car is, and opens a door at random. The page says that the argument for equal chances would be true if the host selected a door at random.[1] In that case, if the doors that the host opens happen to show goats, the remaining closed doors, including yours, are all equally likely, each with a chance of 1 ÷ (n − p). For three doors and one opened, it is 1/2 for staying and for switching, which is our own derivation. The calculator offers this as the second host rule.

Why people find it hard

Most people think that, with two doors left, the chances must be 1/2 each. That would be true if the host had picked a door at random. The host's knowledge is the difference, as he never opens the car, so his choice carries information. The page notes that the host's rules must be stated for the problem to have an answer, and the calculator lists them.[1]

Playing it yourself

The best way to believe the answer is to play. Take three cards, one an ace for the car, and have a friend deal them face down. Pick one, let your friend turn over a card that is not the ace, and always switch. Over 30 games, you should win about 20 times. If you always stay, you should win about 10 times. The calculator gives the expected results for any number of games that you enter.

Common mistakes

  • Assuming 50/50. The host's knowledge breaks the symmetry.
  • Changing the rules. A host who sometimes does not offer the switch changes the answer.
  • Forgetting that your first pick keeps its odds. It stays at 1 in n.
  • Judging by a few games. Over many games the proportions appear.

What next

Use this often? Add Monty Hall P to your Home screen.

Frequently asked questions

What is the Monty Hall problem calculator?

A tool that gives the chance of winning by staying or by switching in the Monty Hall game, for any number of doors.

What is the Monty Hall problem?

A game in which you pick one of three doors, the host opens a goat door, and you may switch. Switching wins the car with a chance of 2/3.

Why should I switch in the Monty Hall problem?

Your first pick has a 1/3 chance that never changes, so the other two doors have 2/3, and the host's opening passes it all to the remaining door.

What if there are 100 doors?

If the host opens 98 goat doors, switching wins 99 percent of the time and staying 1 percent.

What assumptions does the answer need?

The host always opens a door that you did not pick, always shows a goat and always offers the switch.

What if the host does not know where the car is?

If he opens a door at random and it shows a goat, staying and switching are equally likely to win.

What went wrong?

We only receive the reason you pick, never what you typed into the tool.

Thanks for your feedback.

More Math Tools