About the Expected Value Calculator
This expected value calculator finds the mean of a discrete probability distribution — the average result you would get per trial if you repeated a game, bet, raffle or decision many times. Enter each possible outcome and its probability, and it returns E(X), the variance and standard deviation, plus a table showing how much each outcome contributes.
It is built for statistics students checking homework, and for anyone weighing a decision with uncertain payoffs: is a raffle ticket worth buying, is an extended warranty a good deal, which project has the better risk-adjusted return. Add a cost per play and the calculator also shows the net expected value, so you can see at a glance whether a game is favourable, fair or a losing proposition.
Probabilities can be entered as decimals (0.25), percents (25) or raw frequencies/weights (for example counts of tickets or faces of a die); weights are converted to probabilities automatically. If decimal or percent probabilities do not add up to 1 (100%), they are rescaled and a warning is shown.
With the default inputs, the expected value e(x) is 12.5. Change any value above to recalculate instantly.
How to use the expected value calculator
- 1List every possible outcome value, separated by commas.
- 2Enter the probability of each outcome in the same order.
- 3Choose whether you typed decimals, percents or frequencies.
- 4Optionally enter the cost to play or buy in.
- 5Read E(X), the net expected value and the spread (σ) in the results.
Formula and method
The expected value is a probability-weighted average: each outcome is multiplied by its probability and the products are added. It is the mean of the distribution — the value the average of many independent trials converges to (the law of large numbers), even though a single trial may never produce exactly E(X).
The variance measures how spread out the outcomes are around E(X); the calculator uses the shortcut E(X²) − E(X)². The standard deviation is its square root, in the same units as the outcomes. When a cost to play is entered, the net expected value is E(X) − cost: positive means a favourable game, zero a fair game and negative a losing one.
- xᵢ
- Value (payoff) of outcome i
- P(xᵢ)
- Probability of outcome i (all probabilities sum to 1)
- E(X)
- Expected value (mean) of the random variable X
- σ
- Standard deviation of X
Worked examples
Prize wheel with four outcomes
E(X) = 0×0.6 + 10×0.25 + 50×0.1 + 100×0.05 = 0 + 2.5 + 5 + 5 = 12.5. E(X²) = 0 + 25 + 250 + 500 = 775, so Var(X) = 775 − 12.5² = 618.75 and σ ≈ 24.87. The wheel is worth 12.5 per spin on average.
Raffle: 1,000 tickets, one $500 prize, $2 a ticket
With weights 1 and 999, the chance of winning is 1/1000. E(X) = 500 × 0.001 = $0.50, so after paying $2 the net expected value is −$1.50 per ticket: on average you lose 75% of what you spend.
Roll of a fair six-sided die
Each face has probability 1/6, so E(X) = (1+2+3+4+5+6)/6 = 3.5. E(X²) = 91/6 ≈ 15.167, giving Var(X) = 15.167 − 12.25 ≈ 2.917 and σ ≈ 1.708.
Frequently asked questions
What does expected value mean?+
Expected value is the long-run average outcome of a random process. If you could repeat the game or decision many times, the average result per trial would approach E(X), even though any single trial can come out very differently.
How do you calculate expected value?+
Multiply each possible outcome by its probability, then add all the products: E(X) = Σ x·P(x). For a bet, include losses as negative values, or enter the payouts and use the cost-per-play field to get the net expected value.
What is a fair game in probability?+
A game is fair when its net expected value is zero — the expected payout equals the price to play. Casino games and lotteries have a negative net expected value for players, which is the house edge.
Can expected value be negative?+
Yes. A negative expected value means that on average you lose money (or value) per trial. Most lottery tickets, insurance policies and casino bets have a negative expected value for the buyer, which is why the seller profits.
Why also look at the standard deviation?+
Two options can share the same expected value but carry very different risk. The standard deviation shows how far results typically land from E(X); a higher σ means a wider, riskier spread of outcomes.
Do the probabilities have to add up to 1?+
For a valid probability distribution they must. If your decimals or percents do not sum to 1 or 100, this calculator rescales them proportionally and warns you. Choose "Frequencies / weights" to enter raw counts deliberately.