The formula \(\frac{n(n-1)}{2}\) is used to calculate the number of matches in a round-robin tournament, where every team plays against each other. This formula works for tournaments with an even number of teams, where \(n\) represents the total number of teams.