How an Expected Value Calculator Works
Expected value, E[X], is the probability-weighted average of every outcome of a random variable — the long-run average you would approach over many repetitions. This guide covers the formula, a worked betting example, why the expected value is often an impossible outcome, how variance measures the risk around it, and where expected value shapes real decisions in insurance, gambling and investing.
What expected value really means
Expected value is the number you get when you average every possible outcome of a random situation, weighting each one by how likely it is to happen. Written E[X], it answers a single question: if you could repeat this exact gamble, game or measurement thousands of times, what would the average result settle down to? That long-run average is the expected value, and it is the anchor of almost every decision made under uncertainty — from pricing an insurance policy to deciding whether a bet is worth taking. Feed a list of outcomes and their probabilities into the expected value calculator and it returns E[X] along with the variance and standard deviation in one pass.
The word "expected" is a little misleading, and it trips up nearly everyone the first time. The expected value is not the outcome you should expect on any single try. It is a theoretical centre of gravity for the whole distribution — the balance point that the running average creeps toward as the number of trials grows. On one spin of a roulette wheel or one roll of a die, you will get one of the actual outcomes, never the expected value itself. The number only earns its name over the long run.
The formula, step by step
For a discrete random variable X — one that takes a countable list of values x with probabilities P(x) — the expected value is a probability-weighted sum:
E[X] = Σ x · P(x)
= x₁·P(x₁) + x₂·P(x₂) + … + xₙ·P(xₙ)The recipe is short. Multiply each outcome by its probability. Add up all those products. That sum is the expected value. Because the probabilities of a valid distribution add to 1, the result is a genuine weighted average rather than a plain one — outcomes that are more likely pull the answer toward themselves, and rare outcomes barely move it. A simple average treats every value as equally likely; the expected value does not, which is exactly why it describes real-world randomness better.
That distinction is worth dwelling on because it is the single most common misunderstanding. The mean of the list 2, 4, 6 is 4, because each number implicitly carries a probability of one-third. But if 6 occurs 90% of the time and 2 and 4 split the remaining 10%, the expected value is 0.05(2) + 0.05(4) + 0.90(6) = 5.7, far closer to 6. Same outcomes, different weights, different answer. These definitions follow OpenStax Introductory Statistics §4.2 and standard probability texts such as Ross, A First Course in Probability.
Worked example: is the bet worth it?
Suppose a friend offers you a wager on a single roll of a fair six-sided die. Roll a 6 and you win $20. Roll a 4 or 5 and you win $5. Roll anything else — a 1, 2 or 3 — and you pay $10. Should you play? Expected value settles it. First list the net outcomes and their probabilities, then multiply and add.
Outcome (net $) Probability P(x) x · P(x)
+20 (roll 6) 1/6 ≈ 0.1667 +3.333
+5 (roll 4,5) 2/6 ≈ 0.3333 +1.667
−10 (roll 1,2,3) 3/6 = 0.5000 −5.000
---------- --------
Σ P(x) = 1.0000 E[X] = 0.000The expected value is exactly $0 — this is a fair bet, favouring neither side over the long run. Nudge any number and the verdict flips: raise the 6-payout to $26 and E[X] climbs to +$1, a bet worth taking repeatedly; drop it to $14 and E[X] falls to −$1, a bet to walk away from. Enter the three outcomes (20, 5, -10) with their probabilities (0.1667, 0.3333, 0.5) into the expected value calculator and it returns the same E[X] = 0, plus a variance of about 116 and a standard deviation near $10.8 — a reminder that even a fair bet swings widely from trial to trial.
For a textbook-style distribution, the calculator's own default preview uses the number of heads in three fair coin tosses: outcomes 0, 1, 2, 3 with probabilities 1/8, 3/8, 3/8, 1/8, giving E[X] = 1.5 heads. That value matches the binomial shortcut np = 3 × 0.5, and you can confirm it against the binomial distribution calculator.
Why the expected value is often impossible
A fair die has an expected value of 3.5, yet no face shows 3.5. Three coin tosses have an expected 1.5 heads, but you can only ever get a whole number of heads. This is not a flaw — it is the whole point. The expected value is a summary of the distribution, not a forecast of the next trial, and there is no rule that a weighted average must coincide with an achievable outcome. A family with an average of 2.4 children does not have four-tenths of a child in the house.
Keeping this straight prevents a lot of muddled thinking. When a report says the expected cost of a project is $1.2 million, it does not mean anyone expects the bill to be exactly that. It means that across the range of plausible scenarios, weighted by their likelihood, the costs balance at $1.2 million — and the actual figure could land well above or below it. The spread around that centre is a separate question, and it is where variance comes in.
Expected value, variance and standard deviation together
Expected value tells you where a distribution is centred. It says nothing about how widely the outcomes swing around that centre, and two situations with an identical expected value can carry wildly different risk. A guaranteed $50 and a coin-flip between $0 and $100 both have E[X] = 50, but one is certain and the other is a gamble. Variance and standard deviation capture that difference.
Variance is the expected squared distance from the mean, Var(X) = Σ P(x)·(x − μ)², and the standard deviation σ is its square root. Because σ is expressed in the same units as X (dollars, points, heads), it is the more readable measure of spread — a large σ means the outcomes scatter far from the expected value, a small σ means they huddle close. The calculator reports all three, so you never have to choose between knowing the centre and knowing the risk. For a deeper treatment of spread on its own, see the standard deviation calculator and its full explainer.
Where expected value shows up in real decisions
Insurance and warranties
Insurance is expected value turned into a business. An insurer sets a premium above the expected payout of a policy — the probability of a claim multiplied by its cost — and the gap is the loading that covers expenses and profit. If a phone has a 4% chance of a $600 claim in a year, the expected payout is 0.04 × 600 = $24, so a $60 warranty carries a $36 expected margin for the seller. From the buyer's side, the expected value of the warranty is negative, which is precisely why extended warranties are usually a poor deal on cheap, replaceable items.
Lotteries, casinos and betting
Every commercial game of chance is engineered to have a negative expected value for the player. A roulette wheel with a single zero pays 35-to-1 on a number that hits 1 in 37 times, giving an expected return of about −2.7% of every dollar staked. Lotteries are worse, often returning 50 cents on the dollar in expectation. Expected value is the cleanest way to see the house edge for what it is — a small negative number that guarantees the operator a profit over millions of plays, no matter how any single ticket lands.
Investing and business choices
A venture with a 30% chance of returning $1,000,000 and a 70% chance of losing $200,000 has an expected value of 0.3(1,000,000) + 0.7(−200,000) = $160,000 — positive, and therefore worth considering on the numbers alone. Businesses use exactly this arithmetic to rank projects, size R&D bets and decide between strategies. The expected value does not tell you whether you can survive the 70% downside, but it tells you which way the long-run maths leans.
Everyday risk and decision-making
You do not need a spreadsheet to use expected value. Weighing whether to leave early for a flight, whether a repair is worth it on an ageing car, or which of two job offers has the better mix of pay and probability of a bonus — all of these are expected-value questions. The habit of asking "what is the probability-weighted outcome here?" is one of the most transferable ideas in all of statistics.
Common mistakes
Treating the expected value as the likely result. It is the long-run average, not the most probable single outcome. The most likely outcome (the mode) can be far from E[X], and E[X] itself may be impossible. Use expected value to compare options over many repetitions, not to predict one.
Forgetting the sign of losses. In any bet or business decision, money you pay out is a negative outcome. Enter losses as negative numbers — a payout of −$10, not $10 — or the expected value will come out far too optimistic. This catches a lot of people out on gambling calculations.
Probabilities that don't sum to 1. A valid discrete distribution has probabilities adding to exactly 1. If yours don't, an outcome is missing or a number is mistyped, and E[X] will be off. The calculator computes the value from whatever you enter but flags the sum when it strays from 1, so treat that warning as a prompt to recheck.
Ignoring the spread. Choosing the option with the higher expected value can be the wrong call when the variance is large and you only get one shot. A positive-EV bet that could bankrupt you is not obviously worth taking. Always read the standard deviation alongside the expected value.
When expected value isn't the whole story
Expected value is the right tool for repeatable decisions where the stakes are small relative to your resources — the classic "many small bets" setting. It is a weaker guide for one-off, high-stakes choices. Most people will not accept a 50-50 gamble between losing $10,000 and winning $11,000 even though its expected value is positive, because the pain of the loss outweighs the pleasure of the slightly larger win. This is risk aversion, and it is rational: decision theory handles it by working with the expected value of utility — a curved measure of how much each outcome is actually worth to you — rather than raw dollars.
Expected value also assumes you know the probabilities. When the odds themselves are uncertain, or when outcomes are correlated, or when a single catastrophic result would end the game, the plain expected value can mislead. Treat it as the indispensable first number in any decision under uncertainty — but pair it with the variance, the worst case, and a clear head about whether you are playing once or a thousand times.
Related calculators and further reading
The expected value calculator pairs naturally with a handful of others in the same family. The average calculator gives the plain (equally weighted) mean, median, mode and range of a raw list — useful when every value really is equally likely. The standard deviation calculator digs into spread, and its companion guide to averages untangles mean versus median. For probabilities of a fixed number of independent trials, the binomial distribution calculator and its explainer show where distributions like the coin-toss example come from, while the five-number-summary calculator and the dice roller help you explore real and simulated data. For the authoritative source material behind the formula, OpenStax Introductory Statistics §4.2 covers expected value, variance and standard deviation for discrete distributions with worked examples, and Ross, A First Course in Probability, derives the properties of expectation from first principles.
Return to the expected value calculator to run your own outcomes and probabilities.
Frequently asked questions
What is the difference between expected value and a plain average?
A plain average treats every value as equally likely and divides the total by the count. Expected value is a weighted average: each outcome is multiplied by its own probability before the products are added, so more likely outcomes pull the result toward themselves. The two coincide only when every outcome is equally probable. For a die where each face is equally likely, the expected value 3.5 equals the plain average of 1 to 6; for a loaded die or an uneven bet, the expected value and the plain average differ.
How do you calculate expected value by hand?
List each possible outcome and its probability, multiply each outcome by its probability, then add all the products: E[X] = Σ x·P(x). For example, with outcomes +20, +5 and −10 at probabilities 1/6, 2/6 and 3/6, E[X] = 20(1/6) + 5(2/6) + (−10)(3/6) = 3.33 + 1.67 − 5 = 0. Remember to enter losses as negative numbers and to check that your probabilities sum to 1.
Why can the expected value be an outcome that never happens?
The expected value is a weighted average of the distribution, not a prediction of any single trial, so there is no requirement that it equal an achievable outcome. A fair six-sided die has an expected value of 3.5 even though no face shows 3.5, and three coin tosses have an expected 1.5 heads even though you can only get a whole number. The expected value is the balance point the running average approaches over many repetitions, not the result you should expect on the next try.
What does a negative expected value mean?
A negative expected value means that, on average over many repetitions, the situation loses money or value. Every commercial lottery, casino game and most extended warranties have a negative expected value for the customer by design — that gap is how the operator makes a profit. A positive expected value means the long-run average is favourable; a value of zero describes a fair bet that favours neither side over time.
Why do I also need the variance and standard deviation?
Expected value tells you where a distribution is centred but nothing about how far outcomes swing around that centre. A guaranteed $50 and a coin flip between $0 and $100 share an expected value of $50 but carry completely different risk. Variance, Var(X) = Σ P(x)·(x − μ)², and its square root the standard deviation measure that spread. The expected value calculator reports all three so you can weigh the average outcome against the risk in one place.
When should I not rely on expected value alone?
Expected value is best for repeatable decisions where the stakes are small relative to your resources. For one-off, high-stakes choices it can mislead: most people rationally decline a 50-50 gamble between losing $10,000 and winning $11,000 despite its positive expected value, because the loss hurts more than the slightly larger win helps. This is risk aversion, and decision theory handles it with the expected value of utility rather than raw money. Also be cautious when the probabilities themselves are uncertain, when outcomes are correlated, or when a single catastrophic result would end the game.
Do the probabilities have to add up to exactly 1?
Yes, for a valid discrete probability distribution the probabilities must sum to exactly 1. The calculator still computes E[X] from whatever numbers you enter, but it warns you when the sum strays from 1, which usually means an outcome is missing or a probability was mistyped. Treat that warning as a prompt to recheck before trusting the result.
Informational only. Not personalised financial, legal, or tax advice.