About Subnet Calculator
CIDR (Classless Inter-Domain Routing, RFC 4632) writes an IP network as an address followed by a slash and the number of leading network bits, such as 192.168.1.0/24. This tool applies the prefix as a 32-bit mask to find the network and broadcast addresses, the first and last host, and the address count. Usable hosts exclude the network and broadcast addresses, except for /31 and /32. Only IPv4 is supported.
Also known as: CIDR Calculator.
How to use Subnet Calculator
- Fill in "IPv4 address and prefix length".
- The result appears below and updates as you type.
- Copy the result with the copy button, or download it as a file where that is offered.
Questions about Subnet Calculator
How many usable hosts does a /24 network have?
A /24 leaves 8 host bits, which gives 256 addresses. The first is the network address and the last is the broadcast address, so 254 can be assigned to devices.
Why does a /31 show two usable hosts?
RFC 3021 allows /31 networks on point-to-point links, where no broadcast address is needed and both addresses are assigned to the two ends. The calculator therefore counts both addresses as usable.
Runs in your browser. Page last updated .