Enter an IP address and prefix length to calculate the subnet mask, network address, broadcast address, and the full range of usable host addresses.
/24 · 255.255.255.0 · 254 usable hosts
The tool parses the CIDR notation using pure JavaScript bit arithmetic. The prefix length determines the subnet mask; bitwise AND gives the network address; bitwise OR of the inverted mask gives the broadcast address. All host range calculations follow from there.
All calculations happen locally in the page. Our servers are not involved at any point.
Classless Inter-Domain Routing (CIDR) is defined in RFC 4632 (IETF, 2006). CIDR notation expresses an IPv4 network as address/prefix where the prefix length (0–32) specifies how many leading bits constitute the network portion. The subnet mask is derived by setting the top n bits to 1 and the remaining 32 − n bits to 0. Network address = address AND mask; broadcast = address OR (NOT mask). IPv6 CIDR follows the same principles with 128-bit addresses per RFC 4291.
For working with file permission bits, try the chmod calculator. To convert IP octets between binary and decimal, use the number base converter. For converting between KB, MB, and GB in transfer planning, see the byte converter.