Calculate network details from IP and CIDR
The Subnet Calculator takes an IPv4 address and a subnet mask (in either CIDR prefix notation like /24 or dotted-decimal like 255.255.255.0) and instantly returns the network address, broadcast address, usable host range, and total host count for that block. It works with the standard IPv4 address classes and RFC 1918 private ranges (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16) as well as any public range.
Network engineers, sysadmins, and IoT developers use it when carving up address space, configuring routers and DHCP scopes, or planning device networks where every usable host counts. Instead of doing binary math by hand, you get the wildcard mask, first and last assignable host, and the count of usable addresses in one step.
An IPv4 address is 32 bits split into a network portion and a host portion by the subnet mask. The prefix length (the number after the slash) is simply how many leading bits are set to 1 in the mask. A /24 mask is 24 one-bits, which equals 255.255.255.0, leaving 8 host bits.
The number of addresses in a block is 2^(32 - prefix). For a /24 that is 2^8 = 256 total addresses. The network address is the first address (all host bits 0) and the broadcast address is the last (all host bits 1); neither is assignable to a host, so usable hosts = 2^(32 - prefix) - 2. A /24 therefore gives 254 usable hosts, a /26 gives 62, and a /30 gives 2 (common for point-to-point links). The tool computes each value with bitwise AND (address AND mask = network) and OR with the wildcard (network OR inverted-mask = broadcast).
Note the special cases: a /31 (RFC 3021) is treated as 2 usable point-to-point addresses with no separate broadcast, and a /32 represents a single host route.
They express the same thing. CIDR notation like /24 counts the number of network bits, while the dotted-decimal mask 255.255.255.0 writes those bits out. This tool accepts either and converts between them.
The first address in every block is reserved as the network identifier and the last is the broadcast address, so neither can be assigned to a device. Usable hosts equal total addresses minus 2 (except for /31 and /32).
The wildcard mask is the bitwise inverse of the subnet mask (for /24 it is 0.0.0.255). It is commonly used in Cisco access control lists and OSPF network statements to indicate which bits can vary.
Yes. It handles the RFC 1918 private ranges such as 192.168.0.0/16 and 10.0.0.0/8 that most home and IoT deployments use, so you can size DHCP scopes and device subnets accurately.
This calculator is built for IPv4 addressing (32-bit addresses and masks). IPv6 uses a different 128-bit scheme and prefix conventions, so it is not covered here.
Yes, it is completely free. The calculation runs in your browser, so the addresses you enter are not sent to or stored on a server.
Increase the prefix length. Moving from /24 to /25 splits one 256-address block into two 128-address blocks; /26 gives four blocks of 64. Enter each new prefix to see the resulting ranges.