๐Ÿค–

Softmax Probability Calculator

Convert raw logit scores from a neural network into a probability distribution using the softmax function. Supports up to 10 class scores.

Results

P(Class 1)71.44 %
P(Class 2)15.94 %
P(Class 3)9.67 %
P(Class 4)2.16 %
P(Class 5)0.79 %

๐Ÿ“–What is it?

Softmax converts a vector of raw scores (logits) into probabilities that sum to 100%: P(i) = exp(zแตข) / ฮฃ exp(zโฑผ). It is used as the final activation function in multi-class neural network classifiers (e.g. image recognition, NLP). The class with the highest probability is the model's predicted class.

๐ŸŽฏHow to use

Enter the raw logit scores output by your neural network for each class (up to 5 classes here). Leave unused class fields at any value โ€” all five are used in the denominator. The probabilities show how confident the model is in each class.

๐Ÿ’กExample scenario

A 3-class image classifier outputs logits [2.5, 1.0, 0.5]. exp values: 12.18, 2.72, 1.65. Sum = 16.55. Probabilities: 73.6%, 16.4%, 10.0%. The model predicts Class 1 with 73.6% confidence.

๐Ÿ†Pro tip

Softmax is numerically unstable for large logit values. In practice, subtract the maximum logit before exponentiating (log-sum-exp trick). Temperature scaling (dividing logits by T) controls sharpness: T<1 makes distributions peakier, T>1 makes them softer (useful for calibration).