cidr.jsc.tools

IPv4 CIDR calculator

Network, broadcast, subnet mask, wildcard mask, and usable hosts for any IPv4 address and prefix. The arithmetic stays in this browser.

Calculate a prefix

Four octets and a prefix from /0 to /32. An address alone uses the prefix control. IPv6 is not calculated.

How the host count works

For /0 through /30, the first and last addresses are the network and broadcast. Usable hosts are the total minus 2.

For /31, RFC 3021 treats both addresses as usable. The network and broadcast fields are the two endpoints, not reserved addresses.

For /32, the prefix is a single host. Total and usable are both 1.

Results

Network, broadcast, masks, and usable hosts will show up here. Try 172.16.5.4/31 or one of the examples.