Softmax CalculatorFree online math calculator — instant results, no sign-up
Convert a list of real scores into normalized exponential probabilities.
Sign in to save results and favorites.
About the Softmax Calculator
The Softmax Calculator converts a list of real scores into normalized exponential probabilities, preserving the order of the input values. Larger scores receive larger probabilities, and the probabilities sum to 1 before rounding. For the default values 2, 4, 6, 8, 10, the score 10 receives the largest share: approximately 86.47%.
- Values
- Enter a comma-separated list of finite real scores, such as the default 2, 4, 6, 8, 10; scores are treated as dimensionless inputs.
Formula and method
p_i = exp(x_i) / Σ(j=1 to n) exp(x_j). An equivalent, numerically stable form is p_i = exp(x_i − m) / Σ(j=1 to n) exp(x_j − m), where m = max(x_1, …, x_n).
- x_iThe score at input position i.
- p_iThe normalized probability corresponding to score x_i.
- nThe number of scores in the list.
- iThe position of the score whose probability is being calculated.
- jThe index used to sum over every score in the list.
- mThe largest input score, subtracted for numerical stability.
- expThe natural exponential function, exp(x) = e raised to the power x.
- ΣSummation over all indicated input positions.
Subtract the largest score from every input, exponentiate the shifted scores, sum those exponentials, and divide each exponential by the sum. For 2, 4, 6, 8, 10, the maximum is 10 and the shifted scores are −8, −6, −4, −2, 0. Their exponentials sum to approximately 1.1561296743. Normalizing gives 0.0002900759, 0.0021433869, 0.0158376057, 0.1170249573, 0.8647039743, respectively. Subtracting the maximum does not change the mathematical result.
Worked example
These are the calculator's starting values and the results it actually produces for them.
Inputs
- Values2, 4, 6, 8, 10
Results
- Probabilities0.0002900759, 0.0021433869, 0.0158376057, 0.1170249573, 0.8647039743
How to use the Softmax Calculator
- 1Enter the scores in Values, separated by commas; retain 2, 4, 6, 8, 10 to reproduce the worked example.
- 2Check that every entry is a finite real number and that all scores use a comparable scale.
- 3Run the calculation to normalize the exponentials of the scores.
- 4Read each probability alongside its corresponding score, keeping the original input order.
- 5Check that the probabilities total approximately 1, allowing for displayed rounding.
Reading your result
Each output row represents one input position and its share of the total exponential weight. For the default inputs, the score-to-probability pairs are 2 → 0.0002900759; 4 → 0.0021433869; 6 → 0.0158376057; 8 → 0.1170249573; and 10 → 0.8647039743. Multiply a probability by 100 to express it as a percentage. These are relative weights within the supplied list, not automatically calibrated chances of real-world events.
Limitations
Softmax assumes finite, dimensionless scores on a comparable scale and uses no temperature adjustment. Multiplying the scores by a factor changes the distribution, so score scale matters. Extreme score gaps can cause very small probabilities to round or underflow to zero, even though exact softmax probabilities are positive. Displayed probabilities may not sum to exactly 1 because of rounding. An empty list has no defined softmax distribution, and infinite or nonnumeric entries are not valid finite-score inputs.
Common questions
Why does 10 receive most of the probability for the default list?+
Softmax exponentiates the scores rather than dividing each score by their sum. In 2, 4, 6, 8, 10, every successive score is larger by 2, so its exponential weight is e² times the preceding weight. This gives 10 a probability of 0.8647039743.
Does subtracting the largest score change the probabilities?+
No. Subtracting the same constant from every score multiplies all exponential weights by the same factor, which cancels during normalization. Subtracting the maximum helps avoid exponential overflow.
Can softmax accept negative scores or repeated values?+
Yes. Finite negative scores are valid because their exponentials are positive. Repeated scores receive equal probabilities but remain separate entries; if all scores are equal, each receives 1/n.
Will a score keep the same probability if I add another score to the list?+
No. Every probability depends on the denominator containing all exponential weights. Adding another finite score increases that denominator and reduces each existing score's exact probability, although a very small change may not appear at the displayed precision.
Does the calculator save my information?+
Calculations run in your browser. While signed in, inputs and results are automatically recorded in account history; saving a result creates a separate saved record.
You might also like
Standard Deviation Calculator
Sample and population standard deviation of a data set.
Number Sequence Calculator
Terms and sums of arithmetic and geometric sequences.
Sample Size Calculator
Sample size for a survey at a confidence level.
Probability Calculator
Combined probabilities of two independent events.
Statistics Calculator
Summary statistics for a data set.
Mean, Median, Mode, Range Calculator
Central tendency and spread of a list.
Results are estimates for informational purposes and are not financial, medical or legal advice.