IPv4 CIDR subnet info: network, broadcast, mask, hosts, class, and address-space split.
Every network engineer, system administrator, and DevOps practitioner who has ever defined a VLAN, configured a firewall rule, sized a Kubernetes service CIDR, or split an AWS VPC into subnets has solved the same arithmetic: given an IPv4 address and a CIDR prefix, what are the network address, the broadcast address, the usable host range, the subnet mask in dotted-decimal, the wildcard mask for ACLs, and how many hosts can the prefix accommodate? The arithmetic is bit-level — apply the mask to the address, invert the mask for the wildcard, count host bits — and is straightforward when the prefix is a "byte boundary" (/8, /16, /24) but error-prone otherwise. Subnet calculators are the most-bookmarked tool in any network admin's browser. This calculator runs in-page so it works offline (training, certification prep, air-gapped lab environments).
The output goes beyond the bare numbers: the calculator labels the address class (A/B/C/D/E for legacy reference), flags whether the address is in RFC 1918 private space (10/8, 172.16/12, 192.168/16), shows the binary subnet mask for visual verification, and renders a stacked bar that visualizes how the 32 address bits split between the network prefix and the host portion. The bar makes the key insight of CIDR concrete: as the prefix grows from /16 to /20 to /24 to /28, the host portion shrinks and the count of available hosts plummets exponentially.
An IPv4 address is 32 bits, conventionally written as four dotted decimal octets (192.168.1.42 = 11000000.10101000.00000001.00101010). A CIDR prefix /N (0 ≤ N ≤ 32) declares how many high bits are the network portion; the remaining 32 − N bits are the host portion.
Address class (legacy classful conventions, deprecated since 1993 CIDR but still useful for shorthand):
Private (RFC 1918): 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16. Plus 100.64.0.0/10 (CGN, RFC 6598) and 169.254.0.0/16 (link-local, APIPA) — not flagged in this calculator's simplified privacy detection.
Enter the IPv4 address in dotted-decimal notation. Enter the CIDR prefix as an integer between 0 and 32 (typical values: /8, /16, /24, /28, /30). The result panel renders network, broadcast, subnet mask, wildcard mask, first usable host, last usable host, total addresses, usable hosts, address class, RFC 1918 private/public flag, and the binary subnet mask. The stacked bar visualizes the network/host split.
Home /24 LAN: 192.168.1.0 / 24.
Small /28 office: 10.0.5.16 / 28.
Large /16 corporate: 172.16.0.0 / 16.
Point-to-point /31: 10.0.0.0 / 31. Per RFC 3021, both addresses (10.0.0.0 and 10.0.0.1) are usable as endpoints — no broadcast/network reservation needed for point-to-point links.
Single-host /32: 10.0.0.5 / 32. Network = broadcast = first = last = 10.0.0.5. Usable: 1. Used in OSPF stub-route advertisements, AWS security-group rules, and host-route-only configurations.
Off-by-one on host count. Standard subnets reserve network + broadcast — usable = 2^(32−N) − 2. /31 and /32 are exceptions; the calculator handles them but most practitioners need to think twice when working in those edge prefixes.
CIDR vs classful network masks. Pre-1993, networks were classful (class A = /8, class B = /16, class C = /24). Modern CIDR allows any prefix length; many old documentation references and legacy network appliances still print classful masks. The calculator uses CIDR; the class label is informational only.
Endianness in mask printing. The dotted-decimal notation is "big-endian" — high-order bits (network bits) on the left. Some legacy systems printed the wildcard mask with bits reversed. Always cross-check the dotted-decimal mask against the binary representation.
Subnet-zero confusion. Old-school IOS forbade the "subnet zero" (the lowest subnet of a classful range, e.g. 192.168.1.0 / 25 in a 192.168.1.0 / 24 classful range). Modern software has ip subnet-zero enabled by default and the restriction is irrelevant; some legacy documentation perpetuates it.
RFC 1918 isn't the only private. The calculator's private-flag check matches 10/8, 172.16/12, 192.168/16. It does not flag CGN (100.64/10), link-local (169.254/16), loopback (127/8), or documentation ranges (192.0.2/24, 198.51.100/24, 203.0.113/24). Cross-reference manually for those.
Multicast / experimental ranges. Class D (multicast 224/4) and Class E (240/4) work in the calculator arithmetic but their semantics are not unicast; usable-host counts are not meaningful there.
Variable-length subnet masking (VLSM). The calculator handles one prefix at a time. For a multi-subnet design, run the calculator multiple times against the parent block, sub-divided.
Network address vs first usable host. In /30 and longer (smaller subnets), the math gets cramped — /30 has 4 addresses (0, 1, 2, 3), of which only 1 and 2 are usable.
IPv6 is fundamentally different. CIDR concept transfers, but the address space is 128 bits, the math is in hex, and broadcast doesn't exist. This calculator is IPv4 only.
Big-O on huge usable-host counts. /8 has 16.7 million addresses; the calculator returns the count but obviously not the list. Don't expect to enumerate every host in a /16 or smaller prefix.
Leading zeros in IP. "192.168.001.042" is not standard; the calculator's parser tolerates it but RFC 791 says octets are integers without leading zeros. Some libraries (POSIX inet_aton) interpret leading zeros as octal — a notorious surprise.
Subnet boundary discipline. /28 networks always align on a multiple of 16 in the last octet; entering 10.0.0.5 / 28 returns network 10.0.0.0, not 10.0.0.5. The calculator does the masking automatically — useful sanity check.