Understanding the expected utility calculator — concept and principle
This calculator compares two risky options by expected utility. You list each option's outcomes with their chances, add your current wealth and choose a utility function (linear, logarithmic, power or exponential). It reports the preferred option, the expected value, the certainty equivalent and the risk premium of each. Use it in economics, decision theory and finance courses.
How it is calculated
Expected value EV = Σ pᵢ × xᵢ
Expected utility EU = Σ pᵢ × u(W₀ + xᵢ)
Certainty equivalent CE: the sure amount with u(W₀ + CE) = EU
Risk premium = EV − CE
- Utility functions: linear u = W (risk-neutral); logarithmic u = ln W; power (CRRA) u = W^(1−ρ) ÷ (1−ρ); exponential (CARA) u = −e^(−aW).
- Logarithmic and power utility need positive final wealth.
The principle
People often prefer a sure amount to a gamble with a higher average. Expected utility explains this with a concave utility function: each extra unit of money adds less satisfaction than the one before, so losses hurt more than equal gains help. Averaging utility instead of money therefore penalises spread. The certainty equivalent turns the abstract utility back into money, and the gap to the expected value measures how much the risk costs this decision-maker.
Worked example
Default inputs: A = 50 % of 100,000 and 50 % of 0; B = 100 % of 40,000; wealth 50,000; logarithmic utility.
- Expected values: A = 0.5 × 100,000 = 50,000; B = 40,000.
- EU(A) = 0.5 ln 150,000 + 0.5 ln 50,000 = 0.5 × 11.9184 + 0.5 × 10.8198 = 11.3691.
- EU(B) = ln 90,000 = 11.4076, higher, so Option B (higher expected utility) is preferred.
- CE of A: e^11.3691 − 50,000 = 86,602.54 − 50,000 = 36,602.54; CE of B = 40,000.
- Risk premiums: A = 50,000 − 36,602.54 = 13,397.46; B = 0.
How to read the result
With log utility and 50,000 of wealth, the coin flip for 100,000 is worth only about 36,600 for sure, less than the safe 40,000, even though its average is higher. With more wealth the gamble is a smaller share of what you have, so the risk premium shrinks; with linear utility it disappears and the higher EV wins.
Common mistakes
- Comparing expected utilities across different utility functions; only the order within one function matters.
- Forgetting to add current wealth to every outcome.
- Probabilities that do not add up to 100 %.
- Reading utility values as money; use the certainty equivalents for that.
Frequently asked questions
What is a certainty equivalent?
The guaranteed amount that gives the same expected utility as the risky option.
What is a risk premium?
Expected value minus certainty equivalent: what a risk-averse person would give up to avoid the risk.
Why use logarithmic utility?
It is a simple concave function in which the same percentage change in wealth always matters equally.
Sources: J. von Neumann & O. Morgenstern (1944), Theory of Games and Economic Behavior, Princeton University Press