Expected Value Calculator

Enter outcomes and their probabilities to get the expected value E(X), with the variance and standard deviation alongside and every step shown. Switch modes to find the expected net winnings of a game or ticket, or the expected value of a bet.

Enter each possible outcome of a random variable and the probability that it occurs. This is a probability distribution, not a list of observed data: every outcome appears once, with its chance. Outcome values can be money, points, counts or any other number, negative values included.

Enter the gross prize for each outcome (0 for a losing outcome) and the cost to play. The cost is subtracted from every outcome, winning ones included, to give the net result.

An optional mode, kept separate from the probability tools. Enter the stake, your own estimate of the chance the bet wins, and the odds. The result depends on your estimate and is neither a prediction nor a guarantee.

Row Outcome value x Probability P(x), 0 to 1 Remove row

Type probabilities as decimals (0.25), percentages (25%) or fractions (1/4). They must add up to 1 (100%). The calculator shows the total and never adjusts your numbers to force it.

Subtracted from every outcome. Enter 0 for a free game.
Must be greater than zero.
Your own estimate of the chance the bet wins: 0.55, 55% or 11/20.
Include the sign: +150 pays 150 on a stake of 100, -110 needs a stake of 110 to win 100.
Greater than 1. Decimal odds include your stake, so 2.50 on a stake of 100 pays 250 in total.
The amount you gain beyond getting your stake back.

Enter the required values above and the result appears here automatically.

Reset calculator?

Are you sure you want to reset? Your entered values and the current result will be cleared.

What this expected value calculator does

Expected value is the average result of a random process, weighted by how likely each result is. Multiply every possible outcome by its probability and add the products, and you have E(X). It tells you what the process pays, costs or scores on average in the long run, which makes it a standard tool for comparing games, tickets, investments in a simplified model and decisions under chance.

Short answer: E(X) = the sum of each outcome times its probability. For one roll of a fair die that is (1 + 2 + 3 + 4 + 5 + 6) ÷ 6 = 3.5. It is a long-run average, not a prediction for the next roll.

The first mode takes a full probability distribution and returns the expected value, the variance and the standard deviation. The second mode is for games and tickets: enter the gross prizes and the cost to play, and it returns the expected net winnings and the cost that would make the game fair. The third mode, which is optional, works out the expected value of a bet from the stake, the odds and your own estimate of the win probability. For a list of raw observations rather than a distribution, use the Mean Median Mode Calculator.

How to enter outcomes and probabilities

Each row holds one outcome and its probability. Add rows with the Add outcome button and remove them with the × button. A few rules keep the distribution valid:

  • One row per distinct outcome. This is a probability distribution, not a data set. If a die can land on six faces, there are six rows, not one row per roll.
  • Probabilities can be decimals, percentages or fractions. 25% is the same as 0.25, and 1/4 is too. Choose percentages in the entry format menu to type 25 instead of 0.25, or add a % sign to any value.
  • Each probability lies between 0 and 1 (0% and 100%). A value such as 25 in decimal format is flagged, with a reminder to type 25% if that is what you meant.
  • The probabilities must total 1 (100%). The running total sits under the table, and a total that is off is reported as a problem rather than quietly accepted. Include every outcome, even one with a value of 0, so nothing is missing.
  • Repeating decimals need care. Six rows of 0.1667 total 1.0002, which is not 1. Type 1/6 or use more decimal places.
Random variable X
The quantity whose value depends on chance, such as the number on a die, the prize on a ticket or the result of a bet. This calculator handles a discrete X, one with a list of separate possible values.
Outcome xi
One possible value of X. Enter it in the outcome column. It can be negative or zero.
Probability P(X = xi)
The chance that X takes the value xi, from 0 to 1. Together the probabilities form a discrete probability distribution and must total 1.
Expected value E(X)
The probability-weighted average of the outcomes, also written μ and called the mean of the distribution.
Variance and standard deviation
Measures of how far outcomes spread around E(X). They are reported next to the expected value but are separate from it.
Gross prize and net result
The gross prize is the total you receive. The net result is the prize minus what you paid to play, so it is negative when you lose money.

The expected value formula

For a discrete random variable, E(X) is the sum of each outcome multiplied by its probability. The variance measures spread around that average, and the standard deviation is its square root.

  • E(X) = Σ xi × P(X = xi) (sum over every outcome)
  • μ = E(X) (the mean of the distribution)
  • Σ P(X = xi) = 1, and each P(X = xi) is between 0 and 1
  • E(X²) = Σ xi² × P(X = xi)
  • Var(X) = E(X²) − [E(X)]² = Σ P(X = xi) × (xi − μ)²
  • Standard deviation = √Var(X)
  • Net result = gross prize − cost to play, for every outcome; E(net) = E(prize) − cost
  • Fair game: expected net gain = 0, that is, cost = E(prize)
  • Betting EV = (win probability × profit if win) − (loss probability × stake)

The two forms of the variance are algebraically identical. The calculator evaluates it from the deviations, which stays accurate when the outcomes are large numbers with small differences between them, and shows the E(X²) − [E(X)]² form in the steps.

Step-by-step example: a fair die

Each face of a fair die has probability 1/6. Multiply each face by 1/6 and add:

Expected value table for one roll of a fair six-sided die. Products are rounded for display; the total uses exact fractions.
Outcome xProbability P(x)x × P(x)
11/6 ≈ 0.16670.1667
21/6 ≈ 0.16670.3333
31/6 ≈ 0.16670.5000
41/6 ≈ 0.16670.6667
51/6 ≈ 0.16670.8333
61/6 ≈ 0.16671.0000
Total13.5

So E(X) = 3.5. The same table gives the spread: E(X²) = (1 + 4 + 9 + 16 + 25 + 36) ÷ 6 = 91/6 ≈ 15.1667, the variance is 15.1667 − 3.5² = 2.9167 (exactly 35/12), and the standard deviation is about 1.7078. Choose Fill with an example in the first mode to load this distribution.

What the result means

  • It is a long-run average. As the number of independent repetitions grows, the average of the results tends toward E(X). Over a handful of repetitions the average can be far from it.
  • It does not predict the next outcome. A fair die never shows 3.5. The expected value does not have to be a possible outcome, and often is not.
  • It can be negative. A negative value means the average result is a loss. A positive value means an average gain, and zero means the gains and losses balance.
  • It says nothing about spread by itself. Two distributions can share an expected value and differ greatly in how far single results stray from it. See the variance section below.

Games and tickets: gross payout versus net gain

Money outcomes can mean two different things, so be clear which one you are entering. A gross prize is the total you receive. A net result is what you end up with after paying to play. In the second mode you enter gross prizes and a cost, and the calculator subtracts the cost on every outcome. A $2 ticket that returns a $50 prize gives a net gain of $48, not $50, and a ticket that pays nothing gives a net result of −$2. Subtracting the cost only from the losing outcome, or not at all, is the usual mistake. If your values are already net gains and losses, use the first mode instead.

Take a $2 ticket that pays $50 with probability 0.02, $10 with probability 0.08 and nothing with probability 0.90 (illustrative figures):

A $2 ticket: the cost is subtracted from every outcome, winning ones included.
Gross prizeNet result (prize − $2)ProbabilityNet × probability
$50$480.02$0.96
$10$80.08$0.64
$0−$20.90−$1.80
Total1.00−$0.20

The expected prize is 50 × 0.02 + 10 × 0.08 + 0 × 0.90 = $1.80, and the expected net result is $1.80 − $2 = −$0.20 per ticket. The game is fair only if the ticket costs the expected prize, here $1.80. A fair game does not mean winning and losing are equally likely. It means the probability-weighted gains and losses cancel.

Variance and standard deviation: the spread around the mean

Expected value is the centre of a distribution. Variance and standard deviation describe how widely outcomes spread around it, and they are shown separately so that a good average is not mistaken for a safe one. Suppose game A pays $0 or $10 with equal probability, and game B always pays $5. Both have an expected value of $5. Game A has a variance of 25 and a standard deviation of $5. Game B has a standard deviation of 0. Same average, very different experience.

The ticket example above has a standard deviation of about $7.40 on an expected result of −$0.20, so single plays swing far more than the average suggests. Subtracting a fixed cost moves the mean but leaves the variance unchanged. For the spread of a list of raw values, the Variance Calculator and Standard Deviation Calculator are the right tools.

Betting expected value (optional)

The third mode applies the same idea to a single bet with two outcomes: it wins, or it loses. The expected value is (win probability × profit if it wins) − (loss probability × stake). Enter the stake, your own estimate of the win probability, and the odds as American odds, decimal odds or a profit amount. Profit and total payout are different things. Profit is what you gain beyond getting your stake back, and the total payout is stake plus profit. American odds of +150 pay a profit of 150 on a stake of 100, and −110 needs a stake of 110 to win 100. Decimal odds of 2.50 pay 250 in total on a stake of 100, which is a profit of 150.

A $100 stake at American odds of −110 with an estimated win probability of 55%. The profit is 100 × 100 / 110 ≈ $90.91.
OutcomeNet resultProbabilityNet × probability
Bet wins$90.910.55$50.00
Bet loses−$100.000.45−$45.00
Total, expected value1.00$5.00

The odds imply a break-even win probability of stake ÷ (stake + profit), which is 110/210 ≈ 52.38% here. An estimate above that gives a positive expected value, and an estimate below it gives a negative one. This is where the caution matters: the result is only as good as the probability you supply. The calculator cannot know the true chance, a positive expected value does not guarantee a profit on any single bet or over a short run, and the probability implied by a price usually includes the bookmaker's margin. This is arithmetic for learning and checking numbers. It is not betting or financial advice, and gambling carries a real risk of loss.

Input checks and edge cases

The calculator stops and explains the problem, rather than showing a misleading number, when:

  • an outcome or probability is missing from a half-filled row, or is not a number;
  • a probability is negative or above 1 (above 100%);
  • the probabilities do not total 1, in which case it shows the total and how far off it is;
  • the cost to play is negative, or the stake is not above zero;
  • American odds fall between −100 and +100, or lack a sign, or decimal odds are not above 1.

Some unusual cases are accepted. A single outcome with probability 1 is valid and has a variance of 0. A probability of 0 is allowed and contributes nothing. Outcome values can repeat, and they are handled as separate rows. If the probabilities total 1 only to within rounding (about one part in a million), the result uses the numbers exactly as typed and says so.

Assumptions and limitations

  • The calculator handles discrete outcomes with known probabilities, up to 50 outcomes. Expected values of continuous distributions need integration and are not covered here. For the normal curve, see the Normal Distribution Calculator.
  • The long-run reading assumes the repetitions are independent and the probabilities stay the same each time.
  • Expected value ignores risk, the amount of money you can afford to lose and how much you value outcomes. Read it together with the standard deviation.
  • The expected cell counts in a chi-square test are a different calculation. For those, use the Chi-Square Calculator.
  • This calculator provides a mathematical result from the values you enter. It is an informational and educational tool, not professional, financial or statistical advice. For decisions that matter, consult a qualified professional.

Formula sources

The expected value, variance, fair-game and net-winnings formulas, and the odds conventions, were checked against these independent references:

Frequently asked questions

What is expected value in probability and statistics?

Expected value is the probability-weighted average of the possible outcomes of a random variable, written E(X) or μ. It is the long-run average you would see over many independent repetitions of the same random process. It is a theoretical figure, so a single outcome may never equal it.

How do I calculate expected value from a probability distribution table?

Multiply each outcome by its probability, then add the products. For a fair die, (1 + 2 + 3 + 4 + 5 + 6) × 1/6 = 3.5. In the calculator, type each outcome and its probability on the same row. The calculation table then shows every product and the total.

What is the expected value formula, and what do X and P(X) mean?

E(X) = Σ x_i × P(X = x_i). X is the random variable, such as the number rolled or the prize won. x_i is one possible value of X, and P(X = x_i) is the probability that X takes that value. The sum runs over every possible outcome.

How do I enter outcomes and probabilities into an expected value calculator?

Choose the first mode, then type one outcome per row with its probability on the same row. Use Add outcome for more rows and the × button to remove one. Include every possible outcome, even a losing one with a value of 0 or a negative number, so that the probabilities can total 1.

Do the probabilities have to add up to 1?

Yes. The outcomes of a distribution cover everything that can happen, so their probabilities total 1 (100%). The calculator shows the running total and will not calculate if it is off by more than a rounding amount. It never rescales your numbers. A total below 1 usually means an outcome is missing. A total above 1 means one or more probabilities are too high.

How do I convert percentage probabilities to decimals for the calculator?

Divide by 100: 25% is 0.25, 5% is 0.05 and 0.5% is 0.005. You do not have to convert them yourself. Switch the entry format to percentages, or type the % sign after any value. Fractions such as 1/6 work too.

Can expected value be negative, and what does that mean?

Yes. A negative expected value means the average result per repetition is a loss. For a game with a cost to play, it means the cost is higher than the expected prize, so over many plays the player loses that amount per play on average. Individual plays can still win.

Is expected value the same as the mean or weighted average?

For a probability distribution, E(X) is the mean of the distribution, and it is calculated as a weighted average in which the probabilities are the weights. Because the probabilities total 1, no further division is needed. It differs from the sample mean of observed data, which only estimates E(X) from a limited number of observations.

Can expected value be a number that is not a possible outcome?

Yes. A fair die has an expected value of 3.5, although no roll can give 3.5. Expected value is an average over many repetitions, not a value that any single repetition has to produce.

How do I calculate expected net winnings after subtracting a ticket price or wager?

Subtract the cost from every outcome's prize, winning outcomes included, then take the probability-weighted average of those net results. The shortcut is the expected prize minus the cost. A $2 ticket that pays $50 with probability 0.02, $10 with probability 0.08 and nothing otherwise has an expected prize of $1.80 and an expected net result of −$0.20. Use the second mode for this.

What expected value makes a game fair?

An expected net gain of zero. In a game with a cost to play, that happens when the cost equals the expected prize. A fair game does not mean that winning and losing are equally likely, only that the probability-weighted gains and losses cancel out.

How are variance and standard deviation calculated from the same probability distribution?

Variance is E(X²) − [E(X)]², where E(X²) = Σ x² × P(x). It also equals Σ P(x) × (x − μ)². The standard deviation is the square root of the variance. For a fair die, E(X²) = 91/6, so the variance is 91/6 − 3.5² ≈ 2.9167 and the standard deviation is about 1.7078. These describe spread and do not change E(X).