Expected Value Calculator

Enter each outcome and how likely it is, and get the expected value with the working shown — plus the variance and standard deviation. Answers stay as exact fractions, so a fair die gives 7/2 rather than 3.5000001.

How to calculate expected value: the formula

E(X) = Σ x · P(x)

Multiply each outcome by its probability, then add the results. That is the whole method: expected value is a weighted average, where the weights are the probabilities.

How to calculate expected value, step by step

  1. List every outcome the variable can take.
  2. Write the probability of each, as a fraction, decimal or percentage.
  3. Check the probabilities add to exactly 1 — if they do not, something is missing or double-counted.
  4. Multiply each outcome by its probability.
  5. Add the products. That total is E(X).

Worked example — a fair six-sided die. Each face has probability 1/6, so:

E(X) = (1×1/6) + (2×1/6) + (3×1/6) + (4×1/6) + (5×1/6) + (6×1/6) = 21/6 = 7/2

The expected value is 3.5 — a number the die can never actually show. That is not a mistake, and it is the most useful thing to understand about expected value.

Why expected value can be a number that cannot happen

Expected value is a long-run average, not a prediction of any single trial. Roll a die once and you get a whole number; roll it ten thousand times and the mean closes in on 3.5. The same goes for the classic “average household has 1.8 children”: no household has 0.8 of a child, but the average is still the right summary.

Step 3 is where it goes wrong

If the probabilities do not add to exactly 1, you do not yet have a complete probability distribution, so the expected value is not valid as entered. It is one of the most common mistakes in expected-value problems.

  • An outcome is missing. If the probabilities add to 0.9, there may be another outcome that was not included.
  • Rounding has crept in. Writing 1/3 as 0.33 three times gives 0.99, not 1. Entering it as a fraction keeps it exact, which is why this calculator accepts fractions.

This calculator reports the total and refuses to produce a figure until it is 1. If you meant the numbers as relative weights, the Scale to 1 button divides each by the total — offered rather than applied automatically, because rescaling changes the distribution you entered.

Working from frequencies instead

Often you have counts rather than probabilities: 40 components tested, 12 lasting one year, 20 lasting two, 8 lasting three. Switch the second column to Frequencies and each whole-number count is divided by the total to give its probability. The arithmetic afterwards is identical.

Variance and standard deviation

Var(X) = Σ P(x) · (x − E(X))²

Expected value alone can hide a lot. Two distributions can share an average while behaving completely differently — one clustered tightly, the other spread wide. Variance measures spread as the probability-weighted average squared distance from the mean, and the standard deviation is its square root, back in the original units.

For the fair die, the variance is 35/12 and the standard deviation is exactly √105/6, about 1.71. The surd is the exact answer; the decimal is a rounding of it.

Frequently asked questions

How do you find expected value?

Multiply each outcome by its probability and add the results: E(X) = Σ x · P(x). Check first that the probabilities cover every outcome and add to exactly 1, otherwise the answer is an average over an incomplete picture.

Can the expected value be a number that cannot happen?

Yes, and it usually is. A fair die has an expected value of 3.5, which no roll can produce. Expected value is the long-run average of many trials, not a forecast of one.

What if my probabilities don't add to 1?

Then an outcome is missing, or rounding has crept in — writing 1/3 as 0.33 three times gives 0.99. Enter fractions to stay exact. If the numbers are relative weights rather than probabilities, scale them so they total 1.

Can expected value be negative?

Yes, whenever the outcomes themselves can be negative — temperature changes, profit and loss, error margins. Probabilities are never negative, but the values they weight can be.

What is the difference between expected value and the mean?

They are the same calculation applied to different things. The mean averages observed data; the expected value averages the possible outcomes of a probability distribution, weighted by how likely each is. Given frequencies rather than probabilities, the two coincide exactly.