Prisoner's Dilemma Calculator

Calculate prisoner's dilemma — enter your values and get an accurate result with the underlying formula.

Quick Facts

Valid Prisoner's Dilemma
T > R > P > S
Temptation beats reward beats punishment beats the sucker's payoff.
Iterated-game condition
2R > T + S
Keeps steady cooperation better than alternating cooperate/defect.
Dominant strategy
Always Defect
Because T > R and P > S, defecting pays more regardless of the opponent's move.
Grim-trigger threshold
δ* = (T − R) / (T − P)
Minimum patience needed to sustain cooperation forever.

Your Results

Calculated
Nash Equilibrium Payoff
-
(Defect, Defect) — each player earns P
Cooperative (Pareto) Payoff
-
(Cooperate, Cooperate) — each player earns R
Efficiency Loss
-
R − P lost per player at equilibrium
Minimum δ for Cooperation
-
Grim-trigger threshold, δ* = (T−R)/(T−P)

Ready

Enter the four payoffs and a discount factor, then press Calculate.

How the Prisoner's Dilemma works

The Prisoner's Dilemma is the canonical two-player game in game theory. Each player independently chooses to Cooperate or Defect, and the payoff each receives depends on both choices. The game is defined by four payoffs — Temptation (T), Reward (R), Punishment (P), and Sucker's payoff (S) — that must satisfy T > R > P > S. This calculator checks that ordering, works out the Nash equilibrium and the cooperative (Pareto-optimal) outcome, and — for the repeated version of the game — calculates the minimum patience (discount factor) needed to sustain cooperation.

Formula and method

For a single round, compare each player's payoff from Defecting versus Cooperating against every possible opponent move. Since T > R (defecting against a cooperator beats mutual cooperation) and P > S (defecting against a defector beats being the sucker), Defect strictly dominates Cooperate for both players — so (Defect, Defect) is the unique Nash equilibrium, with each player earning P. Yet (Cooperate, Cooperate) pays each player R > P, so the equilibrium is Pareto-inefficient; the efficiency loss per player is R − P. For the infinitely repeated game, a grim-trigger strategy (cooperate until the opponent ever defects, then defect forever) sustains mutual cooperation as a subgame-perfect equilibrium whenever the discount factor satisfies δ ≥ δ* = (T − R) / (T − P). This calculator also checks the standard iterated condition 2R > T + S, which ensures alternating cooperation and defection between the two players is never better than steady mutual cooperation.

Common sources of error

  • Wrong payoff ordering: if T > R > P > S does not hold, the game is not actually a Prisoner's Dilemma — it may reduce to a different game (such as Chicken or Stag Hunt) where the analysis below does not apply.
  • Confusing δ with a probability of cooperating: δ is the discount factor (or probability the game continues another round), not the chance either player cooperates — set it to a value strictly between 0 and 1.
  • Ignoring the iterated condition: even when T > R > P > S holds, if 2R ≤ T + S then alternating "you defect, I defect" rounds can pay as well as or better than steady cooperation, weakening the case for grim-trigger cooperation.

Checking your result

With the classic textbook payoffs T=5, R=3, P=1, S=0, the Nash equilibrium payoff is 1 (both defect), the cooperative payoff is 3 (both cooperate), the efficiency loss is 2 per player, and the grim-trigger threshold is δ* = (5−3)/(5−1) = 0.5 — so cooperation is sustainable in the repeated game whenever players value future rounds at least half as much as the present one. Use these numbers to sanity-check your own inputs: if you shrink the gap between T and R, δ* should fall (cooperation gets easier to sustain), and if you shrink the gap between T and P, δ* should rise.

Applications

The Prisoner's Dilemma models any situation where individually rational choices lead to a worse collective outcome: price wars between firms, arms races, common-resource overuse, and doping in sports all share this structure. The repeated-game threshold δ* is used in economics and evolutionary biology to explain when cooperation, reciprocity, or cartel discipline can emerge and persist without external enforcement — the more the players value the future (higher δ), the easier cooperation is to sustain.

Frequently Asked Questions

What is the Prisoner's Dilemma?
The Prisoner's Dilemma is a two-player game in which each player chooses to Cooperate or Defect. Both players are individually better off defecting no matter what the other does, yet both are worse off if both defect than if both had cooperated. This creates the classic conflict between individual rationality and collective benefit.
What do T, R, P, and S stand for?
T is the Temptation payoff (you defect, opponent cooperates), R is the Reward for mutual cooperation, P is the Punishment for mutual defection, and S is the Sucker's payoff (you cooperate, opponent defects). A valid Prisoner's Dilemma requires T > R > P > S, and the standard iterated version also requires 2R > T + S so alternating cooperation and defection is not more profitable than steady mutual cooperation.
Why is defection the dominant strategy in a single round?
Because T > R and P > S, each player earns more by defecting regardless of the other player's choice. Since defecting is better whatever the opponent does, (Defect, Defect) is the unique Nash equilibrium, even though (Cooperate, Cooperate) gives both players a higher payoff of R instead of P.
What is the minimum discount factor needed to sustain cooperation in a repeated game?
Using a grim-trigger strategy (cooperate until the opponent defects, then defect forever), cooperation is a subgame-perfect equilibrium of the infinitely repeated game when the discount factor δ satisfies δ ≥ (T − R) / (T − P). Below that threshold, the one-time gain from defecting (T − R) outweighs the discounted future loss from triggering permanent punishment.