Subnet calculator (CIDR, IPv4 and IPv6)
Type a CIDR block like 10.0.0.0/16 to see its address range, usable hosts, subnet mask and bits, then split it into smaller subnets. Works for IPv4 and IPv6.
- Runs in your browser
- Nothing is uploaded
- Free, no sign-up
CIDR like 10.0.0.0/16, an address and mask like 192.168.1.10 255.255.255.0, or IPv6 like 2001:db8::/48.
Results
- CIDR notation
- 192.168.1.0/24
- Address type
- Private
- RFC 1918 private range: used inside home and company networks, not routed on the internet.
- Network address
- 192.168.1.0
- Broadcast address
- 192.168.1.255
- Usable host range
- 192.168.1.1 – 192.168.1.254
- Usable hosts
- 254
- 256 addresses in total
- Subnet mask
- 255.255.255.0
- Wildcard mask
- 0.0.0.255
The first address names the network and the last is the broadcast address, so neither is given to a device.
Split into subnets
4 subnets of /26. Select one to open it.
| Subnet | Usable hosts |
|---|---|
| 192.168.1.1 – 192.168.1.62(62) | |
| 192.168.1.65 – 192.168.1.126(62) | |
| 192.168.1.129 – 192.168.1.190(62) | |
| 192.168.1.193 – 192.168.1.254(62) |
IPv4 subnet mask cheat sheet
Every IPv4 prefix length with its subnet mask and size. Each step down the list halves the block.
| Prefix | Subnet mask | Addresses | Usable hosts |
|---|---|---|---|
| /0 | 0.0.0.0 | 4,294,967,296 | 4,294,967,294 |
| /1 | 128.0.0.0 | 2,147,483,648 | 2,147,483,646 |
| /2 | 192.0.0.0 | 1,073,741,824 | 1,073,741,822 |
| /3 | 224.0.0.0 | 536,870,912 | 536,870,910 |
| /4 | 240.0.0.0 | 268,435,456 | 268,435,454 |
| /5 | 248.0.0.0 | 134,217,728 | 134,217,726 |
| /6 | 252.0.0.0 | 67,108,864 | 67,108,862 |
| /7 | 254.0.0.0 | 33,554,432 | 33,554,430 |
| /8 | 255.0.0.0 | 16,777,216 | 16,777,214 |
| /9 | 255.128.0.0 | 8,388,608 | 8,388,606 |
| /10 | 255.192.0.0 | 4,194,304 | 4,194,302 |
| /11 | 255.224.0.0 | 2,097,152 | 2,097,150 |
| /12 | 255.240.0.0 | 1,048,576 | 1,048,574 |
| /13 | 255.248.0.0 | 524,288 | 524,286 |
| /14 | 255.252.0.0 | 262,144 | 262,142 |
| /15 | 255.254.0.0 | 131,072 | 131,070 |
| /16 | 255.255.0.0 | 65,536 | 65,534 |
| /17 | 255.255.128.0 | 32,768 | 32,766 |
| /18 | 255.255.192.0 | 16,384 | 16,382 |
| /19 | 255.255.224.0 | 8,192 | 8,190 |
| /20 | 255.255.240.0 | 4,096 | 4,094 |
| /21 | 255.255.248.0 | 2,048 | 2,046 |
| /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 |
How it works
An IP address is a number: 32 bits for IPv4, 128 for IPv6. CIDR notation like 192.168.1.0/24 says how many of those bits, counted from the left, name the network (24 here). The bits that are left over number the devices inside it, so a /24 has 8 host bits and 28 = 256 addresses. The coloured bits above show the split, and moving the slider moves the line between them.
In IPv4 the first address of a block is the network address and the last is the broadcast address, so a /24 leaves 254 addresses for devices. Two exceptions: a /31 is a point-to-point link where both addresses are usable, and a /32 is a single address. IPv6 has no broadcast address, so every address in the block counts.
The subnet mask is the same split written as an address (/24 is 255.255.255.0), and the wildcard mask is its inverse (0.0.0.255), as used in Cisco access lists and OSPF. Splitting a block lists the smaller subnets it divides into, in order.
Limits
It works on one block at a time. It doesn't yet turn an address range like 10.0.0.5 to 10.0.0.20 into CIDR blocks, or merge several blocks into one.
A split shows the first 256 subnets; the count above the list is always the full number. Address types (private, documentation, multicast and so on) come from the IANA special-purpose registries; anything else is shown as public.
The block you enter is kept after the # in the page address, so you can bookmark or share it. That part of an address is never sent to a server.
Privacy
This tool runs entirely in your browser. The files you open and what you type are never sent to a server, and nothing is stored after you close the page. See the privacy page.
Related tools
QR code generator
Make a static QR code for a link or text. It never expires, has no tracking redirect, and downloads as PNG or SVG.
Remove EXIF data and location from photos
See and remove the hidden GPS location, camera details and dates in JPEG, PNG and WebP photos. Nothing is uploaded and the image isn't re-compressed.
Compress an image to a target size
Make a photo fit a size limit, like 50 KB, 100 KB or 1 MB, at the best quality that fits. Works on several images at once, and nothing is uploaded.