IPv4 Subnet Calculator
Work out the network, broadcast, netmask, wildcard mask, usable host range and size of any IPv4 CIDR block, and split it into smaller subnets.
Free · No sign-up · Your inputs stay in your browser
Input
Calculate an IPv4 subnet
Output
10.20.28.0/22
| Network | 10.20.28.0 |
|---|---|
| Broadcast | 10.20.31.255 |
| Netmask | 255.255.252.0 |
| Wildcard (ACLs) | 0.0.3.255 |
| First host | 10.20.28.1 |
| Last host | 10.20.31.254 |
| Addresses | 1,024 |
| Usable hosts | 1,022 |
| Type | Private (RFC 1918) |
| Mask in binary | 11111111.11111111.11111100.00000000 |
4 subnets of /24
10.20.28.0/24 10.20.29.0/24 10.20.30.0/24 10.20.31.0/24
A /31 has no network or broadcast address (RFC 3021, point-to-point links) and a /32 is one host. Cloud providers reserve more: AWS keeps the first four and the last address of every VPC subnet, so a /24 there has 251 usable addresses.
Runs in this browser. Nothing you paste is sent to a server.
About this tool
Method, assumptions, practical next steps, and limits.
Reading a prefix
A /22 keeps the first 22 bits as the network and leaves 10 for hosts: 1,024 addresses, of which 1,022 are usable because the first is the network address and the last the broadcast. Each step down in prefix doubles the size. RFC 4632 defines the CIDR notation.
Planning a VPC
Cloud networks are where this comes up most. Choose a block from the RFC 1918 private ranges large enough to grow into, such as a /16, and give each subnet a /20 or /24. Avoid ranges that overlap with an office VPN or a peered network, because overlapping blocks cannot be routed to each other. AWS reserves five addresses in every subnet, so a /24 there has 251 usable.