- Home
- Domain & Network
- Subnet Calculator
IPv4 Subnet Calculator
Calculate the network, broadcast address and usable hosts of an IPv4 CIDR block.
What it is for?What it is for?
A CIDR block such as 192.168.1.0/24 is an IPv4 address plus the number of leading bits that belong to the network. Use this calculator when you plan a VPC or office network, write a firewall rule, or need to know whether two addresses are on the same subnet.
A worked example
Type 10.0.5.77/22. You can type any address inside the block; the calculator finds the block for you. The result is network 10.0.4.0, broadcast 10.0.7.255, netmask 255.255.252.0, usable hosts 10.0.4.1 to 10.0.7.254, which is 1022 hosts out of 1024 addresses. So 10.0.5.77 and 10.0.7.200 are on the same subnet, but 10.0.8.1 is not.
Usable hosts
For a prefix of 30 or less, the first and last addresses are the network and the broadcast, so they are not counted as hosts. A /31 is a point-to-point link and both addresses are usable. A /32 is a single address.
Cloud providers often reserve a few more addresses in each subnet for their own routers and DNS, so the real number you can use there is a little lower.
Netmask and wildcard
The netmask is the prefix written as four numbers, the form older tools and network settings ask for. The wildcard is the netmask inverted, as used in Cisco access lists and OSPF. Input must be in slash form; a netmask such as 255.255.255.0 is not accepted in the box. Only IPv4 is supported.
The calculation runs in this tab as you type. Nothing is sent to our server.