IP subnetting is the process of dividing a single physical IP network into smaller, logical sub-networks (known as subnets). In network engineering and IT management, splitting a network is essential for controlling traffic congestion, optimizing routing paths, enhancing security protocols, and conserving public IP address ranges. Calculating subnet boundaries requires converting decimal IP addresses into binary form, applying mask logic, and translating results back.
An IPv4 address consists of 32 bits divided into four 8-bit octets. A subnet mask (like 255.255.255.0 or a CIDR /24 prefix) tells the computer which bits represent the network address and which bits represent individual host devices.
The network address is found by performing a bitwise logical AND operation between the IP address and the subnet mask in binary. To check bitwise binary math directly, check out our base-2 binary bits solver.
The broadcast address (used to send messages to all devices in the subnet) is found by setting all host bits to 1. The remaining values between the network address and broadcast address represent the usable host range. For checking IP formats in hexadecimal addresses, check our base-16 hexadecimal codes helper.
To find the number of usable hosts in a subnet, we use the formula: Usable Hosts = 2^h - 2, where h represents the number of host bits (32 minus the CIDR prefix).
We subtract 2 because the first address in the block is reserved for the network address, and the last address is reserved for the broadcast address. For example, a /24 subnet has 8 host bits, yielding 2^8 - 2 = 256 - 2 = 254 usable host IP addresses. Our online tool computes these values instantly.
Suppose you set up a home router with an IP address of 192.168.1.100 and a subnet mask of 255.255.255.0 (/24 prefix).
The calculator performs the binary AND operation. For a /24 mask, the first 24 bits (the first three octets: 192.168.1) represent the network, and the last octet (100) represents the host. The network address is 192.168.1.0. The broadcast address is 192.168.1.255. The usable host range includes all IPs between 192.168.1.1 and 192.168.1.254, supporting up to 254 devices. This example shows how subnetting divides local networks cleanly.