Blog

IPv4 subnet calculation: find a prefix and address range for 50 devices

Use the IPv4 subnet calculator to choose a prefix for 50 host addresses, find the network and assignable range, convert CIDR to a subnet mask, and copy the results with English UI screenshots.

The English IPv4 subnet calculator with 50 required hosts, showing that /26 provides 62 usable host addresses

When assigning IPv4 addresses to 50 devices, first choose a subnet size that provides at least 50 usable host addresses. Then check which subnet contains the proposed IP address and which addresses can be assigned. Use the IPv4 subnet calculator to answer these two questions in order.

This example uses 192.0.2.70. The 192.0.2.0/24 block containing this address is reserved for examples in documentation. In an actual design, use the address range allocated to your organization. RFC 5737

Find the prefix needed for 50 host addresses

  1. In the VLSM helper, enter 50 in Required hosts and click Suggest.
  2. The result is /26, with 62 usable hosts. IPv4 addresses have 32 bits, so /26 leaves 6 bits for the host portion. Of the 64 addresses, the first is the network address and the last is the broadcast address, leaving 62 that can be assigned to devices.
  3. If a configuration screen requires a dotted-decimal mask, enter 26 without the slash in the “CIDR” field of the mask conversion section above, then click “CIDR → Mask”. The result is 255.255.255.192.
The English UI showing /26 and 62 hosts for 50 required hosts, with CIDR 26 converted to 255.255.255.192
Converting the /26 prefix found from the host requirement into a dotted-decimal subnet mask.

When counting the addresses you actually need, include devices such as the default gateway that also use an address in this subnet, as well as the endpoints.

Check which subnet contains 192.0.2.70

  1. In the single IP address inspection section, enter 192.0.2.70 in “IP address”. Select “CIDR /n”, enter 26 in the numeric field, and click “Calculate”. Enter the value used for conversion again in this inspection section.
  2. The results show the network as 192.0.2.64/26 and the broadcast address as 192.0.2.127. Devices can be assigned addresses from 192.0.2.65 to 192.0.2.126.
  3. To keep the results in your design notes, click “Copy” in the results section. In the pasted text, Network (CIDR) identifies the network and Host Range identifies the assignable range.
The English results table showing network 192.0.2.64/26, broadcast 192.0.2.127, and host range 192.0.2.65 to 192.0.2.126
An extract from the results for 192.0.2.70/26. Host Range gives the addresses that can be assigned to devices.

Check these points before assigning addresses

The calculated range comes from the mask. Use the deployed configurations and address inventory to check whether it overlaps an existing subnet and whether addresses in the range are already in use.

If you request 2 hosts, the tool suggests /31. This can be used to assign an address to each end of a point-to-point link between compatible devices. For 2 usable host addresses on a conventional LAN, start by considering /30, which provides 2 addresses after excluding the network and broadcast addresses. The tool treats /32 as one address. RFC 3021