Subnet calculator
Work out network, broadcast, host range, mask and wildcard for an IPv4 address in CIDR notation.
IPv4 only. Write the address with its prefix length, for example 192.168.1.10/26.
How it works
The address and the prefix length become 32-bit numbers. The mask is the top prefix bits set to 1; the network address is address AND mask; the broadcast address is network OR the inverted mask. For prefixes up to /30 the usable hosts are everything between network and broadcast, which is 2^(32 − prefix) − 2. /31 (RFC 3021) is a point-to-point link where both addresses are hosts and there is no broadcast; /32 is a single host. IPv4 only: IPv6 prefixes are not supported.
Runs in your browser; nothing is uploaded.
FAQ
Why are two addresses not counted as hosts?
In a normal subnet the first address identifies the network and the last one is the broadcast address, so a /24 has 256 addresses but 254 usable hosts. /31 and /32 are the exceptions: RFC 3021 allows both addresses of a /31 link to be used.
What is the wildcard mask for?
It is the subnet mask with every bit flipped (255.255.255.192 becomes 0.0.0.63). Some router and firewall access lists, such as Cisco ACLs, use it to say which address bits may vary.
Does it accept an address that is not the network address?
Yes. 192.168.1.10/26 is read as host .10 inside the 192.168.1.0/26 network, and the result shows that network. Addresses with leading zeros (010.0.0.1) are rejected because some systems read them as octal.
Related developer tools
Bookmark this page for next time, or copy its link. Shared links contain no working input.
Link to this tool: https://www.toolpick.dev/free-tools/subnet-calculator