Subnetting splits an IP network into smaller pieces, and it is a core skill for network engineers, system administrators and anyone setting up a router or cloud network. Working out the network, broadcast and host range by hand involves binary arithmetic that is easy to get wrong. Our IP subnet calculator does it for any IPv4 address in CIDR notation. This guide explains each result and how subnetting works.
How to use the calculator
Enter an IPv4 address with its prefix length, such as 192.168.1.10/24. The results are:
| Field | Value |
|---|---|
| Network | 192.168.1.0 |
| Broadcast | 192.168.1.255 |
| Subnet mask | 255.255.255.0 |
| Wildcard | 0.0.0.255 |
| First host | 192.168.1.1 |
| Last host | 192.168.1.254 |
| Total addresses | 256 |
| Usable hosts | 254 |
CIDR notation
An IPv4 address is 32 bits, written as four numbers from 0 to 255. The number after the slash, the prefix length, says how many of the leading bits identify the network. The remaining bits identify hosts within it.
For /24, the first 24 bits are the network and the last 8 bits are for hosts: 2⁸ = 256 addresses.
Each result explained
- Network address: the first address, with all host bits set to 0. It identifies the subnet itself and is not assigned to a device.
- Broadcast address: the last address, with all host bits set to 1. Packets sent here reach every device on the subnet.
- Subnet mask: the prefix written as an address, with 1s for network bits and 0s for host bits. /24 = 255.255.255.0.
- Wildcard mask: the inverse of the subnet mask, used in router access lists and some routing protocols.
- First and last host: the range you can assign to devices.
- Usable hosts: total addresses minus 2 (the network and broadcast addresses).
Common prefix lengths
| Prefix | Subnet mask | Total addresses | Usable hosts |
|---|---|---|---|
| /30 | 255.255.255.252 | 4 | 2 |
| /29 | 255.255.255.248 | 8 | 6 |
| /28 | 255.255.255.240 | 16 | 14 |
| /27 | 255.255.255.224 | 32 | 30 |
| /26 | 255.255.255.192 | 64 | 62 |
| /25 | 255.255.255.128 | 128 | 126 |
| /24 | 255.255.255.0 | 256 | 254 |
| /22 | 255.255.252.0 | 1,024 | 1,022 |
| /16 | 255.255.0.0 | 65,536 | 65,534 |
/31 and /32 are special cases used for point-to-point links and single hosts.
How the network address is found
The network address is the IP address AND the subnet mask, bit by bit.
Example: 10.0.0.0/22. The mask is 255.255.252.0. In the third octet, 252 is 11111100 in binary, so the last two bits of that octet belong to hosts. The network runs from 10.0.0.0 to 10.0.3.255, with 1,022 usable hosts from 10.0.0.1 to 10.0.3.254.
The binary calculator performs AND operations, and the binary and hex converter converts octets to binary.
Choosing a subnet size
Start with the number of devices you need, add room for growth, then pick the smallest subnet that fits.
- 50 devices: a /26 (62 usable) fits, with a little headroom.
- 200 devices: a /24 (254 usable).
- 500 devices: a /23 (510 usable).
Remember routers, printers, access points and servers all need addresses too.
Private address ranges
These ranges are reserved for internal networks and are not routed on the public internet:
- 10.0.0.0/8
- 172.16.0.0/12
- 192.168.0.0/16
Home routers usually use 192.168.0.0/24 or 192.168.1.0/24.
Why subnet?
- Security: separating guests, staff, servers and IoT devices limits what each can reach.
- Performance: smaller broadcast domains reduce unnecessary traffic.
- Organisation: subnets by floor, department or site make networks easier to manage.
- Address planning: cloud providers and VPNs require non-overlapping ranges.
For estimating transfer times across a link, use the bandwidth calculator.
Tips for planning address space
Write your subnet plan down before you configure anything, listing each subnet, its purpose, its range and its gateway address. Leave gaps between subnets so each one can grow later without renumbering. By convention, many networks give the router or gateway the first usable address, such as 192.168.1.1, and reserve a small block for static devices like printers and servers, with the rest handed out by DHCP. Make sure ranges never overlap between sites, home networks and VPNs, or traffic will not route correctly.
Frequently asked questions
Why are there two fewer usable hosts than addresses?
The first address identifies the network and the last is the broadcast address, so neither can be given to a device.
What does /24 mean?
The first 24 bits are the network part, leaving 8 bits for hosts: 256 addresses and 254 usable hosts. The mask is 255.255.255.0.
Does the calculator support IPv6?
No, it is for IPv4. IPv6 uses 128-bit addresses with the same prefix idea, usually /64 for a subnet.
What is a wildcard mask used for?
Router access control lists and some routing protocols use it to match address ranges. It is the subnet mask with every bit inverted.
Try it yourself
Run your own numbers with our free tool: IP subnet calculator. No sign-up, and it works on any device.