Zero-Sum Game Value Calculator
This zero-sum game value calculator solves a two-by-two payoff matrix from the row player's perspective.
Run — free
It first checks whether the matrix contains a saddle point, where both players can use pure strategies without either gaining from a unilateral change. When no saddle point exists, it calculates the equilibrium mixing probabilities for both players and the expected game value. The result identifies the method used, reports the value, and gives each strategy as probabilities that correspond to the first and second row or column.
Enter the payoff matrix from one player's perspective
Represent the game as two rows and two columns, with every entry giving the payoff to the row player for that combination of choices. Because the game is zero-sum, the column player's payoff is the negative of the same entry; you should not submit a second matrix. Keep the order meaningful: the first pair of values belongs to row strategy one, the second pair belongs to row strategy two, and positions within each pair correspond to column strategies one and two. Positive values favor the row player, negative values favor the column player, and zero is neutral. Decimal values are allowed as long as every entry is a finite number. The calculator deliberately accepts exactly four payoffs because its formulas and strategy labels are specific to a two-by-two game. If your game has more actions, eliminating strictly dominated strategies may reduce it to this form, but that reduction must be justified separately rather than assumed by the calculator. Careful ordering matters because the returned probabilities follow the same row and column order you supplied.
Understand the saddle-point test and pure solution
The row player wants to maximize the payoff that can still be guaranteed after the column player responds. For each row, the calculator therefore finds its smallest payoff and then takes the larger of those row minima, producing the maximin. The column player works in the opposite direction: for each column, the calculator finds its largest payoff and then chooses the smaller of those column maxima, producing the minimax. When maximin and minimax are equal, their shared entry is a saddle point and is the value of the game. Neither player can improve by changing strategy alone, so a pure-strategy equilibrium is sufficient. The output names the saddle point using one-based row and column positions and returns probability one for the selected equilibrium action and zero for the other. In a degenerate matrix there can be more than one valid saddle point; the calculator returns the first consistent row and column in input order. That selected pair remains optimal even though other optimal pure or mixed combinations may also exist.
Read mixed strategies and the game value
If the maximin is below the minimax, no pure action pair is stable, so each player must randomize. The calculator solves the indifference equations: the row player chooses probabilities that make the column player indifferent between its two columns, while the column player chooses probabilities that make the row player indifferent between its two rows. Each returned strategy is a two-number array whose entries sum to one. The first number is the probability of choosing the first row or column, and the second belongs to the second row or column. These probabilities are strategic frequencies, not predictions that one specific round must follow. The reported value is the row player's expected payoff when both players use their optimal strategies; the column player's value is its negative. A positive value favors the row player over repeated play, a negative value favors the column player, and zero describes a fair game in expected-value terms. Results are rounded deterministically for stable API output, but the calculation uses the submitted numeric payoffs before formatting. The automated API request price is $0.002.
What you can do with it
Check a textbook game
Verify whether a small payoff matrix has a saddle point and confirm the equilibrium value and strategies.
Compare competitive decisions
Model two opposing choices, such as defensive and attacking plans, when one side's gain exactly equals the other's loss.
Automate matrix exercises
Solve batches of two-by-two zero-sum exercises through the API with consistently structured strategy probabilities.
FAQ
What do the matrix entries represent?
Each entry is the payoff to the row player for one row-and-column action pair. The column player's payoff is the negative of that number.
How do I know whether the game has a saddle point?
A saddle point exists when the largest row minimum equals the smallest column maximum. The result then uses the saddle_point method.
What order are the strategy probabilities in?
The first and second row probabilities match the first and second input rows. The column probabilities likewise match the first and second columns.
What does a negative game value mean?
It means optimal repeated play favors the column player. The value shown is always from the row player's perspective.
Can this solve a non-zero-sum game?
No. It assumes the column player's payoff is exactly the negative of the row player's payoff and does not compute general-sum equilibria.
What does an API calculation cost?
Each API request costs $0.002. The browser calculator can run the same deterministic calculation locally.
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/zero-sum-game-value \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"payoff_matrix":[[3,-1],[0,2]]}'const res = await fetch("https://api.kit.forhosting.com/econ/zero-sum-game-value", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"payoff_matrix": [
[
3,
-1
],
[
0,
2
]
]
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/econ/zero-sum-game-value",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"payoff_matrix": [
[
3,
-1
],
[
0,
2
]
]
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/econ/zero-sum-game-value", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"payoff_matrix":[[3,-1],[0,2]]}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"payoff_matrix":[[3,-1],[0,2]]}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/econ/zero-sum-game-value", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"payoff_matrix": [
[
3,
-1
],
[
0,
2
]
]
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "econ.zero_sum_game_value",
"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.
Limits
max_items | 4 |
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. |