Enter an IPv4 address and a CIDR prefix or subnet mask to get the network, broadcast, usable host range, wildcard mask and binary form. Then split the network into subnets or plan a VLSM layout. Everything runs in your browser.
Jump to the subnetting cheat sheet · Practice subnetting problems
Type the address and either a prefix (/24 or 24) or a dotted mask (255.255.255.0). You can also paste CIDR notation such as 10.1.1.77/26 into the address box.
| IP address | 11000000.10101000.00000001.00001010 |
|---|---|
| Subnet mask | 11111111.11111111.11111111.00000000 |
| Wildcard | 00000000.00000000.00000000.11111111 |
| Network | 11000000.10101000.00000001.00000000 |
| Broadcast | 11000000.10101000.00000001.11111111 |
The first 24 bits are the network portion; the remaining 8 bits identify hosts.
Divide the network above into equal-size smaller subnets. Enter a longer prefix than the original.
4 subnets of /26.
| # | Network | Host range | Broadcast | Usable |
|---|---|---|---|---|
| 1 | 192.168.1.0/26 | 192.168.1.1 - 192.168.1.62 | 192.168.1.63 | 62 |
| 2 | 192.168.1.64/26 | 192.168.1.65 - 192.168.1.126 | 192.168.1.127 | 62 |
| 3 | 192.168.1.128/26 | 192.168.1.129 - 192.168.1.190 | 192.168.1.191 | 62 |
| 4 | 192.168.1.192/26 | 192.168.1.193 - 192.168.1.254 | 192.168.1.255 | 62 |
Enter the parent network and how many hosts each subnet needs. Requirements are sorted largest first and packed with no overlaps.
Uses 228 of 256 addresses (89%).
| Name | Needed | Network | Mask | Usable range | Usable |
|---|---|---|---|---|---|
| Sales | 100 | 192.168.10.0/25 | 255.255.255.128 | 192.168.10.1 - 192.168.10.126 | 126 |
| Engineering | 50 | 192.168.10.128/26 | 255.255.255.192 | 192.168.10.129 - 192.168.10.190 | 62 |
| Guest Wi-Fi | 20 | 192.168.10.192/27 | 255.255.255.224 | 192.168.10.193 - 192.168.10.222 | 30 |
| WAN link | 2 | 192.168.10.224/30 | 255.255.255.252 | 192.168.10.225 - 192.168.10.226 | 2 |
Each subnet reserves a network and a broadcast address, so the smallest block offered is a /30 (2 usable hosts).
A subnet mask is a 32-bit value that splits an IPv4 address into a network part and a host part. The CIDR prefix is the same information written as a count of leading 1 bits: /24 means 255.255.255.0, /26 means 255.255.255.192 and /30 means 255.255.255.252. The longer the prefix, the smaller the subnet: each extra bit halves the number of addresses. Every result the calculator shows, from the network address to the usable host range, is derived from this split.
An IPv4 address is 32 bits. A subnet mask (or its shorter CIDR form, the prefix length) marks which leading bits identify the network and which trailing bits identify hosts on it. Everything the calculator shows follows from that one split.
| Value | Formula | Example: 10.1.1.77/26 |
|---|---|---|
| Subnet mask | First n bits set to 1 | 255.255.255.192 |
| Network address | IP AND mask | 10.1.1.64 |
| Wildcard mask | NOT mask | 0.0.0.63 |
| Broadcast address | Network OR wildcard | 10.1.1.127 |
| Total addresses | 2^(32 - n) | 64 |
| Usable hosts | 2^(32 - n) - 2 | 62 (10.1.1.65 to 10.1.1.126) |
Block-size shortcut. Find the interesting octet (the one where the mask is neither 255 nor 0). The block size is 256 minus the mask value in that octet. For /26 the mask octet is 192, so blocks are 64 apart: 0, 64, 128, 192. The address 77 lands in the block starting at 64.
Special cases. A /31 has no network or broadcast address and both addresses are usable on point-to-point links (RFC 3021). A /32 is one host. Private ranges (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16, RFC 1918) are not routed on the public internet, and the calculator flags these along with loopback, link-local, multicast and documentation ranges. The IP class shown is the legacy classful label based on the first octet; modern networks use CIDR instead.
List every subnet and its host count, sort from largest to smallest, give each the smallest block with enough usable addresses, and place them one after another from the start of the parent network. Placing the biggest first keeps every block on a boundary that matches its size, so nothing overlaps. The VLSM helper above does exactly this. For a worked walkthrough, read VLSM explained.
Everything you need to subnet by hand, in one place. Learn the three-step method first, then use the table to check masks, block sizes and host counts. If you want a longer walkthrough, read Subnetting explained, and drill the method with the free subnetting practice trainer.
Only nine values can appear in a mask octet. Memorise them: each extra network bit adds half of the previous step.
| Network bits in octet | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
|---|---|---|---|---|---|---|---|---|---|
| Octet value | 0 | 128 | 192 | 224 | 240 | 248 | 252 | 254 | 255 |
| Prefix | Subnet mask | Wildcard | Interesting octet | Block size | Total addresses | Usable hosts |
|---|---|---|---|---|---|---|
| /8 | 255.0.0.0 | 0.255.255.255 | 2nd | 256 | 16,777,216 | 16,777,214 |
| /9 | 255.128.0.0 | 0.127.255.255 | 2nd | 128 | 8,388,608 | 8,388,606 |
| /10 | 255.192.0.0 | 0.63.255.255 | 2nd | 64 | 4,194,304 | 4,194,302 |
| /11 | 255.224.0.0 | 0.31.255.255 | 2nd | 32 | 2,097,152 | 2,097,150 |
| /12 | 255.240.0.0 | 0.15.255.255 | 2nd | 16 | 1,048,576 | 1,048,574 |
| /13 | 255.248.0.0 | 0.7.255.255 | 2nd | 8 | 524,288 | 524,286 |
| /14 | 255.252.0.0 | 0.3.255.255 | 2nd | 4 | 262,144 | 262,142 |
| /15 | 255.254.0.0 | 0.1.255.255 | 2nd | 2 | 131,072 | 131,070 |
| /16 | 255.255.0.0 | 0.0.255.255 | 3rd | 256 | 65,536 | 65,534 |
| /17 | 255.255.128.0 | 0.0.127.255 | 3rd | 128 | 32,768 | 32,766 |
| /18 | 255.255.192.0 | 0.0.63.255 | 3rd | 64 | 16,384 | 16,382 |
| /19 | 255.255.224.0 | 0.0.31.255 | 3rd | 32 | 8,192 | 8,190 |
| /20 | 255.255.240.0 | 0.0.15.255 | 3rd | 16 | 4,096 | 4,094 |
| /21 | 255.255.248.0 | 0.0.7.255 | 3rd | 8 | 2,048 | 2,046 |
| /22 | 255.255.252.0 | 0.0.3.255 | 3rd | 4 | 1,024 | 1,022 |
| /23 | 255.255.254.0 | 0.0.1.255 | 3rd | 2 | 512 | 510 |
| /24 | 255.255.255.0 | 0.0.0.255 | 4th | 256 | 256 | 254 |
| /25 | 255.255.255.128 | 0.0.0.127 | 4th | 128 | 128 | 126 |
| /26 | 255.255.255.192 | 0.0.0.63 | 4th | 64 | 64 | 62 |
| /27 | 255.255.255.224 | 0.0.0.31 | 4th | 32 | 32 | 30 |
| /28 | 255.255.255.240 | 0.0.0.15 | 4th | 16 | 16 | 14 |
| /29 | 255.255.255.248 | 0.0.0.7 | 4th | 8 | 8 | 6 |
| /30 | 255.255.255.252 | 0.0.0.3 | 4th | 4 | 4 | 2 |
| /31 | 255.255.255.254 | 0.0.0.1 | 4th | 2 | 2 | 2 |
| /32 | 255.255.255.255 | 0.0.0.0 | 4th | 1 | 1 | 1 |
Usable hosts = total - 2, except /31 (2 usable, point-to-point links, RFC 3021) and /32 (one host route). Block size is the step between subnet boundaries in the interesting octet; at /32 it is 1 and every address is its own subnet.
| Range | Meaning |
|---|---|
| 10.0.0.0/8 | Private (RFC 1918) |
| 172.16.0.0/12 | Private (RFC 1918), 172.16.0.0 to 172.31.255.255 |
| 192.168.0.0/16 | Private (RFC 1918) |
| 127.0.0.0/8 | Loopback |
| 169.254.0.0/16 | Link-local / APIPA (no DHCP answer) |
| 224.0.0.0/4 | Multicast |
Subnetting appears on both major networking certifications. Use the calculator to check your work, but practice doing it by hand and do not rely on a calculator in the exam.
Last updated October 30, 2026. CertSharp is a practice-exam provider. The formulas and worked example on this page follow the standard IPv4 addressing rules (RFC 4632 for CIDR, RFC 3021 for /31 links, RFC 1918 for private ranges), and the 10.1.1.77/26 example was verified with a script. The cheat sheet table is generated by the same code as the calculator. The explanations are written by CertSharp, not taken from vendor documentation, so confirm critical designs on your own equipment.
Usable hosts = 2^(32 - prefix) - 2. The subtraction removes the network address (all host bits 0) and the broadcast address (all host bits 1). A /24 has 2^8 - 2 = 254 usable hosts and a /26 has 2^6 - 2 = 62. Two exceptions apply: a /31 has 2 usable addresses (RFC 3021 point-to-point links) and a /32 is a single host.
A subnet mask has 1 bits for the network portion and 0 bits for the host portion, for example 255.255.255.0. A wildcard mask is the bitwise inverse, 0.0.0.255, and is used in Cisco ACLs and OSPF network statements, where a 0 bit means "must match" and a 1 bit means "don't care".
The number after the slash is the prefix length: how many leading bits of the address identify the network. /24 means the first 24 bits are the network and the remaining 8 are for hosts, which equals the subnet mask 255.255.255.0 and gives 256 addresses.
Variable-length subnet masking lets you carve one address block into subnets of different sizes so each gets about the space it needs. Allocate the largest requirement first, then the next largest, so every block stays aligned and nothing overlaps. It wastes far fewer addresses than giving every subnet the same size.
Yes. A /31 is treated as a point-to-point link with two usable addresses and no broadcast, as RFC 3021 describes. A /32 is a single host route with one address. Most online calculators and many exam questions simplify these, so check the note shown with your result.
The cheat sheet section on this page lists the subnet mask, wildcard mask, block size, total addresses and usable hosts for every prefix from /8 to /32, plus the nine possible mask octet values and the three-step method for finding the network, broadcast and host range by hand.
Use the free subnetting practice trainer: it generates random network address, broadcast, first and last host, usable host count, mask and prefix questions at three difficulty levels and shows the block-size working for every answer. Do each problem on paper first, then check it.
No. All calculations run in your browser using plain JavaScript, so the addresses you type are never uploaded, stored or logged by CertSharp.
Try 30 free questions per session in practice mode for CCNA or Network+, or unlock the full 500-question bank and timed exam mode for $11.99 one-time per certification.