Subnet Calculator
Calculate network address, broadcast, host range and subnet details from an IP and CIDR prefix
How Subnetting Works
An IP address in CIDR notation like 192.168.1.0/24 encodes two things: the address, and a prefix length indicating how many leading bits belong to the network. A /24 has 24 network bits and 8 host bits, yielding 2⁸ = 256 total addresses. All calculations run client-side using JavaScript bitwise operations — no data leaves your browser.
- Network address — first address in the range (host bits all zero). Not assignable to a device.
- Broadcast address — last address (host bits all one). Packets to this address reach every host on the subnet. Not assignable.
- Usable hosts — total addresses minus 2. A /24 gives 254 usable host addresses.
- Subnet mask — the prefix length as a 32-bit number with N leading 1s (e.g., /24 →
255.255.255.0).
Common sizes: /24 (256 addr, 254 hosts) · /25 (128/126) · /28 (16/14) · /30 (4/2, point-to-point links) · /32 (single host route).