05Tool · Subnet / CIDR calculator
Network, range and host count for any IPv4 subnet.
Type an address and prefix, such as 192.168.10.25/24: network, broadcast, range and host count.
Runs in your browser. Nothing is sent unless you choose to.
This calculator needs JavaScript. Our engineers can plan your addressing with you.
More about this tool
Related guideWhat an IT SLA should include
Segmentation, configuration backups and who holds the admin passwords: the questions to ask before you sign.
Read the guide01How it is calculated
- 01
The prefix length says how many of the 32 bits identify the network. The rest identify devices.
- 02
Total addresses = 2^(32 − prefix). For a /24, that is 2^8 = 256.
- 03
The network address is the IP with all device bits set to 0. The broadcast address is the IP with all device bits set to 1. Neither can be given to a device, so usable hosts = total − 2: a /24 has 254. The exceptions are /31 (2 addresses, RFC 3021) and /32 (1).
- 04
The wildcard mask is the subnet mask inverted. Firewalls and routers use it in access rules.
02What the address type tells you
- Private (RFC 1918): 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16, for use inside your network.
- Shared address space 100.64.0.0/10: some providers put you behind carrier NAT, which matters for remote access.
- Loopback 127.0.0.0/8: the device itself.
- Link-local 169.254.0.0/16: a device that did not get an address from DHCP.
03A simple VLAN plan
Many sites give each VLAN its own /24 and match the third number to the VLAN ID. It wastes some addresses, but anyone can read it at a glance. Larger ranges must start on their own boundary: a /23 on an even third number, a /22 on a multiple of 4.
| VLAN | Use | Subnet | Usable hosts | Note |
|---|---|---|---|---|
| VLAN 10 | Staff | 10.10.10.0/24 | 254 | |
| VLAN 20 | Cameras | 10.10.20.0/23 | 510 | 10.10.20.0 to 10.10.21.255, for large camera counts |
| VLAN 30 | Phones | 10.10.30.0/24 | 254 | |
| VLAN 40 | Servers | 10.10.40.0/24 | 254 | |
| VLAN 60 | Guest Wi-Fi | 10.10.60.0/22 | 1,022 | 10.10.60.0 to 10.10.63.255, for a hotel or campus |
| VLAN 99 | Management | 10.10.99.0/24 | 254 |
Guest Wi-Fi often needs a larger range than you expect, because every phone keeps its address for the length of the DHCP lease, even after the guest has left.
Turn this into a project
Planning to split a flat network into VLANs, or adding a building? Send us your current ranges and what you want to separate. We will design the plan and the firewall rules between the segments.