IPv4 subnet calculator
Parse your IPv4 CIDR blocks and get all the info you need about your subnet.
About IPv4 subnet calculator
Enter an IPv4 address with a mask (CIDR such as 192.168.0.1/24, or a netmask) and get the network address, mask, wildcard, first and last usable address, broadcast address and number of addresses. It also shows the address class.
When you would use it
- Planning how to split a network into subnets and checking that two ranges do not overlap.
- Working out which range a CIDR block in a cloud security group or firewall rule really covers.
- Finding the network and broadcast address of a host, or converting between /24 and 255.255.255.0 notation.
How to use it
- Type an address with a mask, for example 10.0.0.0/22.
- Read the table: network address, netmask in dotted and binary form, wildcard mask, network size, first and last address, broadcast address and IP class.
- Use the previous and next buttons to move to the neighbouring block of the same size.
Things worth knowing
- "Network size" is the total number of addresses in the block. In a normal subnet, the first (network) and last (broadcast) addresses cannot be given to hosts, so the usable host count is the size minus 2.
- "First address" and "last address" are the first and last usable host addresses, so they differ from the network and broadcast addresses.
- /31 and /32 blocks have no broadcast address, so the field reports that none exists. A /31 is used for point-to-point links and a /32 identifies a single host.
- The wildcard mask is the netmask inverted, as used in some router access lists such as Cisco ACLs.
Frequently asked questions
- How many hosts fit in a /24?
- A /24 holds 256 addresses, of which 254 are usable by hosts. Each step shorter in the prefix doubles the size, so a /23 has 512 addresses.
- Does this support IPv6?
- No. This calculator is for IPv4 only.