Quick answer: 192.168.1.10/24 is in network 192.168.1.0 with mask 255.255.255.0; hosts run from 192.168.1.1 to 192.168.1.254 (254 usable) and the broadcast is 192.168.1.255.
How it's calculated
A prefix /n means the first n of the 32 bits are the network part. The subnet mask has those n bits set (/24 = 255.255.255.0) and the wildcard mask is its inverse (0.0.0.255).
Network address = address AND mask. Broadcast address = network OR wildcard. The addresses in between are hosts, so usable hosts = 2^(32 − n) − 2. Two exceptions: a /31 point-to-point link uses both of its addresses (RFC 3021), and a /32 is a single host.
The address type follows the reserved ranges: 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16 are private (RFC 1918), 127.0.0.0/8 is loopback, 169.254.0.0/16 link-local and 100.64.0.0/10 is shared address space used for carrier-grade NAT.
Worked examples
- 192.168.1.10/24: network 192.168.1.0, broadcast 192.168.1.255, 254 hosts
- 10.0.5.77/22: network 10.0.4.0, hosts 10.0.4.1 – 10.0.7.254, 1,022 hosts
- 172.16.0.1/30: network 172.16.0.0, hosts .1 – .2, broadcast 172.16.0.3
Common prefixes
| Prefix | Mask | Usable hosts |
|---|---|---|
| /8 | 255.0.0.0 | 16,777,214 |
| /16 | 255.255.0.0 | 65,534 |
| /22 | 255.255.252.0 | 1,022 |
| /24 | 255.255.255.0 | 254 |
| /25 | 255.255.255.128 | 126 |
| /26 | 255.255.255.192 | 62 |
| /27 | 255.255.255.224 | 30 |
| /28 | 255.255.255.240 | 14 |
| /29 | 255.255.255.248 | 6 |
| /30 | 255.255.255.252 | 2 |
Frequently asked questions
Why are two addresses not usable?
In a normal subnet the first address names the network and the last is the broadcast address, so neither can be given to a device.
What is a wildcard mask?
The inverse of the subnet mask (255 − each octet). Router access lists and OSPF use it to match a range of addresses.
Does it work for IPv6?
No, this calculator is for IPv4. IPv6 subnets are normally /64, which holds 2^64 addresses, so host counting works differently.
How many hosts does a /24 hold?
254. There are 256 addresses, but the first is the network and the last is broadcast. A /25 gives you 126, a /26 62 and a /27 30.
How do I pick a prefix for a number of devices?
Take the number of devices, add 2, and round up to the next power of two. 50 devices need 64 addresses, so a /26 with 62 usable.
What is CIDR notation?
The address followed by a slash and the prefix length, like 192.168.1.0/24. It replaced the old class A, B and C networks and lets subnets be any size.