The Math of War — Probability, Statistics & Simulations
The surprising mathematics behind the world's simplest card game.
War may be the simplest card game ever invented, but it raises surprisingly deep mathematical questions. How likely is a tie? How long will the average game last? Can a game truly go on forever? Mathematicians and programmers have studied War extensively using probability theory and computer simulations. Here’s what the numbers reveal.
Probability of a Tie (War)
The most basic War probability question: what are the odds that both players flip cards of the same rank?
Calculation
In a standard 52-card deck with 13 ranks and 4 cards per rank:
- Player A flips any card.
- Player B’s card must match the rank of Player A’s card.
- There are 3 remaining cards of that rank out of 51 remaining cards.
$$P(\text{tie}) = \frac{3}{51} \approx 0.0588 = 5.88%$$
This means approximately 1 in 17 flips will result in a war.
Tie Probabilities During Wars
During a war, each player places cards face-down and then flips a new card. The probability of another tie depends on the remaining deck composition, but as an approximation:
| Event | Approximate Probability |
|---|---|
| Single war (initial tie) | 5.88% |
| Double war (tie during war) | ~0.35% (5.88% × 5.88%) |
| Triple war | ~0.02% |
In practice, the exact probabilities vary because the deck composition changes as cards are won and lost, but the approximations above are reasonable for a large deck.
Average Game Length
Simulation Results
Since War’s outcome depends on the initial shuffle and the order of card placement after wins, the best way to determine average game length is through Monte Carlo simulation — running millions of simulated games.
Key findings from published simulations:
| Metric | Value |
|---|---|
| Average rounds per game | ~250-300 |
| Median rounds per game | ~220-260 |
| Shortest possible game | ~26 rounds (one player wins every flip) |
| Longest recorded simulated game | 2,000+ rounds |
| Standard deviation | ~100-150 rounds |
Distribution of Game Lengths
The distribution of War game lengths is right-skewed: most games cluster around 200-300 rounds, but a long tail extends to 500+ rounds. This means:
- Most games (roughly 50%) finish in under 260 rounds.
- About 80% of games finish in under 400 rounds.
- About 5% of games exceed 500 rounds.
- Extremely long games (1000+ rounds) are rare but possible.
Real-Time Duration
Assuming players take 5-8 seconds per flip (flip, compare, collect):
| Rounds | Estimated Real Time |
|---|---|
| 200 | 17-27 minutes |
| 300 | 25-40 minutes |
| 500 | 42-67 minutes |
| 800+ | 1+ hour |
This explains the wide range of game times players report — from “about 15 minutes” to “over an hour.”
Can a Game of War Last Forever?
This is the most famous mathematical question about War, and the answer depends on how won cards are returned to the pile.
Deterministic Placement
If won cards are always placed at the bottom of the winner’s pile in a fixed order (e.g., winning card first, then losing card), certain initial shuffles produce infinite loops. The game cycles through a repeating sequence of states and never terminates.
This was proven mathematically. Some researchers have found specific initial deals that produce cycles of hundreds of states before repeating infinitely.
Random Placement
If won cards are placed at the bottom in a random order (which is more realistic for casual play), the question becomes: does every game eventually terminate?
Computer simulations suggest that with truly random card placement after each win, all games terminate eventually — though some can be extraordinarily long. There is no formal mathematical proof of this for all possible scenarios, but no infinite game has been found in simulations with random placement.
Practical Implications
For practical play, the infinite-game question is mostly academic. Even with deterministic placement, a game that cycles for hundreds of rounds before potentially repeating is effectively “stuck” — which is why many players use a time limit.
War as a Markov Chain
Mathematicians model War as a Markov chain — a system where the next state depends only on the current state, not on how you got there.
In War, the “state” is the complete arrangement of cards in both players’ piles. Since the deck has 52 cards, the number of possible states is finite but enormous.
Properties of the War Markov Chain
- State space: All possible orderings of 52 cards split between two players. This is a very large but finite number.
- Absorbing states: States where one player has all 52 cards (game over). These are the “win” states.
- Transient states: All other card distributions. With random card placement, all non-absorbing states are transient (the game must eventually reach an absorbing state).
The Markov chain model helps explain:
- Why game lengths vary so widely (the random walk through state space can take many different paths).
- Why some games feel “stuck” (the chain can visit similar-looking states repeatedly before reaching absorption).
Probability of Winning from a Given Position
In standard War, each player starts with 26 cards and has an equal 50% chance of winning. But what if the deal is uneven?
Uneven Starts
| Starting Cards | Win Probability (approx.) |
|---|---|
| 30 vs. 22 | ~58% for the 30-card player |
| 35 vs. 17 | ~67% |
| 40 vs. 12 | ~77% |
| 45 vs. 7 | ~88% |
These are approximate values from simulation. The relationship is roughly linear — each extra card provides a small additional advantage. This is because more cards means more chances to survive wars and more fodder for long battles.
Card Quality vs. Card Quantity
Interestingly, having more high cards matters less than having more cards overall. A player with 20 cards including all 4 Aces will often lose to a player with 32 cards including no Aces — because the extra cards provide more resilience during wars.
Expected Number of Wars per Game
Given a ~5.88% tie probability per flip and ~250-300 flips per game:
$$E(\text{wars per game}) \approx 0.0588 \times 275 \approx 16$$
An average War game features roughly 16 wars (ties). Of those, approximately 1 will be a double war, and the probability of a triple war in any given game is roughly 5-6%.
War Probability in Multiplayer
Adding players changes the math:
Three-Player War
The probability that at least two players tie for the highest card increases:
- Probability of all three cards being different ranks: decreases as more players participate.
- Probability of any tie: approximately 8.6% per round (higher than the two-player 5.88%).
- Probability of a three-way tie: approximately 0.35% per round.
Four-Player War
- Probability of any tie for the highest: approximately 11.2% per round.
- Games tend to be shorter due to faster elimination.
War in Mathematics Education
War’s mathematical properties make it useful in education:
- Probability courses — War provides accessible examples for conditional probability, Markov chains, and Monte Carlo simulation.
- Programming courses — Implementing a War simulator is a popular beginner programming project because the rules are simple to code but the analysis is interesting.
- Statistics courses — Collecting data from simulated War games teaches students about distributions, central tendency, and variance.
- Elementary math — Playing War itself teaches number comparison to young children (see our War for Kids guide).
Key Takeaways for Players
The math of War confirms what most players intuit:
- War is pure luck — with equal starting cards, each player wins exactly 50% of the time.
- Games are unpredictable in length — you might finish in 15 minutes or play for over an hour.
- Wars happen regularly — expect about 16 per game on average.
- Use a time limit — the mathematical possibility of very long games (500+ rounds) is real.
- Shuffle well — poor shuffling can create patterns that extend game length.
Further Reading
- War Rules for Beginners — The complete rules.
- Casino War — House edge and odds analysis.
- War Variants — How variants change the game’s probabilities.
- Go Fish — A card game with actual strategy. Play free online.
- Blackjack — The most mathematically analyzed casino game. Play free online.
More Card Games to Explore
Enjoy the analytical side of card games? Browse all card games on Rare Pike or try Go Fish free.
Browse Card Games