Subnet Mask Calculator is a simple PHP script that will return the subnet mask and slash-notated mask for a given number of hosts.