The handshake formula is ‘number of handshakes = n x (n – 1) / 2.’ This is where ‘n’ is the number of people who can shake hands with ‘n-1’ people (not shaking their own hand), and the handshake between two people is not counted twice. The formula can therefore be applied to any number of people.