How to calculate a subnet from CIDR notation
192.168.1.130/26 means an IP address and a prefix length — the first 26 bits are the network part and the remaining 6 bits are host addresses. The calculator works out the mask, network address, broadcast address and host range.
For 192.168.1.130/26: mask 255.255.255.192, network 192.168.1.128, broadcast 192.168.1.191, hosts 192.168.1.129 to 192.168.1.190 — 62 addresses in total.
Common masks
| Prefix | Mask | Addresses | Hosts |
|---|---|---|---|
| /24 | 255.255.255.0 | 256 | 254 |
| /25 | 255.255.255.128 | 128 | 126 |
| /26 | 255.255.255.192 | 64 | 62 |
| /27 | 255.255.255.224 | 32 | 30 |
| /28 | 255.255.255.240 | 16 | 14 |
| /30 | 255.255.255.252 | 4 | 2 |
Usable hosts = 2^(32 − prefix) − 2, because the first address is the network and the last the broadcast. The exceptions are /31 (point-to-point links) and /32 (a single address).
Private addresses
Home and office networks use private ranges that never appear on the internet: 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16. The router translates them to a public address (NAT).
Frequently asked questions
What is a wildcard mask?
The inverse of the subnet mask: for 255.255.255.192 it is 0.0.0.63. It’s used in Cisco access lists and OSPF.
Does it support IPv6?
No — it works with IPv4 addresses in CIDR notation, such as 10.0.0.0/8.