- Home
- Math
- IP Subnet Calculator
IP Subnet Calculator
For 192.168.1.130/26 the network is 192.168.1.128, the broadcast is 192.168.1.191 and the usable hosts run from .129 to .190 (62 hosts).
Planning a network? Use the Split a network tab to divide one block into equal subnets and see every range at once.
Calculate an IPv4 subnet
Divide a network into smaller subnets
How we got this
Compare options
Row 1 follows the calculator above. Edit any cell.Bulk mode
My saved calculations
Stored only in this browser. Nothing is sent to our servers.Country & format
Change the country edition from the menu at the top.Your next step
Your answer carries over, so you donโt have to type it again.
How subnetting works
An IPv4 address is 32 bits. The prefix length (CIDR, like /24) says how many of those bits name the network; the rest number the hosts. The subnet mask is the same thing written as an address: /24 = 255.255.255.0.
- Network address = IP AND mask (all host bits 0).
- Broadcast = network OR wildcard (all host bits 1).
- Usable hosts = 2(32 โ prefix) โ 2, because the network and broadcast addresses are reserved.
CIDR cheat sheet
| CIDR | Subnet mask | Addresses | Usable hosts |
|---|---|---|---|
| /8 | 255.0.0.0 | 16,777,216 | 16,777,214 |
| /16 | 255.255.0.0 | 65,536 | 65,534 |
| /20 | 255.255.240.0 | 4,096 | 4,094 |
| /22 | 255.255.252.0 | 1,024 | 1,022 |
| /23 | 255.255.254.0 | 512 | 510 |
| /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 |
| /29 | 255.255.255.248 | 8 | 6 |
| /30 | 255.255.255.252 | 4 | 2 |
| /31 | 255.255.255.254 | 2 | 2 |
| /32 | 255.255.255.255 | 1 | 1 |
Private address ranges
| Range | CIDR | Typical use |
|---|---|---|
| 10.0.0.0 โ 10.255.255.255 | 10.0.0.0/8 | Large company networks |
| 172.16.0.0 โ 172.31.255.255 | 172.16.0.0/12 | Medium networks, Docker |
| 192.168.0.0 โ 192.168.255.255 | 192.168.0.0/16 | Home and office routers |
| 100.64.0.0 โ 100.127.255.255 | 100.64.0.0/10 | Carrier-grade NAT |
Private addresses (RFC 1918) are not routed on the public internet. /31 links (RFC 3021) use both addresses for point-to-point connections, and /32 is a single host.
Frequently asked questions
How many hosts are in a /24?
256 addresses, 254 usable hosts.
What is the subnet mask for /26?
255.255.255.192, with 64 addresses and 62 usable hosts.
What is a wildcard mask?
The inverse of the subnet mask, used in router access lists. For /24 it is 0.0.0.255.
Does this support IPv6?
This page handles IPv4. IPv6 uses 128-bit addresses and different conventions.