CIDR Calculator
Type an IP block, drag the prefix slider, and inspect network boundaries in real time. Every calculation runs locally in your browser - nothing you enter is sent anywhere.
Type across the boxes, or use ↑ and ↓ to step a number. Pasting a whole block like 10.0.0.0/8 into any box fills them all.
10.42.0.0/16
Private (RFC 1918)Routable inside your own network only. Never seen on the public internet.
- Network
- Broadcast
- First host
- Last host
- Netmask
- Wildcard
- Total addresses
- Usable hosts
The block itself. Not assignable to a host.
Reaches every host on the segment.
Usually the gateway, by convention rather than by rule.
The top of the assignable range.
What an interface config wants when it will not take a prefix.
The inverse. What ACLs on Cisco gear and some firewalls expect.
2^16, everything the prefix covers.
Total minus the network and broadcast addresses.
Where the mask falls on 10.42.0.0
▮ network bits (16)▮ host bits (16)
The address as typed, in binary. Click any bit to flip it: the host bits are the ones the prefix leaves free, and flipping a network bit moves you to a different block entirely.
10
42
0
0
Move around
The blocks next to this one, the block that contains it, and the two it splits into.
Neighbours
Up and down
Is an address inside this block?
Type an address.
IPv4 CIDR & Subnet Mask Reference Cheat Sheet
Classless Inter-Domain Routing (CIDR) replaces legacy IP address classes (Class A, B, C) by allocating variable-length subnet prefixes. The slash notation indicates how many leading bits are dedicated to the network identifier.
| Prefix | Subnet Mask | Wildcard Mask | Total IPs | Usable Hosts |
|---|---|---|---|---|
| /32 | 255.255.255.255 | 0.0.0.0 | 1 | 1 (Single Host) |
| /30 | 255.255.255.252 | 0.0.0.3 | 4 | 2 (Point-to-Point) |
| /29 | 255.255.255.248 | 0.0.0.7 | 8 | 6 |
| /28 | 255.255.255.240 | 0.0.0.15 | 16 | 14 |
| /27 | 255.255.255.224 | 0.0.0.31 | 32 | 30 |
| /26 | 255.255.255.192 | 0.0.0.63 | 64 | 62 |
| /25 | 255.255.255.128 | 0.0.0.127 | 128 | 126 |
| /24 | 255.255.255.0 | 0.0.0.255 | 256 | 254 (Standard Subnet) |
| /23 | 255.255.254.0 | 0.0.1.255 | 512 | 510 |
| /22 | 255.255.252.0 | 0.0.3.255 | 1,024 | 1,022 |
| /20 | 255.255.240.0 | 0.0.15.255 | 4,096 | 4,094 |
| /16 | 255.255.0.0 | 0.0.255.255 | 65,536 | 65,534 (VPC Standard) |
Usable Hosts Formula
In standard IPv4 subnets, the number of usable host addresses is calculated as:2^(32 - prefix) - 2
The two reserved addresses represent the Network Address (first IP) and Broadcast Address (last IP).
Cloud Subnet Reservations (AWS)
In an AWS VPC subnet, Amazon reserves 5 IP addresses per subnet: the network address, VPC router (.1), DNS resolver (.2), future use (.3), and broadcast. Always account for this when sizing Kubernetes Pod subnets.