How many computers can have the same public IP?

Solution 1:

There is no limit to the number of computers, however there is a limit to the number of simultaneous connections because of the possibility of ephemeral port exhaustion. More computers usually means more connections so there is a practical limit to how many computers will typically share the same IP address. Usually with a very large number of computers, multiple IP addresses will be shared in a pool to be used for NAT.

Solution 2:

As many as can dance on the head of a pin - Or more accurately as many as an administrator wants to hide behind NAT.