🌐 Subnet Netmask Calculator
Calculate subnet masks, CIDR notation, usable hosts, IP ranges, and network/broadcast addresses instantly.
| CIDR | Subnet Mask | Wildcard Mask | Total IPs | Usable Hosts | Block Size | Common Use |
|---|---|---|---|---|---|---|
| /8 | 255.0.0.0 | 0.255.255.255 | 16,777,216 | 16,777,214 | 16,777,216 | ISP / Large Org |
| /16 | 255.255.0.0 | 0.0.255.255 | 65,536 | 65,534 | 65,536 | Campus / Enterprise |
| /20 | 255.255.240.0 | 0.0.15.255 | 4,096 | 4,094 | 4,096 | Large VLAN Block |
| /22 | 255.255.252.0 | 0.0.3.255 | 1,024 | 1,022 | 1,024 | Medium LAN |
| /23 | 255.255.254.0 | 0.0.1.255 | 512 | 510 | 512 | Large Office |
| /24 | 255.255.255.0 | 0.0.0.255 | 256 | 254 | 256 | Home / Small Office |
| /25 | 255.255.255.128 | 0.0.0.127 | 128 | 126 | 128 | Half Subnet |
| /26 | 255.255.255.192 | 0.0.0.63 | 64 | 62 | 64 | Floor / Dept VLAN |
| /27 | 255.255.255.224 | 0.0.0.31 | 32 | 30 | 32 | Small VLAN |
| /28 | 255.255.255.240 | 0.0.0.15 | 16 | 14 | 16 | Small Segment |
| /29 | 255.255.255.248 | 0.0.0.7 | 8 | 6 | 8 | Tiny Segment |
| /30 | 255.255.255.252 | 0.0.0.3 | 4 | 2 | 4 | P2P / Router Links |
| /31 | 255.255.255.254 | 0.0.0.1 | 2 | 2* | 2 | RFC3021 P2P Only |
| /32 | 255.255.255.255 | 0.0.0.0 | 1 | 1* | 1 | Host Route / Loopback |
| Range | CIDR | Class | Total IPs | Default Mask | Typical Use |
|---|---|---|---|---|---|
| 10.0.0.0 – 10.255.255.255 | /8 | A | 16,777,216 | 255.0.0.0 | Enterprise / Data Center |
| 172.16.0.0 – 172.31.255.255 | /12 | B | 1,048,576 | 255.240.0.0 | Corporate VPN / WAN |
| 192.168.0.0 – 192.168.255.255 | /16 | C | 65,536 | 255.255.0.0 | Home / SOHO Networks |
| 127.0.0.0 – 127.255.255.255 | /8 | Loopback | 16,777,216 | 255.0.0.0 | Local Host Testing |
| 169.254.0.0 – 169.254.255.255 | /16 | Link-Local | 65,536 | 255.255.0.0 | APIPA / No DHCP |
| Scenario | Recommended CIDR | Usable Hosts | Subnet Mask | Notes |
|---|---|---|---|---|
| Home Router LAN | /24 | 254 | 255.255.255.0 | Standard default for home routers |
| Home Lab (Proxmox etc.) | /24 or /23 | 254 / 510 | 255.255.255.0 | Use /23 if running many VMs |
| Small Office (20 devices) | /27 | 30 | 255.255.255.224 | Tight fit; use /26 for headroom |
| Medium Office (100 devices) | /25 | 126 | 255.255.255.128 | Good fit with 26 spare hosts |
| Router-to-Router Link | /30 | 2 | 255.255.255.252 | Only 2 hosts needed |
| IoT Isolation VLAN | /26 | 62 | 255.255.255.192 | Isolated from main LAN |
| Guest Wi-Fi | /24 | 254 | 255.255.255.0 | Easy DHCP management |
| Server Farm VLAN | /26 or /25 | 62 / 126 | 255.255.255.192 | Static IPs, low density |
| Campus Building | /22 | 1,022 | 255.255.252.0 | Multiple floors/departments |
| Data Center Block | /20 | 4,094 | 255.255.240.0 | Room for VLANs and servers |
subnet netmask is made up of a 32-bit number, that works with an IP-address to point out what part of that address belongs to the net and what to the host. Picture it like this: it splits things similarly to brackets that separate the local code of a phone number. The net section is like the local code, while the host section is like the own phone number.
Terms like “netmask”, “subnet mask” and simply “mask” all point to the same idea. It is a basic mask that tells the program which IP-addresses belong to a certain net and which do not. In IPv4, subnet masks help to clearly identify the net ID from the host ID.
What a Subnet Mask Does
All devices in the same subnet share the same net prefix even so each has its own host ID.
So, what does a subnet mask do in practice? From the view of a device, the computer uses the IP-address together with the netmask to figure out whether another computer is on the same local net. If yes, the device can send data directly.
Otherwise, the message passes through the default gate. A subnet mask also tells the device about the size of its local net.
A subnet mask helps to split a big net into smaller logical nets, called subnets. That improves things regarding efficiency, security and performance, because it reduces the broadcast traffic and makes the management of the net easier. The process of splitting a net into smaller parts is called subnetting.
Each subnet follows certain logic and forms part of the wider main net.
Another advantage is the savings for routing. Instead of entries for every separate machine in the net, the system only must keep entries for every subnet. That simplifies the whole process.
Here is how the math part works. A subnet mask always ends with a sertain amount of zeros, when one writes it in binary form. For instance, if at the end there are 8 zeros, that means 2 to the power of 8, so 256 possible addresses in the subnet.
The max amount of usable hosts equals 2 raised to the power of the host bits, minus 2. The two removed addresses are the all-zero address, that serves as net address, and the all-one address, that works as broadcast address.
The most common subnet masks that folks see are 255.255.255.0, or also /24. Home routers usually use it. It gives a range of addresses, for instance 192.168.1.0 until 192.168.1.255, although the truly usable range is 1 until 254.
Most home and small business nets have fewer than 512 devices, so /24 works well. It eases the counting of usable IP-addresses for a /24-subnet, because the first three octets stay the same.
One can change the subnet mask to create nets of different sizes. For instance, changing from 255.255.0.0 (/16) to 255.255.128.0 (/17) one splits one net of 65,534 users into two nets of 32,766 users each. When one applies a bitwise AND-operation to any IP-address with the subnet mask, itresults in the routing prefix, also called the net address.



