Weighted Random Picker
One per line, as "label, weight". A line without a weight counts as 1.
The picker draws one option from a list where the options are not equally likely. You give each a weight, and it shows the resulting chance as a percentage before you draw, which is the part most weighted pickers leave out, and the part that catches a weight you did not mean.
How it works
Weights are relative, not percentages. An entry with weight 70 against entries of 25 and 5 has a 70% chance because those happen to total 100; weights of 7, 2.5 and 0.5 give exactly the same odds. That is why the computed percentage is shown rather than assumed.
- Add up every weight to get a total.
- Pick a random point between zero and that total.
- Walk the list, accumulating weights, until the running total passes the point.
- The entry that pushed it past is the winner.
- A line with no weight counts as 1, so a plain list behaves as an even draw and weights can be added gradually.
- Weights can be fractional. 0.5 is half as likely as 1.
- A weight of zero or below removes the entry from the draw entirely, and it is shown at 0% rather than silently dropped.
- The random point is drawn with the browser cryptographic generator at a resolution of one part in a million, so small weights stay meaningful.
Examples
A loot table
Entries
Common 70, Uncommon 25, Rare 5
Result
70.0%, 25.0%, 5.0%
The weights total 100, so they read as percentages directly. That is a convenience, not a requirement.
The same odds, different numbers
Entries
Common 14, Uncommon 5, Rare 1
Result
70.0%, 25.0%, 5.0%
Weights are relative to their total, so scaling them all by the same factor changes nothing. Seeing the percentages makes that obvious.
Weighting a rota
Entries
Alex 1, Sam 1, Jo 2
Result
25.0%, 25.0%, 50.0%
Jo is twice as likely as either of the others. A useful shape when someone has volunteered for a double share.
Frequently asked questions
Do the weights have to add up to 100?
No. They are relative to each other, so each chance is that entry's weight divided by the total. Weights of 1, 1 and 2 give 25%, 25% and 50%. Making them total 100 is convenient because they then read as percentages, but nothing requires it.
What happens if I give something a weight of zero?
It is excluded from the draw and shown at 0%. That is deliberate. It lets you keep an option in the list while taking it out of contention, rather than deleting and retyping it. A negative weight is treated the same way.
Can I use decimal weights?
Yes. 0.5 is half as likely as 1, and 2.5 is two and a half times. The random point is drawn at a resolution of one in a million, so fractional weights behave correctly rather than rounding to nothing.
The 5% option came up first, is it broken?
No. A 5% chance is one in twenty, which happens regularly. A weighted draw makes the unlikely outcome unlikely, not impossible. Over many draws the proportions converge on the stated percentages; over three draws they will not.
How is this different from the wheel spinner?
The wheel gives every option an identical chance and exists for the spectacle. This gives them deliberately unequal chances and shows the odds. Use the wheel for a fair decision in front of a group, and this for a loot table, a rota with an uneven share, or any draw where fairness is not the goal.