Free Tool

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

Network192.168.1.0/24
Usable host range192.168.1.1 - 192.168.1.254
Broadcast192.168.1.255
Usable hosts254
Total addresses256
Subnet mask255.255.255.0
Wildcard mask0.0.0.255
Address typePrivate (RFC 1918)
Legacy classC
IP in binary11000000.10101000.00000001.00000000
Mask in binary11111111.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

SubnetUsable rangeBroadcast
192.168.1.0/26192.168.1.1 - 192.168.1.62192.168.1.63
192.168.1.64/26192.168.1.65 - 192.168.1.126192.168.1.127
192.168.1.128/26192.168.1.129 - 192.168.1.190192.168.1.191
192.168.1.192/26192.168.1.193 - 192.168.1.254192.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

PrefixSubnet maskAddressesUsable hostsTypical use
/8255.0.0.016,777,21616,777,214The whole 10.0.0.0 private range
/9255.128.0.08,388,6088,388,606
/10255.192.0.04,194,3044,194,302CGNAT and Tailscale (100.64.0.0/10)
/11255.224.0.02,097,1522,097,150
/12255.240.0.01,048,5761,048,574The whole 172.16.0.0 private range
/13255.248.0.0524,288524,286
/14255.252.0.0262,144262,142
/15255.254.0.0131,072131,070
/16255.255.0.065,53665,534The whole 192.168.0.0 range, or one big site
/17255.255.128.032,76832,766
/18255.255.192.016,38416,382
/19255.255.224.08,1928,190
/20255.255.240.04,0964,094A large VLAN or Docker address pool
/21255.255.248.02,0482,046
/22255.255.252.01,0241,022A busy guest or campus Wi-Fi network
/23255.255.254.0512510Two /24s joined into one LAN
/24255.255.255.0256254A typical home or office LAN
/25255.255.255.128128126Half a /24
/26255.255.255.1926462A small VLAN (cameras, IoT)
/27255.255.255.2243230A small office segment
/28255.255.255.2401614A handful of servers or a DMZ
/29255.255.255.24886A small static block from an ISP
/30255.255.255.25242A point-to-point link (older style)
/31255.255.255.25422A point-to-point link (RFC 3021)
/32255.255.255.25511A 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.