Expected Value Calculator

List each possible outcome (a payoff, a score, a count) and its probability in percent. Leave unused rows at 0. The probabilities must total 100%.

Updated

Embed this calculator

Paste this code into your page. The calculator runs inside the frame and links back to the full version.

Keep the credit link in place. Do not resell the calculator.

Formula

  • Expected value: E[X] = sum of x_i x p_i
  • Variance: Var(X) = sum of p_i x (x_i - E[X])^2 = E[X^2] - E[X]^2
  • Standard deviation: sd = sqrt(Var(X))
  • Probabilities are entered in percent and must total 100% (within 0.01).

Worked example

Outcomes 100 at 10%, 20 at 30%, -5 at 60%. E[X] = 10 + 6 - 3 = 13. E[X^2] = 1000 + 120 + 15 = 1135. Var = 1135 - 13^2 = 966, so sd = 31.0805.

Frequently asked questions

How do you calculate expected value?

Multiply each outcome by its probability and add the results: E[X] = sum of x times p. For 100 at 10%, 20 at 30% and -5 at 60%: 10 + 6 - 3 = 13.

How are variance and standard deviation found?

Variance is the probability-weighted average of squared distance from the mean, equal to E[X squared] minus E[X] squared. Here E[X squared] = 1135, so the variance is 1135 - 169 = 966 and the standard deviation is the square root, 31.08.

Does a positive expected value guarantee a gain?

No. It is the long-run average over many repeats. A single draw gives one of the listed outcomes, and a large standard deviation, like 31.08 against a mean of 13, means individual results vary a lot.

Why must the probabilities add up to 100%?

The outcomes must cover everything that can happen. A total within 0.01 points of 100 is accepted so rounded entries such as 33.33, 33.33 and 33.34 still work. Add a catch-all outcome, for example a value of 0, to cover the rest.