Subnet Calculator (IPv4 / CIDR)
Type an IP address with a prefix (10.0.5.77/22) or a mask (10.0.5.77 255.255.252.0). Everything runs in your browser.
By Brandon Sheley · Updated
| Network | 192.168.1.0/24 |
| Usable host range | 192.168.1.1 - 192.168.1.254 |
| Broadcast | 192.168.1.255 |
| Usable hosts | 254 |
| Total addresses | 256 |
| Subnet mask | 255.255.255.0 |
| Wildcard mask | 0.0.0.255 |
| Address type | Private (RFC 1918) |
| Legacy class | C |
| IP in binary | 11000000.10101000.00000001.00000000 |
| Mask in binary | 11111111.11111111.11111111.00000000 |
The first address is the network and the last is the broadcast, so neither can be given to a device.
Split 192.168.1.0/24 into /26 Subnets
| Subnet | Usable range | Broadcast |
|---|---|---|
| 192.168.1.0/26 | 192.168.1.1 - 192.168.1.62 | 192.168.1.63 |
| 192.168.1.64/26 | 192.168.1.65 - 192.168.1.126 | 192.168.1.127 |
| 192.168.1.128/26 | 192.168.1.129 - 192.168.1.190 | 192.168.1.191 |
| 192.168.1.192/26 | 192.168.1.193 - 192.168.1.254 | 192.168.1.255 |
Planning VLANs for a homelab? A /24 per VLAN keeps the math simple: cameras on 10.0.20.0/24, IoT on 10.0.30.0/24, and the VLAN number matches the third octet. See pfSense and OPNsense on Proxmox for setting them up.
CIDR Cheat Sheet: /8 to /32
| Prefix | Subnet mask | Addresses | Usable hosts | Typical use |
|---|---|---|---|---|
| /8 | 255.0.0.0 | 16,777,216 | 16,777,214 | The whole 10.0.0.0 private range |
| /9 | 255.128.0.0 | 8,388,608 | 8,388,606 | |
| /10 | 255.192.0.0 | 4,194,304 | 4,194,302 | CGNAT and Tailscale (100.64.0.0/10) |
| /11 | 255.224.0.0 | 2,097,152 | 2,097,150 | |
| /12 | 255.240.0.0 | 1,048,576 | 1,048,574 | The whole 172.16.0.0 private range |
| /13 | 255.248.0.0 | 524,288 | 524,286 | |
| /14 | 255.252.0.0 | 262,144 | 262,142 | |
| /15 | 255.254.0.0 | 131,072 | 131,070 | |
| /16 | 255.255.0.0 | 65,536 | 65,534 | The whole 192.168.0.0 range, or one big site |
| /17 | 255.255.128.0 | 32,768 | 32,766 | |
| /18 | 255.255.192.0 | 16,384 | 16,382 | |
| /19 | 255.255.224.0 | 8,192 | 8,190 | |
| /20 | 255.255.240.0 | 4,096 | 4,094 | A large VLAN or Docker address pool |
| /21 | 255.255.248.0 | 2,048 | 2,046 | |
| /22 | 255.255.252.0 | 1,024 | 1,022 | A busy guest or campus Wi-Fi network |
| /23 | 255.255.254.0 | 512 | 510 | Two /24s joined into one LAN |
| /24 | 255.255.255.0 | 256 | 254 | A typical home or office LAN |
| /25 | 255.255.255.128 | 128 | 126 | Half a /24 |
| /26 | 255.255.255.192 | 64 | 62 | A small VLAN (cameras, IoT) |
| /27 | 255.255.255.224 | 32 | 30 | A small office segment |
| /28 | 255.255.255.240 | 16 | 14 | A handful of servers or a DMZ |
| /29 | 255.255.255.248 | 8 | 6 | A small static block from an ISP |
| /30 | 255.255.255.252 | 4 | 2 | A point-to-point link (older style) |
| /31 | 255.255.255.254 | 2 | 2 | A point-to-point link (RFC 3021) |
| /32 | 255.255.255.255 | 1 | 1 | A single host or route |
Ranges You'll Run Into in a Homelab
- 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16: the RFC 1918 private ranges. Everything on your LAN should come from one of these.
- 192.168.0.0/24 and 192.168.1.0/24: the defaults on most consumer routers. Pick something else for a homelab so a VPN back home doesn't collide with the hotel or coffee-shop network you're on.
- 100.64.0.0/10: the shared CGNAT range. Tailscale gives your devices addresses from it, and some ISPs use it in front of your router, so don't use it on your LAN. See the self-hosting starter stack for Tailscale.
- 172.17.0.0/16: Docker's default bridge network. If your LAN or VPN uses 172.17.x.x, containers can't reach it until you change Docker's address pool. See the Docker guide.
- 169.254.x.x: a link-local address means the device asked for DHCP and got no answer. Check the cable, VLAN tag or DHCP server.
- Proxmox asks for its address in CIDR form during install, for example
192.168.1.50/24. See how to install Proxmox VE.
Frequently Asked Questions
How many usable hosts are in a /24?
A /24 has 256 addresses. The first is the network address and the last is the broadcast address, which leaves 254 usable hosts. In 192.168.1.0/24, that is 192.168.1.1 through 192.168.1.254.
What subnet mask is /24?
A /24 is 255.255.255.0: the first 24 bits are the network and the last 8 bits are hosts. Other common ones: /16 is 255.255.0.0, /25 is 255.255.255.128, /26 is 255.255.255.192, /27 is 255.255.255.224 and /28 is 255.255.255.240.
How do I work out the network address from an IP and prefix?
Turn the prefix into a mask, then AND the IP with the mask. For 10.0.5.77/22 the mask is 255.255.252.0, so the network is 10.0.4.0, the broadcast is 10.0.7.255, and usable hosts run from 10.0.4.1 to 10.0.7.254 (1,022 of them). The calculator above does this for any address.
What is the difference between a /31 and a /32?
A /32 is a single address, used for one host or a route to one host. A /31 has two addresses and, under RFC 3021, both are usable on a point-to-point link between two routers, with no network or broadcast address. Older setups use a /30 for the same job, which wastes two of its four addresses.
Which IP ranges should I use on my home network?
Use the RFC 1918 private ranges: 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16. Pick something less common than 192.168.1.0/24 or 192.168.0.0/24, such as 10.20.30.0/24, so your network does not overlap the one you are on when you connect back home over a VPN. Avoid 100.64.0.0/10 if you use Tailscale.