The probability formula defines the likelihood of the happening of an event. It is the ratio of favorable outcomes to the total favorable outcomes. The probability formula can be expressed as,

where,
- P(B) is the probability of an event ‘B’.
- n(B) is the number of favorable outcomes of an event ‘B’.
- n(S) is the total number of events occurring in a sample space.