Doctor Strange is instrumental to the Avengers defeating Thanos in Avengers: Endgame. He’s seen it all go down more than 14 million times and knows that only one version of the future will bring them victory. He may have even messed with events from the past to ensure that the future they’re in will play out exactly as it needs to for them to win. One fan theory proposed that Strange spent 5,000 years looking at all these scenarios, and that he may have interfered with them while he was on Titan. It may have all seemed like just a few minutes, but he could have been in there for quite a while after creating a time loop that would let him explore all possible scenarios. But why did he stop at 14,000,605 futures? Why was he so specific? A beautiful new theory brings math into the movie to explain it all.

The simplest reason for Doctor Strange providing such a specific answer is that he wanted to make an impression on everyone else. Everything must happen according to a plan that only he’s privy to in order for them to beat Thanos. When you tell people they only have one chance in more than 14 million, it’s going to be pretty clear how difficult the task at hand truly is.

Another reason for Strange looking at 14,000,605 outcomes is that he stopped once he found one where they won. They don’t need more than one scenario, and he can travel back and forward in time to prepare the board for the final game. But Reddit user ArenLuxon posted an interesting theory a few days ago that says Strange looked at every possible situation that would give them a win.

To beat Thanos, the theory says, they might need a specific combination of heroes to survive the snap, and Strange may have been exploring every possible combination:

There are a total of 24 heroes fighting Thanos: Iron Man, Thor, Hulk, Captain America, Black Widow, Dr Strange, War Machine, Falcon, Spider-Man, Black Panther, Scarlet Witch, Bucky, Drax, Groot, Nebula, Star-Lord, Rocket, Loki, Heimdall, Mantis, Shuri, Okoye, Gamora and Vision. Of these 24, Heimdall and Gamora do not count, because they were already dead at this point. Endgame brings in two new heroes to replace them: Captain Marvel and Ant-Man. So we stay at 24 heroes. Yes, Loki is dead, but let’s face it, it’s Loki. If you don’t count him, you can still stretch things and say Eitri might be considered a hero too. He did make Stormbreaker after all, so he could be important in Endgame. In any case, we need 24 heroes for the math to work out.

Every hero can either die or live, which gives us 2*2*2… or 2^24 combinations, which is 16,777,216. That’s too high, except we are wrong about Vision. Vision can’t die from the snap, because he already died when Thanos took the mind stone. So we only have 23 heroes that can die from the snap. This gives us only 8,388,608 possible futures. Too few. But what if Vision stays alive?

For each hero there are just two possible outcomes in every future, he or she can live or die after the snap. Vision is an exception because he dies in Infinity War before the snap so that Thanos can take the Mind Stone. The Redditor says that there may be future versions where Shuri did manage to unbind the Stone from Vision, and he could have continued to fight. In that case, he could have died while trying to prevent Thanos from acquiring the Stone, or he could have survived the snap:

They actually try to extract the mind stone. They fail, but this hasn’t happened yet when Dr. Strange is checking the possible futures. If they had succeeded in extracting the mind stone, Thanos could have taken the Mind Stone while Vision stayed alive. So this would give us another 8.4 million possibilities in which Vision stays alive until the snap. Except we can’t count all of them. It is possible that Vision still dies while trying to protect the mind stone, which would make these futures identical to the previous ones. This is quite likely, considering this is the final stone and Vision is very keen on keeping it safe, even if he has to die for it. He’s the only one who insists they should destroy the stone right there instead of wasting time trying to save him, and the only reason he eventually concedes seems to be to please Wanda.

According to the Redditor, the conclusion seems to be that Strange may have looked at all the possible futures, and only found the one where they do win:

We are still short 5,611,997 futures, which is 66.9 % of 8,388,608, almost exactly two thirds. So if in roughly two thirds of the futures, Thanos takes the mind stone and Vision lives and in the remaining one third, Vision dies trying to protect it, we end up with a total of 14 million futures. Only one of these has the right combination of heroes to win.

Let’s remember that there’s no recipe for success here and as beautiful as this math exercise is, it’s only possible because you know the answer in advance — 14,000,605 — and you’re trying to bend the math to get to that particular result. But it’s also possible that Strange didn’t rely on probabilities to solve the Thanos problem. It’s not as simple as having an exact number of heroes to defeat Thanos, or having a particular number of events in the past line up to carve out the winning future that we’re going to see in Endgame.

The full theory follows below: