IP Subnet Calculator
Calculate IPv4 subnets, CIDR notation, network/broadcast addresses.
Frequently Asked Questions
What is CIDR notation?
CIDR uses /X suffix to indicate network prefix. Example: 192.168.1.0/24 = 256 addresses (254 usable).
How many hosts in /24?
256 total - 2 (network + broadcast) = 254 usable hosts.
What is CIDR Notation?
CIDR (Classless Inter-Domain Routing) notation expresses an IP address and its subnet mask as a single string:192.168.1.0/24. The number after the slash (/24) is the prefix length — how many bits of the 32-bit IPv4 address identify the network. The remaining bits (32 − prefix) identify individual hosts on that network.
CIDR replaced the older Class A/B/C system in 1993 (RFC 1519) because fixed classes wasted huge blocks of addresses.
Common Subnet Prefixes
| CIDR | Subnet mask | Total IPs | Usable hosts | Typical use |
|---|---|---|---|---|
| /30 | 255.255.255.252 | 4 | 2 | Point-to-point links |
| /29 | 255.255.255.248 | 8 | 6 | Very small LAN |
| /28 | 255.255.255.240 | 16 | 14 | Small office segment |
| /27 | 255.255.255.224 | 32 | 30 | Small department |
| /24 | 255.255.255.0 | 256 | 254 | Home / small office LAN |
| /22 | 255.255.252.0 | 1024 | 1022 | Medium office |
| /20 | 255.255.240.0 | 4096 | 4094 | Large campus / data center |
| /16 | 255.255.0.0 | 65536 | 65534 | Class B equivalent |
| /8 | 255.0.0.0 | 16.7M | 16.7M | Class A equivalent (ISP) |
Usable hosts = total − 2 (network address + broadcast address).
Private IP Address Ranges (RFC 1918)
10.0.0.0/8— 16,777,216 addresses — large enterprises, cloud VPCs.172.16.0.0/12— 1,048,576 addresses — Docker's default bridge network uses this range.192.168.0.0/16— 65,536 addresses — home routers (192.168.0.x, 192.168.1.x).
Private addresses are not routable on the public internet. NAT (Network Address Translation) on your router maps them to your single public IP when connecting to external services.