IPv4 Subnet Calculator
Enter an IP address with a CIDR prefix or subnet mask to get the network address, broadcast address, usable host range, and total host count — calculated entirely in your browser.
How Subnetting Works, Briefly
An IPv4 address is 32 bits. A CIDR prefix (like /24) or subnet mask (like 255.255.255.0) tells you how many of those bits are reserved for the network portion versus the host portion. A /24 reserves 24 bits for the network, leaving 8 bits — 256 addresses — for hosts, minus the network and broadcast addresses, giving 254 usable host addresses.
This calculator accepts either notation and derives: the network address (all host bits set to 0), the broadcast address (all host bits set to 1), the usable host range (everything in between), and the total number of hosts the subnet can address.
/30 (2 usable hosts) or /31 (RFC 3021, 2 usable hosts with no network/broadcast reserved) is standard practice to avoid wasting address space.