IPv4 Subnet Calculator
Calculate network, broadcast, and host ranges from an IP address and CIDR mask with our free Subnet Calculator.
Calculate network, broadcast, and host ranges from an IP address and CIDR mask with our free Subnet Calculator.
Subnetting divides an IP network into smaller sub-networks, improving organization, security, and routing efficiency. CIDR (Classless Inter-Domain Routing) notation like 192.168.1.0/24 specifies both the network and its size.
/ is the prefix length — how many leading bits are the network portion/24 → 24 network bits, 8 host bits → 256 addresses (254 usable)/16 → 65,536 addresses; /32 → single host/24 = 255.255.255.0A /24 subnet has 2⁸ = 256 total addresses. Subtract 2 (network + broadcast) = 254 usable host addresses. Formula: usable hosts = 2^(32 − prefix) − 2. For /25: 2⁷ − 2 = 126. For /30 (point-to-point): 2² − 2 = 2.
RFC 1918 defines three private ranges: 10.0.0.0/8 (16M addresses), 172.16.0.0/12 (1M addresses), and 192.168.0.0/16 (65K addresses). These are not routed on the public internet and are used for internal networks and home routers.
VLSM allows different subnets within the same network to use different prefix lengths. For example, a WAN link might use /30 (2 hosts) while a LAN uses /24 (254 hosts). This conserves IP space compared to assigning the same large subnet to every segment.