IP Subnet Calculator
Calculate subnet mask, network address, broadcast address, and host range from any IP address and CIDR notation.
Essential for network administrators.
What Is Subnetting? Subnetting divides a large network into smaller, more manageable sub-networks (subnets). Each subnet has its own range of IP addresses. This is fundamental to how the internet and all private networks function.
IPv4 Address Structure An IPv4 address is 32 bits long, written as four octets (e.g., 192.168.1.100). Each octet ranges from 0 to 255. The address has two parts: a network portion (identifying which network) and a host portion (identifying which device on that network).
CIDR Notation CIDR (Classless Inter-Domain Routing) notation appends a slash and number to an IP address (e.g., 192.168.1.0/24). The number after the slash indicates how many bits are used for the network portion. A /24 means 24 network bits and 8 host bits, giving 256 addresses (254 usable hosts).
Subnet Mask The subnet mask marks which bits are network bits (1s) and which are host bits (0s). A /24 gives a mask of 255.255.255.0. A /16 gives 255.255.0.0. The mask is ANDed with the IP to find the network address.
Key Addresses in Each Subnet Network address: all host bits set to 0 (first address, identifies the network). Broadcast address: all host bits set to 1 (last address, reaches all hosts). First usable host: network address + 1. Last usable host: broadcast address - 1. Total usable hosts = 2^(host bits) - 2.
Common Subnet Sizes /32 = 1 address (single host). /30 = 4 addresses, 2 usable (point-to-point links). /24 = 256 addresses, 254 usable (typical small network). /16 = 65,536 addresses (medium network). /8 = 16.7 million addresses (large network).
Private IP Ranges (RFC 1918) 10.0.0.0/8 (10.0.0.0 - 10.255.255.255). 172.16.0.0/12 (172.16.0.0 - 172.31.255.255). 192.168.0.0/16 (192.168.0.0 - 192.168.255.255). These ranges are reserved for private networks and are not routable on the public internet.