A subnet calculator answers the four questions you ask every time you carve up an address range: what's the network address, what's the broadcast, which IPs are usable for hosts, and how many of them are there? This one accepts either CIDR notation (192.168.1.0/24) or an IP plus dotted-decimal mask (192.168.1.0 + 255.255.255.0) and produces all of the above plus the wildcard mask used by Cisco ACLs.
Edge cases are handled correctly: /31 follows RFC 3021 and reports two usable hosts (point-to-point links), /32 reports a single host (loopback or host route), and /0 reports the entire IPv4 address space. The mask is shown in dotted, prefix and binary forms so you can paste it into whichever config syntax you need.
It's the bitwise inverse of the subnet mask, used in Cisco IOS access-control lists (ACLs) and OSPF area definitions. /24 has subnet mask 255.255.255.0 and wildcard 0.0.0.255 — the wildcard tells the device which bits to ignore when matching.
Traditionally /30 reserves the first address as the network and the last as broadcast, leaving 2 hosts. /31 (defined in RFC 3021) re-uses both addresses as hosts on point-to-point links — common between routers — also giving 2 usable addresses but no overhead.
A /32 represents a single host (a one-IP "subnet"). It's used in loopback interfaces, host routes and BGP advertisements where you specifically want to route a single address.
This tool is IPv4 only. IPv6 doesn't use broadcast (it uses multicast for similar functions), and the address arithmetic is done in 128-bit integers — see a dedicated IPv6 subnet calculator for that work.
Explore the full suite of Networking tools and 290+ other free utilities at Chunky Munster.