What the IP Subnet Calculator does
The IP Subnet Calculator works out the details of an IPv4 subnet. Enter an address such as 192.168.1.130 and pick a prefix length or mask from the list, or type it in CIDR form such as 10.0.0.5/20. It gives the network and broadcast addresses, the first and last usable host, the number of usable hosts, the subnet mask and wildcard mask, whether the address is private or public, its traditional class, and the address and mask in binary.
How to use it
- Type an IPv4 address, or an address with /prefix.
- Pick the prefix length or mask if you did not type one.
- Read the network, broadcast and host range.
- Use the wildcard mask for router access lists if needed.
Example
For 192.168.1.130/26 the mask is 255.255.255.192, which splits the last octet into blocks of 64. The address falls in the block from 192.168.1.128 (network) to 192.168.1.191 (broadcast), leaving hosts 192.168.1.129 to 192.168.1.190: 62 usable addresses. It is a private address.
How subnetting works
An IPv4 address is 32 bits. The prefix length says how many of them identify the network; the rest number the hosts. A /24 leaves 8 host bits, 256 addresses, of which 254 are usable because the first is the network address and the last the broadcast. Each extra prefix bit halves the size: /25 has 128 addresses, /26 has 64.
The wildcard mask is the mask with its bits flipped, used in Cisco access lists and OSPF. Point-to-point links often use /31, where both addresses are usable, and /32 describes a single host.
Questions people ask
Is anything I enter sent anywhere?
No. The calculator works entirely in your browser, so what you type stays on your device.
Which addresses are private?
10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16, defined in RFC 1918. They are not routed on the public internet.
Does it work with IPv6?
Not yet. It handles IPv4 addresses only.
How many hosts does a /24 have?
254 usable hosts out of 256 addresses.