IP + CIDR → network address, broadcast, host range & subnet mask
Enter any IPv4 address and a CIDR prefix length to instantly see the network address, broadcast address, subnet mask, and usable host range. The calculator applies a bitwise AND between the IP and the subnet mask to derive all values. Perfect for network planning, subnetting practice, or quick on-the-job lookups.
A /24 network gives 254 usable host addresses. The table below lists every prefix from /8 to /32 with host count and subnet mask.
| Prefix | Usable hosts | Total addresses |
|---|---|---|
| 8 | 16777214 | 16777216 |
| 9 | 8388606 | 8388608 |
| 10 | 4194302 | 4194304 |
| 11 | 2097150 | 2097152 |
| 12 | 1048574 | 1048576 |
| 13 | 524286 | 524288 |
| 14 | 262142 | 262144 |
| 15 | 131070 | 131072 |
| 16 | 65534 | 65536 |
| 17 | 32766 | 32768 |
| 18 | 16382 | 16384 |
| 19 | 8190 | 8192 |
| 20 | 4094 | 4096 |
| 21 | 2046 | 2048 |
| 22 | 1022 | 1024 |
| 23 | 510 | 512 |
| 24 | 254 | 256 |
| 25 | 126 | 128 |
| 26 | 62 | 64 |
| 27 | 30 | 32 |
| 28 | 14 | 16 |
| 29 | 6 | 8 |
| 30 | 2 | 4 |
| 31 | 2 | 2 |
| 32 | 1 | 1 |
You take the IP address and the prefix length (or subnet mask), convert both to binary and apply a bitwise AND to get the network address; the host bits set to all ones give the broadcast address, and everything in between is the usable host range. Enter the address and prefix above and the network, broadcast, mask and host range are worked out for you.
It means the first three octets identify the network and only the last octet identifies the host, so all addresses that share those three octets are on the same local network. This mask is the same as prefix /24 and is the classic mask for small LANs.
That depends on how far you split it: a /24 can be divided into smaller equal blocks by borrowing host bits, and each extra bit you borrow doubles the number of subnets while halving the hosts per subnet. Pick the target prefix in the calculator to see the resulting subnet count and host range.
On Windows run ipconfig in the command prompt and read the "Subnet Mask" line; on macOS and Linux use ifconfig or ip addr, where the prefix is shown after the slash. Paste that address and mask into the calculator to see the network, broadcast and host range.
Apply the subnet mask to both the address you are testing and the network address — if both AND results are identical, the address belongs to that subnet. In practice it is easier to compare the address against the network's first and last address, which the calculator lists for you.
It sits in the private IPv4 range reserved for local networks, and most consumer router vendors ship it as the default gateway address and web interface address. Because it is private, it is never routed on the public internet, so every home network can reuse it.
Split your existing private range into smaller blocks with a longer prefix, assign each block to a separate VLAN or interface on a router that supports it, and give every subnet its own gateway and DHCP scope. Typical reasons are separating guests, IoT devices and cameras from your main network.
Whether you're a network engineer designing a corporate infrastructure, a student studying for your CCNA certification, or a cloud architect provisioning virtual networks, understanding subnets is essential. Our free Subnet Calculator takes any IPv4 address combined with a CIDR prefix length and instantly returns the network address, broadcast address, usable host range, subnet mask, and total host count.
Subnetting is the practice of dividing a larger IP network into smaller, logically isolated sub-networks. This technique is fundamental to modern networking because it optimizes IP address allocation, reduces unnecessary broadcast traffic, and enhances network security by segmenting different groups of devices.
Imagine a mid-sized company with 500 employees spread across three departments. Instead of placing every device on a single flat network, the IT team can create separate subnets for Finance, Engineering, and Operations. Each subnet limits broadcast domains, allows targeted firewall policies, and makes troubleshooting significantly easier.
CIDR (Classless Inter-Domain Routing) notation expresses a network as an IP address followed by a slash and a prefix length — for example, 192.168.1.0/24. The number after the slash indicates how many bits are used for the network portion. The remaining bits define the host space. A /24 means 24 network bits and 8 host bits, allowing up to 254 usable hosts.
Using our subnet calculator is straightforward. Simply enter an IP address along with its CIDR prefix (e.g., 10.10.5.100/22) and click Calculate. The tool immediately returns:
Let's work through 172.16.50.200/20. A /20 prefix uses 20 bits for the network, leaving 12 bits for hosts (4,096 addresses total). The calculator produces:
This kind of result is invaluable when configuring routers, setting up DHCP scopes, or writing access control lists (ACLs).
The subnet calculator is used daily by networking professionals across many scenarios:
Even experienced engineers sometimes make subnetting errors. Here are the most common pitfalls:
They represent the same concept in different formats. A subnet mask like 255.255.255.0 uses dotted-decimal notation, while the CIDR prefix /24 expresses the same information as a bit count. Both indicate that 24 bits are reserved for the network portion of the address.
A /29 subnet has 8 total addresses (2³). Subtracting the network and broadcast addresses leaves 6 usable host addresses. It's commonly used for small network segments or router interconnects.
Absolutely. The calculator works for all valid IPv4 addresses including private ranges: 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16, as well as public IP ranges. The subnet math is identical regardless of the address class.
A /32 subnet represents a single host address — there are no additional host bits. It is used in routing tables to define a specific host route or in configurations like loopback interfaces. There are 0 usable hosts in the traditional sense, as the single address is both network and host.
This calculator is optimized for IPv4 subnetting. IPv6 uses 128-bit addresses and different subnetting conventions, so a dedicated IPv6 tool would be more appropriate for those calculations.