Subnet for 150 hosts

A network that needs 150 hosts fits in a /24, mask 255.255.255.0, with 254 usable addresses.

150
Hosts needed
/24
Smallest fitting prefix
255.255.255.0
Subnet mask
254
Usable hosts

A network built for 150 hosts needs a /24. The mask is 255.255.255.0, and its 254 usable addresses leave 104 spare for growth.

The next smaller block, a /25, only allows 126 usable addresses, which is not enough for 150 hosts. That makes /24 the smallest block that fits.

Enter any address below to see the exact network, broadcast, and host range for a /24 block.

Calculate a /24 network

Accepts CIDR (192.0.2.0/24), IP + mask (192.0.2.0 255.255.255.0), or a bare IP (defaults to /24).

Network address192.0.2.0
Usable host range192.0.2.1 - 192.0.2.254
Broadcast address192.0.2.255
Usable hosts254
Subnet mask255.255.255.0
Wildcard mask0.0.0.255
CIDR notation192.0.2.0/24
Total addresses256
IP (binary)11000000.00000000.00000010.00000000
Mask (binary)11111111.11111111.11111111.00000000
Try:

Example: 192.0.2.0/24

Taking 192.0.2.0/24 as a worked example, a /24 block breaks down like this:

Network address192.0.2.0
Usable range192.0.2.1 - 192.0.2.254
Broadcast address192.0.2.255
Total addresses256
Usable hosts254

Frequently asked questions

What subnet mask do I need for 150 hosts?

A network with 150 hosts fits in a /24, which uses the mask 255.255.255.0 and provides 254 usable addresses.

How many addresses does a /24 block have in total?

A /24 has 256 total addresses, 254 of them usable (the total minus the network and broadcast addresses, except for /31 and /32).

Does a /24 waste any addresses for 150 hosts?

Yes, 104 addresses of headroom. A /24 provides 254 usable addresses for the 150 you need, and the next smaller block, a /25, does not hold enough.

How do I work this out myself?

Find the smallest power of two, minus two, that is at least 150. That takes 8 host bits, which leaves a /24 prefix. See how to calculate a subnet mask for the full method.