Expected Value Calculator | Probability & Statistics
E(X) = Σ xᵢ · P(xᵢ), with the spread as well

Expected Value Calculator

Weigh every outcome by its probability to get the long-run average — plus the variance, the standard deviation and the distribution behind the number.

List the outcomes, then their probabilities

One row per outcome. Values can be negative — a loss is just a negative payoff — and probabilities must account for everything that can happen.

The distribution
Probabilities entered as

Probabilities have to add up to exactly 1. Weights are counts or odds and get normalised for you.

Rule applied: E(X) = Σ xᵢ · P(xᵢ)

Every outcome is weighted by how often it happens, then added up.

The expected value is rarely expected. A fair die averages 3.5, which is not a face it can land on. It is the long-run mean, not a prediction of the next roll.

Problem as entered

6 outcomes, probabilities summing to 1

Outcomes
Value xProbability P(x)Remove

Up to 24 outcomes. Leave a row blank to ignore it.

How the expected value calculator works

Expected value is a weighted average. Each outcome is multiplied by the probability of it happening, and the products are added together: E(X) = x₁·P(x₁) + … + xₙ·P(xₙ). The weighting is what separates it from an ordinary average — a rare outcome pulls the result only as hard as it is likely.

Two things follow from that. The expected value is often a number the variable can never actually take, like 3.5 on a die. And it says nothing on its own about risk: a certain £5 and a coin flip between £0 and £10 have exactly the same expected value, which is why this page reports the variance and standard deviation beside it.

1. List every outcome

Including the ones that lose money. A missing outcome is the most common source of a wrong answer.

2. Attach probabilities

They must cover everything that can happen, so they add to exactly 1.

3. Weight, add, then look at the spread

The mean is the headline; the standard deviation tells you how much to trust it for one attempt.

The formulas involved

Expected value

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

Each value times its probability, summed. Also written μ, because it is the mean of the distribution.

Variance

Var(X) = Σ P(xᵢ)·(xᵢ − μ)²

The probability-weighted average of the squared distances from the mean.

Standard deviation

σ = √Var(X)

Back in the units of the outcome, which makes it the readable measure of spread.

Over many repetitions

total ≈ n · E(X)

The law of large numbers: the average of n trials converges on E(X) as n grows.

A shortcut worth knowing: Var(X) = E(X²) − [E(X)]². Squaring the outcomes, taking their expected value and subtracting the square of the mean gives the same answer with less arithmetic — useful when you are doing it by hand.

Method reference: the formula, the requirement that probabilities sum to one and the dice and betting examples follow Omni Calculator's Expected Value Calculator.

Four distributions

The same formula, four situations

Try mine

Each of these is loadable as an example above. Notice how little the expected value alone tells you about what any single attempt feels like.

Expected value and standard deviation for four common distributions
SituationOutcomesE(X)Std deviationWhat it means
A fair die1 to 6, each 1/63.51.71A mean the die can never roll.
A favourable bet+100 at 35%, −45 at 65%5.7569.2Positive, but the swing dwarfs the edge.
Roulette, single number+35 at 1/38, −1 at 37/38−0.05265.76The 5.26% house edge, per dollar staked.
An insurance policy+300 at 99.5%, −49,700 at 0.5%503,527Profitable per policy, ruinous one at a time.

Read the last two rows together: the insurer and the roulette player are running the same business model from opposite ends. Both make their money from a small edge repeated thousands of times, and both are destroyed by taking too few, too large bets.

Why it is called long-run

The average arrives slowly

Expected value is a statement about repetition, not about the next attempt. The law of large numbers says the average of n trials converges on E(X) as n grows — but it says nothing about how long that takes, and the answer is usually "longer than you think".

The edge is per attempt

A −0.0526 expected value costs about five cents a spin. It costs nothing recognisable in ten spins and everything over ten thousand.

Spread shrinks as √n

Averaging n trials divides the standard deviation by √n — so four times the trials halves the noise, not quarters it.

One attempt is not the mean

For a single decision the whole distribution matters. Expected value is the right tool for policies, not for one-off bets you cannot afford to lose.

Textbook reference: the expected value and standard deviation formulas, the law of large numbers and a worked lottery example are set out in OpenStax's Introductory Statistics 2e, §4.2 Mean or Expected Value and Standard Deviation.

Where the number misleads

Three things expected value cannot see

The arithmetic is exact. What it leaves out is what usually decides the outcome.

Ruin is permanent

A positive expected value is worthless if a bad run ends the game. Bet sizing, not the edge, is what keeps you in it.

Money is not linear

Losing your last £1,000 hurts far more than gaining £1,000 helps. Expected value treats them as equal and opposite; nobody does.

The probabilities are estimates

A die has known odds. A business case does not. An expected value built on guessed probabilities inherits every one of those guesses.

Where it breaks entirely: the St. Petersburg game has an infinite expected value, yet almost nobody would pay £100 to play it — the classic counterexample to maximising expected value, set out in the Stanford Encyclopedia of Philosophy's St. Petersburg Paradox.

Interesting fact

Every roulette bet has the same edge

On an American wheel with 0 and 00 there are 38 pockets, and every bet on the layout is priced as though there were 36. Back a single number and you win 35 to 1 against odds of 37 to 1; back red and you win even money against 20 to 18. Work the expected value out and both come to the same figure: −2/38 of your stake, or −5.26%. The bet sizes differ wildly — one has a standard deviation of about 5.8 and the other about 1.0 — but the edge does not move, because it is built into the layout rather than into any particular wager. It is the cleanest demonstration there is that expected value and risk are two separate questions about the same bet.

Using it

Setting the problem up properly

Most wrong answers come from the table, not the formula. These two habits catch nearly all of them.

Questions to ask first

  • Have I listed the outcome where nothing happens?
  • Are the values net — winnings minus the stake?
  • Do the probabilities cover every case exactly once?
  • Is one repetition the decision, or many?

Net values, not gross

A £1 bet that pays £35 profit is +35 and −1, not +36 and 0. Mixing gross winnings with net losses is the single most common setup error, and it always makes the bet look better than it is. If you would rather work in gross terms, subtract the stake once at the end instead — but do not do both.

Worked example: win 100 with probability 0.35, lose 45 with probability 0.65 · E(X) = 100(0.35) + (−45)(0.65) = 35 − 29.25 = 5.75 · variance = 0.35(100 − 5.75)² + 0.65(−45 − 5.75)² = 4,783 · so σ ≈ 69.2, more than ten times the edge — a favourable bet that will still lose money most evenings.

Common mistakes to avoid

Probabilities that do not sum to 1. Usually an outcome is missing — most often the boring one where nothing happens.

Averaging the outcomes instead of weighting them. The plain average of 100 and −45 is 27.5; weighted by their real probabilities it is 5.75.

Reading E(X) as a forecast. It is the mean of many attempts. For one attempt, the standard deviation matters more than the mean.

Mixing gross and net payoffs. Decide whether the stake is already subtracted, then apply that to every row of the table.

Frequently Asked Questions

How do you calculate expected value?

Multiply each outcome by its probability and add the products: E(X) = x₁·P(x₁) + … + xₙ·P(xₙ). For a fair die that is 1(1/6) + 2(1/6) + 3(1/6) + 4(1/6) + 5(1/6) + 6(1/6) = 21/6 = 3.5. The probabilities have to cover everything that can happen, so they add up to exactly 1 — if yours do not, an outcome is missing, and it is usually the one where nothing happens.

Can the expected value be a number that never happens?

Yes, and it usually is. A die cannot roll 3.5 and a family cannot have 1.8 children, but both are correct expected values. The figure is the long-run mean of many repetitions rather than a prediction of the next one, which is why it lands between the outcomes instead of on one of them. The only time E(X) is guaranteed to be a real outcome is when every outcome is the same value.

What is the expected value of a bet?

Take the net profit of each result — winnings minus the stake — and weight them by their probabilities. A £1 bet on a single number in American roulette pays 35 to 1, so it wins +35 with probability 1/38 and loses −1 with probability 37/38, giving E(X) = 35(1/38) − 1(37/38) = −2/38 = −0.0526. That is the 5.26% house edge, per pound staked, and it is the same for every bet on the layout. Mixing gross winnings with net losses is the most common way this calculation goes wrong.

What is the difference between expected value and average?

An ordinary average treats every number equally; an expected value weights each one by how likely it is. The plain average of +100 and −45 is 27.5, but if the +100 happens only 35% of the time the expected value is 100(0.35) + (−45)(0.65) = 5.75. When every outcome is equally likely the two coincide — which is exactly what a mean of equally weighted data is.

How do you find variance and standard deviation from a probability distribution?

Variance is the probability-weighted average of the squared distances from the mean: Var(X) = Σ P(xᵢ)(xᵢ − μ)². The standard deviation is its square root, which puts the spread back into the units of the outcome. For the +100 / −45 bet above the variance is 4,783 and σ is about 69 — more than ten times the 5.75 edge, which is why a favourable bet can still lose money all evening.

Is a positive expected value always a good bet?

No. Expected value ignores three things that often decide the outcome: whether a bad run would end the game, that losing money hurts more than winning the same amount helps, and that outside dice and cards the probabilities are estimates rather than facts. The St. Petersburg game has an infinite expected value and almost nobody would pay £100 to play it. A positive expected value is a reason to repeat something many times at a size you can afford, not a reason to bet everything once.

Before you trust the answer

  • Every outcome is listed, including "nothing happens"
  • Probabilities add to exactly 1, or 100%
  • Values are net of the stake, consistently across rows
  • Losses entered as negative numbers
  • The standard deviation considered, not just the mean
  • The decision is repeated often enough for a mean to matter

Other useful calculators

Notes and limits

This calculator handles discrete random variables — a finite list of outcomes, each with a probability. Continuous distributions, where the expected value is an integral rather than a sum, are a different calculation, though the idea is identical.

The answer is only as good as the probabilities entered. For dice, cards and roulette those are known exactly; for business cases, investments or medical decisions they are estimates, and an expected value computed from estimates carries all of their uncertainty without showing it.

Nothing here is financial, gambling or investment advice. A positive expected value does not make a bet safe, and this page reports the standard deviation precisely because the mean on its own is not enough to decide anything you cannot afford to repeat.

Last updated

Formulas, worked examples, and references checked on this date.