# How many side pots possible in case of n player table (assuming n to be any number)

When number of players are 2 then there is only 1 pot possible that is main pot but as the number of players increases there can be more pots possible, So my question is how many pots are possible in a n player table where n can be 2,4, 6,9

The answer: `n - 1`.

If all `n` players go all in and all `n` players have unequal stacks, then there will be `n - 1` different pots. If there are two stacks that are equal to one another you must substract one to get to the right amount of pots. If there are three stacks, substract two etc. This rule always holds except when the two, not more, largest stacks involved are the same. Then don't substract anything (this makes sense because if there was a biggest stack then he effectively wouldn't be all-in). When the three largest stacks have the same stack you should substract one, four largest stacks the same substract two etc.

One example:

Player 1: 3 chips.

Player 2: 5 chips.

Player 3: 8 chips.

Player 4: 9 chips, >> 8 chips effective.

Total pot: 24 chips.

Main pot: 3*4 = 12 chips for player 1.

Side pot 1: (5-3)*3 = 6 chips for player 2.

Side pot 2: (8-5)*2 = 6 chips for player 3/4.

The rule makes sense if you assume that the shortest stack has the best hand and then the next shortest stack has the best hand etc. Let me explain. The shortest stack with amount `x` must be able to win his stack back `n` times. Then the next shortest stack with amount `y` (who loses to the shortest stack) must be able to win `(y - x) * (n-1)`. Then the next shortest stack with stack `z` must be able to win `(z - y) * (n-2)` etc. You see this pattern of n, n-1, n-2. This will decrease until equal to two remaining players. Because in our example with n = 4 there is no point in calculating the side pot `n - 3 = 1` because this is just the extra chip player 4 has. He will always remain to have this chip.

If there are two stacks that are equal then you don't need two different pots for each player, but only one.