Bitwise AND/OR on the 32-bit address with the CIDR mask.
A subnet calculator divides an IP network into smaller subnetworks (subnets) and shows the key facts about each one: the network address, broadcast address, subnet mask, and the range of usable host addresses. Network engineers use it when designing office networks, VLANs, and cloud VPCs, and students use it to check their networking homework. It works for IPv4, the 32-bit address system still dominant in most LANs.
An IPv4 address is 32 bits. CIDR notation like /24 says how many of those bits identify the network; the rest identify hosts:
Take the network 192.168.1.0/24:
Now split it into /26 subnets (borrowing 2 bits → 4 subnets), each with 26 − 2 = 62 usable hosts:
| Subnet | Network | Usable range | Broadcast |
|---|---|---|---|
| 1 | 192.168.1.0 | 192.168.1.1 – 62 | 192.168.1.63 |
| 2 | 192.168.1.64 | 192.168.1.65 – 126 | 192.168.1.127 |
| 3 | 192.168.1.128 | 192.168.1.129 – 190 | 192.168.1.191 |
| 4 | 192.168.1.192 | 192.168.1.193 – 254 | 192.168.1.255 |
/24 means the first 24 bits are the network part — shorthand for writing the subnet mask.
The network address and broadcast address cannot be assigned to devices.