Mixed strategy Nash equilibrium 2×2 calculator
Find the mixed-strategy Nash equilibrium of a 2×2 game from its eight payoffs: in matching pennies, each player plays each action with probability 0.5 and expects a payoff of 0. Games without an interior mix are flagged. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- A11
- 1
- A12
- -1
- A21
- -1
- A22
- 1
- B11
- -1
- B12
- 1
- P row1
- 0.5
- P row2
- 0.5
- Q col1
- 0.5
- Q col2
- 0.5
A mixed-strategy Nash equilibrium is a profile of probability distributions over pure strategies such that no player can raise expected payoff by unilaterally changing their mix. In a two-by-two normal-form game each player has two actions, so a mix is a single probability on the first action and its complement on the second. The classic way to find an interior mixed equilibrium is indifference: the row player chooses the mix that equalizes the column player's expected payoffs from the two columns, and the column player chooses the mix that equalizes the row player's expected payoffs from the two rows. Students, tutors, and exam generators need those closed-form probabilities from eight payoff numbers without algebra slips. This mixed strategy Nash equilibrium 2×2 calculator takes the row and column payoff matrices, returns both mix probabilities and the expected payoffs under the equilibrium profile, and rejects games with no interior mixed equilibrium (for example pure-strategy dominant games).
What a mixed-strategy Nash equilibrium means in a 2×2 game
In a simultaneous-move game written as a bimatrix, the row player chooses a row and the column player chooses a column; each cell holds a pair of payoffs. A pure-strategy Nash equilibrium is a cell where neither player wants a unilateral deviation. Many textbook games also have an equilibrium in mixed strategies: each player randomizes, and the other's best response is any mix that keeps them indifferent when the opponent's probabilities are fixed.
For two strategies that interior equilibrium is unique when it exists: there is exactly one probability p that makes the column player indifferent between Col1 and Col2, and exactly one probability q that makes the row player indifferent between Row1 and Row2. Those two numbers are the mixed-strategy Nash equilibrium. Matching pennies is the cleanest example: both players mix half-and-half so neither can exploit a predictable pure play.
Chicken, inspection games, and many sports penalty-kick models use the same indifference arithmetic with different payoff numbers. This calculator does not search pure equilibria or dominate strategies first: it solves the two indifference equations directly and reports whether the resulting p and q lie strictly inside the open unit interval. When they do, you have a fully mixed Nash profile; when they do not, the game may still have pure Nash points but it does not have an interior mixed equilibrium of this form.
Keep the definition tied to expected-payoff equality so LMS plugins, answer keys, and slide figures share one reproducible mix pair without spreadsheet drift on intermediate rounding.
Inputs, formulas, validation, and how to read the result
Row player payoffs are a11, a12, a21, and a22 for the four cells in row-major order. Column player payoffs are b11, b12, b21, and b22 in the same cell order. The equilibrium mix for the row player is p equals (b22 minus b21) divided by (b11 minus b12 minus b21 plus b22), so Prob(Row1) equals p and Prob(Row2) equals one minus p.
The equilibrium mix for the column player is q equals (a22 minus a12) divided by (a11 minus a12 minus a21 plus a22), so Prob(Col1) equals q and Prob(Col2) equals one minus q. If either denominator is zero, the corresponding player cannot be made indifferent by a unique interior mix and the task fails. If p or q is not strictly between zero and one, there is no interior mixed-strategy Nash equilibrium and the task fails with a clear message — those failures are not billed.
Example: matching pennies with row payoffs one, negative one, negative one, one and column payoffs negative one, one, one, negative one yields p equals one half and q equals one half with expected payoffs zero. Numbers are rounded to twelve decimal places for stable goldens across runtimes.
Where a mixed strategy Nash 2×2 calculator earns its keep
Introductory game theory courses assign 2×2 mixed equilibrium drills because indifference is the first concrete mixed-Nash skill before best-response graphs and larger games. Tutoring platforms and LMS auto-graders need a deterministic oracle that rejects pure-only games instead of returning a probability outside the unit interval that a buggy key might clip. Instructors building practice banks want the same closed-form p and q students derive on paper for matching pennies, battle of the sexes variants that mix, inspection games, and penalty-kick style zero-sum tables.
Pin the rounded mix probabilities in tests, keep payoffs finite, and you get reproducible indifference mixes for homework, exam generators, and lightweight industrial-organization notebooks without standing up a full game-theory solver. Pair this capability with separate pure-strategy or larger-matrix tools when you need those surfaces; keep this one focused on the two-player two-action mixed profile that textbooks introduce first.
What you can do with it
Homework and exam mixed-NE checks
Students enter eight payoffs from a 2×2 bimatrix and verify p and q against textbook indifference formulas for matching pennies and chicken-style games.
LMS and tutoring auto-grading
Score mixed-strategy items with a deterministic oracle that rejects zero denominators and mixes outside (0,1) instead of inventing probabilities.
Sports and inspection-game notebooks
Compute equilibrium randomizations for simplified penalty-kick or audit games before comparing expected payoffs under different payoff calibrations.
FAQ
How do I find the mixed strategy Nash equilibrium of a 2×2 game?
Send the eight finite payoffs a11…a22 (row) and b11…b22 (column).
What does it mean that each player makes the opponent indifferent?
Against the equilibrium mix, the opponent's two pure strategies yield the same expected payoff, so any mix (including the equilibrium mix) is a best response. That mutual indifference is the interior mixed Nash condition.
Why might the calculator reject my payoffs?
If a denominator is zero, no unique indifference mix exists for that player. If p or q is not strictly between 0 and 1, the game has no interior mixed-strategy Nash equilibrium (it may still have pure Nash points).
Does this find pure-strategy Nash equilibria?
No. This capability only solves the completely mixed (interior) equilibrium via indifference. Pure best-response checks are a separate problem.
What is the mixed equilibrium of matching pennies?
Both players choose each action with probability 0.5, and each expects a payoff of 0. Mixing half and half means neither player can exploit a predictable choice by the other.
Related tools
For developers — API access
Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.
API endpoint
Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/econ/mixed-strategy-2x2 \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"a11":1,"a12":-1,"a21":-1,"a22":1,"b11":-1,"b12":1,"b21":1,"b22":-1}'const res = await fetch("https://api.kit.forhosting.com/econ/mixed-strategy-2x2", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"a11": 1,
"a12": -1,
"a21": -1,
"a22": 1,
"b11": -1,
"b12": 1,
"b21": 1,
"b22": -1
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/econ/mixed-strategy-2x2",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"a11": 1,
"a12": -1,
"a21": -1,
"a22": 1,
"b11": -1,
"b12": 1,
"b21": 1,
"b22": -1
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/econ/mixed-strategy-2x2", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"a11":1,"a12":-1,"a21":-1,"a22":1,"b11":-1,"b12":1,"b21":1,"b22":-1}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"a11":1,"a12":-1,"a21":-1,"a22":1,"b11":-1,"b12":1,"b21":1,"b22":-1}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/econ/mixed-strategy-2x2", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"a11": 1,
"a12": -1,
"a21": -1,
"a22": 1,
"b11": -1,
"b12": 1,
"b21": 1,
"b22": -1
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "econ.mixed_strategy_2x2",
"status": "queued",
"_links": {
"result": "/tasks/tsk_…/result"
}
}The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |
Technical notes
Inputs, formulas, validation, and how to read the result
POST a JSON body with eight required finite numbers. Fields may arrive as JSON numbers or numeric strings; missing, empty, or non-finite values fail with invalid_input naming the field. On success the response echoes all eight payoffs, returns p_row1, p_row2, q_col1, and q_col2, returns expected_payoff_row and expected_payoff_col under the mixed profile (using bilinearity, equal to either pure action's expected payoff against the opponent's mix), and sets formula to a one-line restatement of the indifference identities. Successful parse calls use the published $0.002 base price per item.
Technical questions
What does the mixed strategy Nash equilibrium 2×2 calculator cost?
The browser tool is free. API requests use prepaid KIT balance at $0.002 per successful call; invalid input is not billed.