Expected Value Calculator
Get the expected value of a discrete random variable from outcomes and probabilities, with variance, standard deviation and steps, plus dice and bet modes.
Expected Value Calculator
Calculate the expected value (mean) of a probability distribution. Enter outcomes and their probabilities to find the expected value, variance, standard deviation, and visualize the probability distribution.
Calculator Mode
Outcomes and Probabilities
Enter the possible outcomes and their corresponding probabilities. Probabilities must sum to 1 (or 100%).
Expected Value Calculator: What It Really Tells You
Most people reach for an expected value calculator because they want to know which choice will win. That is not what it does. An expected value calculator tells you the average outcome over many, many repetitions, not what happens next time. A bet with a positive expected value can lose ten times in a row. A bet with a negative expected value can win twice. The calculator removes the noise from a single trial and shows you the signal in the long run. If you are making a one-off decision, expected value alone is the wrong tool, and here is why.
Expected value (also called the mean of a probability distribution) is the sum of each possible outcome multiplied by its probability. The formula is E(X) = Σ x · P(x). For a discrete random variable, dice, coin flips, game payouts, investment scenarios, that is the only equation you need. The calculator handles five common modes so you can enter data the way the problem is phrased, not the way a formula expects it.
- Definition (discrete): E(X) = Σ x · P(x) over all possible values x
- Definition (continuous): E(X) = ∫ x · f(x) dx over support
- Variance formula: Var(X) = E(X²) − (E(X))²
- Standard deviation: σ = √Var(X), same units as the data
- Linearity of expectation: E(X + Y) = E(X) + E(Y) for any random variables X and Y, dependent or independent
Using the Expected Value Calculator: Five Modes for Real Problems
The calculator gives you five input modes so you match the problem instead of translating it into a generic table. Select the mode before you enter any numbers; switching modes clears the inputs.
General Expected Value Mode
Enter any set of outcomes and their probabilities. The total probability must sum to 1.00 (or 100%). The calculator shows a running total and warns you if it drifts off. Each row accepts an outcome name, a numerical value (x), and its probability P(x). Add as many rows as you need. The results pane shows expected value, variance, standard deviation, and a median that is defined as the smallest outcome whose cumulative probability reaches or exceeds 0.5. For discrete distributions with a small number of values, that median can be misleading: a distribution with outcomes 1, 2, 3 and probabilities 0.4, 0.2, 0.4 gives a median of 2, even though the expected value is 2.0. The median is reported, but for a discrete random variable it does not always split the probability mass evenly.
Dice Roll Mode
Choose the number of dice (1 to 10) and the number of sides per die (4, 6, 8, 10, 12, or 20). The calculator builds the distribution of the sum of the dice using convolution, it does not enumerate all possible rolls, which would freeze the browser. You can optionally flip on custom payouts, which replaces each sum value with a dollar payout you type in. That turns a pure dice analysis into a game analysis: roll a sum of 7 and win $5, roll a sum of 2 and lose $1.
Coin Flip Mode
Set the number of coins (1 or more), the probability of heads (default 0.5), and separate payouts for heads and tails. For multiple coins, the calculator uses the binomial distribution. Payouts are linear: if heads pays $2 and tails pays −$1, two coins with heads and one tail pays 2 + 2 − 1 = $3. The expected value here is just the weighted average of the binomial outcomes.
Game/Betting Scenario Mode
Enter your bet amount, the net win amount (what you get back on top of your bet, not including the return of the bet itself), and your probability of winning. The calculator builds a two-outcome table: win with the net payout, lose with the negative of the bet. This is the way to evaluate a single wager. It does not account for multiple rounds, compounding, or the Kelly criterion (f* = (bp − q) / b, which tells you what fraction of your bankroll to risk).
Investment Returns Mode
Add scenarios with a name, a return percentage, and a probability. The calculator multiplies the investment amount by each return percentage to get a dollar value, then computes the expected value of the portfolio. This is a simplified decision-tree expected monetary value (EMV) calculation, as used in the PMBOK Guide 7th edition. It does not model correlations between scenarios or sequence-of-returns risk.
The Expected Value Formula: E(X) = Σ x · P(x)
The formula has three parts. The summation sign Σ tells you to add up every term in the list. Each term is a possible outcome x multiplied by its probability P(x). You do this for every distinct outcome of the random variable.
For a continuous random variable, the summation becomes an integral over the probability density function f(x). The meaning is identical: the area under x f(x) over the entire support of the distribution. OpenIntro Statistics (4th ed., section 3.4) introduces random variables as numerical outcomes of random processes and uses the discrete sum definition. OpenStax Introductory Statistics 2e (ch. 4.2) does the same for discrete random variables and adds the continuous version in ch. 5.
Linearity of expectation is the property that makes the formula powerful. E(X + Y) = E(X) + E(Y) holds for any two random variables X and Y, even if they are dependent. Blitzstein and Hwang (Introduction to Probability, 2nd ed., ch. 4) treat linearity as the central theorem of expectation, and use it to compute expectations of sums of dependent indicator random variables where a direct table would be impossible.
Worked Example: A Simple Dice Game
You play a game where you roll one fair six-sided die. If the roll is a 6, you win $6. If the roll is anything else (1 through 5), you lose $1. Is this game worth playing?
First, list the outcomes and their probabilities. There are six equally likely outcomes, each with probability 1/6.
- Roll 6: value = $6, probability = 1/6
- Roll 1: value = −$1, probability = 1/6
- Roll 2: value = −$1, probability = 1/6
- Roll 3: value = −$1, probability = 1/6
- Roll 4: value = −$1, probability = 1/6
- Roll 5: value = −$1, probability = 1/6
Now apply the formula. Multiply each outcome by its probability and sum: ($6 × 1/6) + (−$1 × 1/6) + (−$1 × 1/6) + (−$1 × 1/6) + (−$1 × 1/6) + (−$1 × 1/6) = $1.00 − $0.8333 = $0.1667.
The expected value of the game is about 17 cents per roll. Over a thousand rolls, you expect to be up about $167. The game has positive expected value. That does not mean you will win on any single roll, you lose on five out of six rolls, but over many trials the average drifts toward 17 cents.
If you entered this in the calculator's general mode, you would enter six rows, each with probability 0.1667. The results would show E(X) = 0.8056 + 5 × 1.3611 × 0.1667 = 5.8056 + 1.1343 = 6.9399, and standard deviation σ = √6.9399 ≈ 2.63. The standard deviation is larger than the expected value itself, which means the spread of outcomes is wide relative to the average gain.
Variance and Standard Deviation From the Same Table
Expected value gives you the center of the distribution. Variance and standard deviation give you the spread. The calculator computes both from the same probability table you entered for the expected value.
Variance is defined as Var(X) = E[(X − μ)²], where μ is the expected value. The computational formula is Var(X) = E(X²) − (E(X))². Using the dice game above: E(X²) = (6² × 1/6) + (1² × 1/6 × 5) = 36/6 + 5/6 = 41/6 = 6.8333. (E(X))² = 0.1667² = 0.0278. Var(X) = 6.8333 − 0.0278 = 6.8055.
Standard deviation is the square root of variance: σ = √Var(X). In the dice game, σ ≈ 2.61. Standard deviation is in the same units as the original outcomes (dollars), which makes it interpretable. One standard deviation above the mean is about $2.78; one standard deviation below is about −$2.44. Since the outcomes are −$1 and $6, the actual values never land exactly one standard deviation away, that is normal for a discrete distribution.
OpenStax Introductory Statistics 2e (ch. 4.2) provides the same formulas for variance and standard deviation of a discrete random variable. Blitzstein and Hwang (ch. 4) derive variance and show its relationship to the second moment E(X²). The calculator applies these formulas to whatever data you enter in any mode.
| Distribution | Expected Value E(X) | Variance Var(X) | Standard Deviation σ |
|---|---|---|---|
| Fair die (1d6) | 3.5 | 2.9167 | 1.708 |
| Fair coin (1 flip, Heads = $1, Tails = $0) | $0.50 | 0.25 | $0.50 |
| Fair coin (1 flip, Heads = $2, Tails = −$1) | $0.50 | 2.25 | $1.50 |
| Binomial (n = 10, p = 0.5) — number of heads | 5 | 2.5 | 1.581 |
| Game: bet $10, win $20 (net) with p = 0.45 | −$1.00 | 99.00 | $9.95 |
| Mega Millions jackpot (raw, before tax/split) | ≈ $0.33 per $2 ticket at $500M jackpot | N/A (extremely large) | N/A |
What Expected Value Does Not Tell You
Expected value answers one question: what is the average outcome per trial over the long run? It does not answer the questions that matter for a single decision.
Risk. Two bets can have the same expected value and wildly different variance. A bet that pays $1,000 with probability 0.001 and $0 otherwise has E(X) = $1. A bet that pays $1 with probability 1 has E(X) = $1. The first has a 99.9% chance of returning $0; the second is certain. Expected value alone cannot distinguish them. Variance and standard deviation give you the spread, but even those do not capture risk tolerance, a risk-averse person will reject the first bet despite the same EV.
One-off decisions. If you play a game exactly once, the expected value is irrelevant to the outcome. The law of large numbers says the average of many independent trials converges to the expected value, but one trial is a single sample from the distribution. A positive-EV lottery ticket bought once has a 99.9999% chance of losing. The expected value of the ticket is positive only in the imaginary long run; the actual outcome is almost certainly a loss.
Bankroll management. Expected value does not tell you how much to bet. The Kelly criterion (1956) computes the fraction of your bankroll to risk on a positive-EV bet to maximize long-run growth: f* = (bp − q) / b, where b is the net odds received, p is the win probability, and q is 1 − p. Betting more than the Kelly fraction increases the risk of ruin, even on a positive-EV bet. The calculator does not implement the Kelly criterion; it computes only the raw EV.
After-tax expected value. For U.S. lottery players, the IRS withholds 24% on winnings over $5,000 (IRS Publication 505, 2025). State taxes add another layer. A jackpot EV that looks positive before tax often turns negative after withholding. The calculator shows pre-tax EV. For actual decisions, apply your own tax rate to the EV.
Multiple winners. A lottery jackpot is split among all winning tickets. The expected number of winners depends on how many tickets are sold. At high jackpot levels, the probability of a split is substantial, and the per-ticket EV must be divided by that expected number. The calculator does not model that.
Common Questions
What is the difference between expected value and the most likely outcome?
Expected value is the long-run average of all outcomes weighted by their probabilities. The most likely outcome (the mode) is the single outcome with the highest probability. For a fair die, the expected value is 3.5, which never appears on any face. The mode is any of the six equally probable faces. Confusing these two is the most common mistake students make.
Can the expected value be negative, and what does that mean?
Yes. A negative expected value means you expect to lose money on average per trial over many repetitions. Most casino games have a negative expected value for the player, American roulette (double zero) has a house edge of 5.26%, which corresponds to a player EV of −0.0526 per dollar wagered. A negative EV does not guarantee a loss on the next play; it guarantees a loss in the long run.
How is variance different from expected value?
Expected value gives the center of the distribution. Variance measures how far the outcomes are spread from that center, on average. Variance is in squared units (e.g., dollars squared). Standard deviation, the square root of variance, is in the original units. Two bets can have the same expected value but very different variance, one might be a certain $1, the other a 50% chance of $2 and 50% chance of $0. Variance tells you which one is riskier.
Does a positive expected value guarantee I will make money?
No. A positive expected value means you will make money on average over many independent trials. On a single trial, you can still lose. The law of large numbers requires a large number of repetitions for the average to converge to the expected value. If you play a positive-EV game once and lose, that is normal and expected, probability does not guarantee a win.
Can I use this calculator for real-world investment decisions?
The calculator gives you the raw expected monetary value (EMV) of a set of scenarios, as used in project risk management (PMBOK Guide 7th ed.). That is a starting point, not a final answer. Real investment decisions require after-tax EV, risk tolerance, correlation between scenarios, and sequence-of-returns risk. The calculator does not model portfolio diversification or the Kelly criterion for bet sizing. Use it to compare scenarios, but do not base a single bet or investment solely on the EV output.