Networking
IPv4 Subnet, Host Range & Mask Calculator
Calculate an IPv4 network, address range and host capacity from one address and prefix length.
How the calculation works
Network address = ipv4_network(address,prefix) . Last address / traditional broadcast = ipv4_last(address,prefix) . Subnet mask = ipv4_mask(prefix) . Wildcard mask = ipv4_wildcard(prefix) . Usable hosts under selected convention = ipv4_host_count(prefix,policy) hosts. First usable host = ipv4_first_host(address,prefix,policy) . Last usable host = ipv4_last_host(address,prefix,policy) .
Worked example
Example inputs — IPv4 address: 192.168.1.42; CIDR prefix length: 24; Host-count convention: traditional. Expected results — Network address: 192.168.1.0; Last address / traditional broadcast: 192.168.1.255; Subnet mask: 255.255.255.0; Wildcard mask: 0.0.0.255; Usable hosts under selected convention: 254 hosts; First usable host: 192.168.1.1; Last usable host: 192.168.1.254.
Assumptions and limits
Offline planning arithmetic: this calculator sends no packets and changes no device configuration. Actual routing, reservations, implementation limits and measured network conditions must be checked separately. /32 is one host route; traditional /31 has no usable hosts while RFC 3021 mode treats both addresses as endpoints. Public/private status and provider-specific reserved addresses are not inferred.
Reference and further reading
Read the underlying subject reference. Calculith is an independent implementation; the reference does not endorse or certify this tool.
Related calculators
- Smallest IPv4 Covering Prefix Calculator
- IPv4 Range to Exact CIDR Blocks Calculator
- IPv4 VLSM Host Requirement Planner
- IPv6 Prefix & Exact Address Capacity Calculator
- Modified EUI-64 IPv6 Interface ID Calculator
Example values are editable. Results are estimates where assumptions apply. Calculations run in your browser. Updated 2026-11-16.