IP Subnet / CIDR Calculator
Enter an IPv4 address and prefix length to calculate network, broadcast, mask, wildcard and host range.
Calculate an IPv4 subnet from CIDR
Enter an IPv4 address and prefix length to calculate network, broadcast, mask, wildcard and host range.
How the IP subnet / CIDR calculator works
IPv4 addresses contain 32 bits. A CIDR prefix such as /24 means the first 24 bits identify the network while the remaining eight bits identify addresses inside that block. The subnet mask is the same prefix shown in dotted decimal, and the wildcard mask is its bitwise inverse.
Network, broadcast and host range
For conventional subnets up to /30, the first address is the network address and the last is the broadcast address, so the calculator excludes both from the usable-host count. It treats /31 as a point-to-point special case and /32 as a single-host route.
Use cases
Network engineers and IT support teams can use the tool to validate firewall objects, DHCP ranges, route summaries, VLAN plans and address allocations without converting bits manually.
IPv4 only
This page intentionally focuses on IPv4. IPv6 uses 128-bit addressing, hexadecimal notation and different subnetting conventions, so it should not be forced into an IPv4 calculator.