How to use this calculator
Convert arbitrary class scores to a probability vector using a numerically stable softmax and temperature.
- Enter Class logits, Temperature. Match the units shown beside each field and review the result together with the assumptions below.
- Read the worked example below to check the expected input format and result.
- Compare another scenario by changing one input at a time. Use Reset to return to the starting values.
Stable softmax probabilities explained
Normalize temperature-scaled class logits, subtracting the largest logit before exponentiation for numerical stability.
How the calculation works
exp(logit/T) normalized
Subtract the largest logit, divide by positive temperature, exponentiate and normalize across the mutually exclusive classes. Scores must correspond to mutually exclusive classes; the result is a transformation, not evidence of calibration..
Set up the calculation
a— Class logits- Finite unnormalized class scores, one per mutually exclusive class. They are not probabilities and may be shifted by a common constant without changing the result.
t— Temperature- Positive scaling divisor before normalization; lower values sharpen the distribution and higher values flatten it.
Limits of this model
Scores must correspond to mutually exclusive classes; the result is a transformation, not evidence of calibration.
Check this example
Class logits = 1, 2, 3; Temperature = 1.
- First-class probability: 0.09003057
- All probabilities: 0.09003057, 0.24472847, 0.66524096
The output probabilities are about 0.09003, 0.24473 and 0.66524; they sum to one but do not establish that the model is calibrated.
Interpreting the result
These values sum to one and preserve logit order, but they are model probabilities only; calibration requires comparison with observed outcomes.
Frequently asked questions
Why subtract the largest logit?
It avoids exponential overflow without changing probabilities.
What does higher temperature do?
It makes the distribution flatter.
Do probabilities sum to one?
Yes, up to floating-point rounding.
How do I use the Stable softmax probabilities calculator?
Enter Class logits, Temperature. Match the units shown beside each field and review the result together with the assumptions below.
What is a worked example of Stable softmax probabilities?
Class logits = 1, 2, 3; Temperature = 1. First-class probability: 0.09003057 All probabilities: 0.09003057, 0.24472847, 0.66524096 The output probabilities are about 0.09003, 0.24473 and 0.66524; they sum to one but do not establish that the model is calibrated.
Read our calculation methodology.