Enter an IPv4 address and a CIDR prefix to get the network address, broadcast address and number of usable hosts. A /n prefix leaves 32 − n host bits, so the block has 2^(32 − n) addresses and 2^(32 − n) − 2 usable hosts, because the network and broadcast addresses are reserved. Example: 192.168.1.10/26 has mask 255.255.255.192, network 192.168.1.0, broadcast 192.168.1.63 and 62 usable hosts (192.168.1.1–192.168.1.62). Exceptions: a /31 point-to-point link has 2 usable addresses (RFC 3021) and a /32 is a single host.
This IP subnet calculator returns the IPv4 network address, broadcast address and usable host count for an IP and CIDR prefix. Enter a dotted quad and a prefix length to see the network in address/prefix form.
Network students and admins use it to confirm which subnet an interface address belongs to before writing routes or firewall rules. It shows the network ID, broadcast address and usable host count, not a full inventory of every host.
How the network ID is found
The tool converts the IP to a 32 bit number, builds a mask from the CIDR length, bitwise ANDs them, converts back to dotted decimal, and appends /cidr.
Worked example
IP 192.168.1.10, CIDR 24. Network result is 192.168.1.0/24.
| Input | Value |
|---|---|
| IPv4 address | 192.168.1.10 |
| CIDR prefix | 24 |
| Network | 192.168.1.0/24 |
How to use the fields
- IPv4 address must have four octets from 0 to 255.
- CIDR prefix is an integer from 1 to 32.
- Use the prefix that matches the interface mask you were given.
Reading CIDR quickly
/24 keeps the first three octets as the network and leaves 8 host bits. /16 keeps the first two octets. /32 is a single host route. Smaller prefixes mean larger networks and more host addresses.
CIDR to subnet mask table
| CIDR | Subnet mask | Wildcard | Addresses | Usable hosts |
|---|---|---|---|---|
| /8 | 255.0.0.0 | 0.255.255.255 | 16,777,216 | 16,777,214 |
| /12 | 255.240.0.0 | 0.15.255.255 | 1,048,576 | 1,048,574 |
| /16 | 255.255.0.0 | 0.0.255.255 | 65,536 | 65,534 |
| /20 | 255.255.240.0 | 0.0.15.255 | 4,096 | 4,094 |
| /22 | 255.255.252.0 | 0.0.3.255 | 1,024 | 1,022 |
| /23 | 255.255.254.0 | 0.0.1.255 | 512 | 510 |
| /24 | 255.255.255.0 | 0.0.0.255 | 256 | 254 |
| /25 | 255.255.255.128 | 0.0.0.127 | 128 | 126 |
| /26 | 255.255.255.192 | 0.0.0.63 | 64 | 62 |
| /27 | 255.255.255.224 | 0.0.0.31 | 32 | 30 |
| /28 | 255.255.255.240 | 0.0.0.15 | 16 | 14 |
| /29 | 255.255.255.248 | 0.0.0.7 | 8 | 6 |
| /30 | 255.255.255.252 | 0.0.0.3 | 4 | 2 |
| /31 | 255.255.255.254 | 0.0.0.1 | 2 | 2 (point-to-point, RFC 3021) |
| /32 | 255.255.255.255 | 0.0.0.0 | 1 | 1 (single host) |
Sources: RFC 4632 (CIDR) and RFC 3021 (/31). The tool currently shows 0 hosts for /31 and /32.
Common mistakes
- Mixing decimal masks like 255.255.255.0 with the wrong CIDR
- Typing commas or spaces inside the IP
- Applying IPv4 habits to IPv6 addressing without a different tool
CIDR size intuition
Each step down in prefix length roughly doubles the address space. Moving from /24 to /23 doubles hosts; moving from /24 to /25 halves them. Plan capacity from required hosts plus room for growth, then pick a prefix, then verify the network ID with this calculator on a sample address.
Overlapping subnets cause hard to debug routing problems. Before you add a new VLAN or VPN pool, compute network IDs for both sides and confirm they do not collide.
A /30 is often used on point to point links with only a few addresses. A /29 or /28 may fit a small DMZ. A /24 remains the everyday LAN size in many offices and homes. Enter a host in each of those prefixes once so you build intuition for how the network ID changes when host bits shrink.
Private ranges quick map
| Private block (RFC 1918) | Range |
|---|---|
| 10.0.0.0/8 | 10.0.0.0 – 10.255.255.255 |
| 172.16.0.0/12 | 172.16.0.0 – 172.31.255.255 |
| 192.168.0.0/16 | 192.168.0.0 – 192.168.255.255 |
Source: RFC 1918. Home routers often use 192.168.0.0/24 or 192.168.1.0/24. Enter any host in the LAN and /24 to confirm the network ID matches what the router LAN page shows.
When you build a lab with multiple virtual networks, allocate non overlapping prefixes first, then verify each gateway address lands in its own network ID. This calculator makes that verification fast during setup.
Limitations
Results show the network, broadcast and usable host count. They do not list every host or check whether an address is public or private. Use them as a fast network ID check beside your fuller IP plan.
For related unit and percent checks while you plan materials, try the unit converter or the percentage calculator.