Networking
IPv4/IPv6 CIDR and Subnet Calculator
Calculate IPv4 and IPv6 CIDR prefixes in your browser. IPv4 mode shows subnet mask, wildcard, network, broadcast, usable range and binary representation; IPv6 mode shows compressed and expanded network, first and last address, address totals and prefix splitting. The input is not sent to a server.
Quick examples
Result
- CIDR notation
- 192.168.1.0/24
- IP address
- 192.168.1.123
- CIDR prefix
- /24
- Subnet mask
- 255.255.255.0
- Wildcard mask
- 0.0.0.255
- Network address
- 192.168.1.0
- Broadcast address
- 192.168.1.255
- First usable IP
- 192.168.1.1
- Last usable IP
- 192.168.1.254
- Total addresses
- 256
- Usable hosts
- 254
- Range start
- 192.168.1.0
- Range end
- 192.168.1.255
The wildcard mask is the bitwise inverse of the subnet mask. It's used in Cisco ACLs (access-list): `permit ip <network> <wildcard>`. Logically equivalent, but not interchangeable with a subnet mask.
AWS VPC reserves 5 addresses per subnet: the first four addresses in the block and the last address. The real assignable hosts are fewer than shown above. Other clouds have similar, but not identical, reservations (Azure reserves 5, GCP 4).
Mask ↔ prefix
Replaces the prefix of the main field while keeping the IP you typed.
Split into equal subnets (FLSM)
Splits the base network into same-sized subnets. Pick the target prefix or the number of subnets.
Configure the parameters and press “Split”.
VLSM planner
Allocates aligned blocks based on per-subnet host requirements. Sorts requirements from largest to smallest and picks the minimum prefix per block.
Enter the host requirements comma-separated and press “Plan”.
Network comparator
Check membership, containment and overlap between an IP and subnets.
IPv4 CIDR reference table
Equivalences between prefix, subnet mask, wildcard and address counts. Usable hosts follow the IPv4 convention (/31 = 2, /32 = 1).
| Prefix | Subnet mask | Wildcard | Addresses | Usable hosts |
|---|---|---|---|---|
| /8 | 255.0.0.0 | 0.255.255.255 | 16777216 | 16777214 |
| /16 | 255.255.0.0 | 0.0.255.255 | 65536 | 65534 |
| /20 | 255.255.240.0 | 0.0.15.255 | 4096 | 4094 |
| /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 |
| /32 | 255.255.255.255 | 0.0.0.0 | 1 | 1 |
Examples
192.168.1.123/24Arbitrary IP inside a /24192.168.1.0/24Typical home/office private network10.0.0.0/8Large private network172.16.5.10/20Subnet inside a private space192.168.1.10/32Single host (application loopback)10.0.0.0/31Point-to-point link (RFC 3021)
Frequently asked questions
- What is CIDR?
- CIDR (Classless Inter-Domain Routing) is the modern notation for describing IP networks. It combines the address with the prefix length (e.g. /24) indicating how many bits identify the network. It replaced the older A/B/C class system.
- What is a subnet mask?
- A subnet mask (e.g. 255.255.255.0) has 1s for the bits that identify the network and 0s for the host bits. For /24 that's 24 ones and 8 zeros. ANDing an IP with the mask yields the network address.
- What is the wildcard mask?
- It's the bitwise complement of the subnet mask: 1s mark the free host bits. Cisco ACLs and OSPF use the wildcard mask instead of the subnet mask. For /24 the wildcard is 0.0.0.255.
- What's the difference between network address and broadcast?
- The network address identifies the whole network (all host bits 0). The broadcast reaches every host in that network (all host bits 1). In /<=30 neither is assigned to a specific host.
- How do I read /24?
- /24 means the first 24 bits identify the network and the last 8 are the host. In 192.168.1.0/24 the network is 192.168.1.0 and there are 254 usable hosts, from 192.168.1.1 to 192.168.1.254 (192.168.1.255 is the broadcast).
- What happens with /31 and /32?
- /32 represents a single host: one address, no network or broadcast. /31 is a special case (RFC 3021) used on point-to-point links: only 2 addresses and both are usable, because no network or broadcast is reserved.
- How many hosts in a /27?
- A /27 has 32 total addresses: 30 are usable (network and broadcast aren't assignable). Handy for splitting a /24 into eight small segments.
- Why does AWS show fewer usable IPs than the calculator?
- AWS VPC reserves 5 addresses per subnet: the first four (network, router, internal DNS, one reserved for future use) and the last (broadcast). A /28 (16 addresses) leaves 11 assignable to resources, not 14. Other clouds have similar reservations: Azure 5, GCP 4.
- How do I split a /24 into /26 subnets?
- A /24 (256 addresses) fits four /26 (64 each): .0/26, .64/26, .128/26 and .192/26. Each /26 yields 62 usable hosts. Use the “Split into equal subnets” section to produce the exact list and copy it.
- Does this tool send my CIDR prefix to a server?
- No. The IPv4 or IPv6 prefix you enter is computed inside your browser. There are no backend calls, nothing is stored in localStorage, and everything disappears when you close the tab.