Parse IPv4 CIDR blocks and calculate network range, subnet mask, usable host IPs, and broadcast address.
Loading tool
About IPv4 subnet calculator
Enter an IPv4 address with a prefix length or dotted netmask to get the network address, broadcast address, netmask, wildcard mask, first and last usable host, total addresses and usable host count. It also shows the address class, whether it is private or special-purpose, and binary forms of the address, mask and network. You can change the prefix from a /0 to /32 list and step to the previous or next subnet of the same size.
Common uses
- Plan subnets for a VPC, VLAN or home network
- Find the usable host range and broadcast address of a CIDR block
- Convert between a prefix length like /26 and a netmask like 255.255.255.192
- Get the wildcard mask for a Cisco ACL or OSPF statement
FAQ
- How does CIDR notation work?
- The number after the slash is how many leading bits are the network part. In 192.168.1.0/24 the first 24 bits identify the network and the remaining 8 bits address hosts, giving 256 addresses.
- Why are there 2 fewer usable hosts than addresses?
- In a normal subnet the first address is the network address and the last is the broadcast address, so neither is assigned to a host. A /24 has 256 addresses and 254 usable hosts.
- What about /31 and /32?
- A /31 has two addresses and, per RFC 3021, both are usable on point-to-point links with no broadcast address. A /32 is a single host address.
- Which IPv4 ranges are private?
- RFC 1918 reserves 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16 for private networks. 100.64.0.0/10 is shared address space for carrier-grade NAT.