E[X] = Σ x·p — enter outcomes and probabilities, get expected value, variance and standard deviation, all in your browser
- Runs locally
- Category Calculator
- Best for Getting a realistic range before a purchase, plan, workout, or schedule decision.
| Value x | Probability p | |
|---|---|---|
Separators :, comma or space all work. Probabilities can be fractions like 1/6.
What this tool does
Free expected value calculator for discrete random variables. Type each possible outcome with its probability and the tool returns E[X] = Σ x·p, the variance Var = Σ p·(x − E)² and the standard deviation, instantly and entirely in your browser. Probabilities accept fractions like 1/6, so the classic fair-die case (E = 3.5) takes three seconds to verify. If your probabilities do not add to 1 the tool still works: it treats the column as weights and computes a weighted mean, and a one-click button normalizes everything to a clean distribution. Built for students checking homework, gamblers sizing up a bet, analysts comparing risky decisions and insurers pricing a claim. Paste a list as text or fill the table row by row, copy the result, and share a link that reopens your exact inputs. 100% client-side, nothing is uploaded or logged.
Tool details
- Input
- Text + Numbers
- The page exposes text boxes, numeric controls, file pickers, or structured inputs depending on the tool.
- Output
- Live result + Copy
- The result area focuses on usable output, with copy, download, or preview actions when supported.
- Privacy
- Browser-side processing
- The main tool logic does not call an external API, so inputs normally stay in the current tab.
- Save / share
- Shareable URL state
- Key settings are encoded in the URL so another person can reopen the same setup.
- Performance budget
- Initial JS <= 9 KB
- No WASM budget is declared, keeping the tool quick to open on mobile.
- Best fit
- Calculator · Student
- Category and role tags drive related tools, internal links, and quick fit checks.
How to use
-
1. Input
Paste or drop your content into the tool panel.
-
2. Process
Click the button. All processing is local in your browser.
-
3. Copy / Download
Copy the result or download to disk in one click.
How Expected Value Calculator fits into your work
Use it for fast estimates, comparisons, and planning numbers before you make the final call.
Calculation jobs
- Getting a realistic range before a purchase, plan, workout, or schedule decision.
- Comparing scenarios by changing one input at a time.
- Turning rough assumptions into a number you can discuss.
Calculation checks
- Double-check units, dates, rates, and rounding assumptions.
- Treat health, finance, tax, and legal outputs as planning aids, not professional advice.
- Save the inputs that produced an important result so you can reproduce it later.
Good next steps
These links move the current task into a more complete workflow.
- 1 Statistics Basic Calculator Basic statistics calculator — mean/median/mode/variance/std-dev/quartiles/range/IQR/skewness/kurtosis + histogram + box plot, paste any numbers. Open
- 2 Dice Probability Calculator Exact odds for any NdS roll: full sum distribution, expected value, and P(sum = / ≥ / ≤ X), counted not simulated Open
- 3 Probability Distribution Visualizer Probability distribution visualizer — normal/t/chi-sq/F/binomial/poisson/exp/uniform PDF+CDF, P(a≤X≤b) area, z/p table replacement. Open
Real-world use cases
Check a probability homework answer
A stats assignment asks for the expected value of a discrete random variable: outcomes 0, 1, 2, 3 with probabilities 0.1, 0.3, 0.4, 0.2. Type them in, read E[X] = 1.7, and confirm the variance and standard deviation in the same view. Because probabilities accept fractions, the fair-die warm-up problem (E = 3.5) takes seconds, and you can paste the whole list as text instead of clicking row by row.
Decide whether a bet is worth it
Before putting money down, model the bet as outcomes and probabilities. A $1 stake on red in American roulette pays +1 with probability 18/38 and −1 with probability 20/38, and the tool shows E[X] ≈ −$0.053. Seeing a negative expected value in black and white is the clearest way to understand why the house always wins over the long run, no matter how a single spin goes.
Compare two risky business decisions
Project A might earn $400,000 (probability 0.05), $50,000 (probability 0.25) or nothing. Project B earns a steady $15,000. Enter each project as its own set of outcomes, compare the expected values, and look at the standard deviation to judge risk. The higher expected value is not always the right call once you weigh how much the outcomes swing around that average.
Price an insurance policy or warranty
An extended warranty pays out $4,800 with probability 0.03 and collects a $200 premium otherwise. Model the insurer's net as −200 with probability 0.97 and +4,800 with probability 0.03 to see the expected value per policy. That single number tells you whether the premium covers the expected claim cost with room for profit and administration.
Common pitfalls
Forgetting that probabilities must sum to 1. If they add to 0.9 you are missing an outcome or mistyped a value, and the raw E[X] is off. The tool flags the sum and offers a normalize button — but check whether a missing case is the real reason before normalizing away the gap.
Treating expected value as a value you will actually get. E[X] for a fair die is 3.5, which never appears on a single roll. Expected value is a long-run average across many trials, not a prediction for one trial — useful for pricing and decisions, not for guessing the next outcome.
Confusing variance and standard deviation. Variance is in squared units; standard deviation is its square root and shares the units of the outcomes. Reporting a variance of 25 when you meant a spread of 5 (the standard deviation) overstates the risk by a factor you did not intend.
Privacy
Every calculation — the expected value, the variance, the standard deviation and the probability sum — is plain JavaScript that runs in your browser tab. Your outcomes and probabilities never leave the page and nothing is logged. The one caveat: the shareable URL encodes your table in the query string, so a share link pasted into chat will record those numbers in the recipient server's access log. If the values are sensitive, use the copy button and paste the text rather than sharing the link.
FAQ
Tool combos
Folks in your role tend to reach for these alongside this tool.
- Chinese Acupoint Locator 200+ meridian acupoints / WHO 2008 standard locations / with contraindications, manipulation, and combinations.
- Affine Cipher Encoder & Decoder Encrypt and decrypt the ax+b affine cipher with live modular-inverse check, browser-only
- Anagram Solver Check if two words are anagrams, rearrange a set of letters into every ordering, and read the sorted letter fingerprint, all in your browser
- Angle Converter Degrees, radians, gradians, turns, arcminutes, arcseconds and NATO mils, all from one input, copyable, browser-only