Decision Tree and Expected Value Calculator

Free decision tree calculator. Draw the tree, compute the expected value of each option and see the best choice. Opens on sample vendor data.
In progress

A decision tree lays out a choice, the uncertain events that follow it and what each path pays. A square marks the decision, a circle marks a chance event and each branch from a circle carries a probability. Folding the tree back from the right gives every option an expected value, and the option with the highest expected value is the best choice for a decision maker who is neutral about risk.

The tool opens on the sample file, decision-tree-vendor-data.csv: 50 groups, each choosing between a local and an international vendor with a chance of success or failure. Pick a group to draw its tree. The summary below the tree gives the mean expected value of each vendor across all 50 groups. Switch to Your own tree to build one from scratch, with as many options and outcomes as the decision needs.

How it works

Each option ends in a chance node. Its expected value is the sum, over its branches, of probability times payoff. The branches leaving a chance node must have probabilities that add up to 1, and the tool flags any that add up to another total.

EV(option) = Σ pi × payoffiFor the sample file: EV = p × Payoff_Success + (1 − p) × Payoff_FailureBest choice = the option with the highest EV

A worked example from the file. Group 1’s local vendor succeeds with probability 0.740 and pays 6,943.62, and fails with probability 0.260 and pays −1,818.47. Its expected value is 0.740 × 6,943.62 + 0.260 × (−1,818.47) = 4,663.15, using the file’s unrounded probabilities. The best option’s branch is drawn bold, and the rejected option’s branch carries the 2 short strokes used to mark a pruned branch.

Across the file the mean expected value is 8,317.9 for the international vendor and 3,711.8 for the local vendor, and the international vendor has the higher expected value in all 50 groups. Expected value ignores how spread out the payoffs are, so a cautious decision maker may still prefer the option with the smaller possible loss.

Frequently Asked Questions

What is expected value in a decision tree?

Expected value is the probability-weighted average payoff of an option. Multiply each outcome's payoff by its probability and add the results. In a decision tree the option with the highest expected value is the best choice for a decision maker who is neutral about risk.

How do you solve a decision tree?

Work from right to left. At each chance node, compute the expected value of its branches. At each decision node, keep the branch with the highest expected value and mark the others as pruned. The value that reaches the first decision node is the value of the whole decision.

Do the probabilities on a chance node have to add up to 1?

Yes. The branches leaving a chance node cover every outcome of that event, so their probabilities add up to 1. In the sample file Probability_Success plus Probability_Failure equals 1 on all 100 rows, and the tool warns you if your own tree breaks this rule.

Where does the sample data come from?

The tool loads decision-tree-vendor-data.csv, a sample file of 50 vendor decisions. You can also open your own copy of the file from your device.

Is the decision tree calculator free?

Yes. It is free, runs in your browser and keeps your work on this device. Export the tree as PNG or PDF.