Subnet Calculator
Calculate subnet information including network address, broadcast address, and usable host range from IP and CIDR.
What is CIDR notation and how does it work?
CIDR (Classless Inter-Domain Routing) uses /prefix to indicate subnet mask. Format: IP/prefix (e.g., 192.168.1.0/24). Prefix = number of 1-bits in subnet mask. /24 = 255.255.255.0 (24 ones), /16 = 255.255.0.0, /8 = 255.0.0.0. Common: /24 (254 hosts, home network), /16 (65,534 hosts, large network), /32 (single host). Calculate hosts: 2^(32-prefix) - 2. Subtract 2 for network and broadcast addresses.
How many IP addresses are in different subnet sizes?
Common subnets: /32 = 1 address (single host), /30 = 4 addresses, 2 usable (point-to-point), /29 = 8 addresses, 6 usable, /28 = 16 addresses, 14 usable, /27 = 32 addresses, 30 usable, /26 = 64 addresses, 62 usable, /25 = 128 addresses, 126 usable, /24 = 256 addresses, 254 usable (most common), /16 = 65,536 addresses, 65,534 usable, /8 = 16,777,216 addresses. Remember: Total - 2 = usable (network + broadcast reserved).
What are private IP address ranges?
Private IPs (RFC 1918, not routable on internet): Class A: 10.0.0.0/8 (10.0.0.0 - 10.255.255.255), 16 million addresses. Class B: 172.16.0.0/12 (172.16.0.0 - 172.31.255.255), 1 million addresses. Class C: 192.168.0.0/16 (192.168.0.0 - 192.168.255.255), 65,536 addresses. Home routers typically use 192.168.1.0/24 or 192.168.0.0/24. Businesses use 10.x.x.x. Need NAT (Network Address Translation) for internet access.
What is the difference between network, broadcast, and usable IP addresses?
Network address: First IP in subnet, identifies the network itself (192.168.1.0/24 -> 192.168.1.0). Cannot assign to devices. Broadcast address: Last IP, sends to all hosts (192.168.1.255). Cannot assign to devices. Usable/Host addresses: Between network and broadcast (192.168.1.1 - 192.168.1.254). Assign to computers, printers, routers. Gateway typically .1 (192.168.1.1). DHCP pool uses middle range (.100-.200 common). Static IPs use beginning/end (.2-.50, .200-.254).