There's an equation to calculate out the probability,
Probability : P
Event : E
P(E) = number of outcome favorable to event E / total number of possible outcomes
Here's an example.
There are 4 socks, only 1 is in white color
What is the probability of picking white sock if we choose a sock from the 4 in random?
P (white sock) = 1/4