Free CCNA tool · no account needed
Subnet Calculator
Type an IPv4 address with a prefix or a mask. You get the network, broadcast, host range, wildcard mask and a binary view, plus the block-size steps you would do on paper. IPv6 and practice questions are one tap away.
- Network address
- 192.168.1.0/26
- Broadcast address
- 192.168.1.63
- First usable host
- 192.168.1.1
- Last usable host
- 192.168.1.62
- Usable hosts
- 62
- Total addresses
- 64
- Subnet mask
- 255.255.255.192
- Wildcard mask
- 0.0.0.63
- Prefix length
- /26
- Class
- C
- Address type
- Private (RFC 1918)
Binary view
- Address
- 11000000.10101000.00000001.00001010
- Mask
- 11111111.11111111.11111111.11000000
- Network
- 11000000.10101000.00000001.00000000
- Broadcast
- 11000000.10101000.00000001.00111111
network bits host bits The network address keeps the network bits and sets every host bit to 0. The broadcast sets every host bit to 1.
Show the work
Subnets of this block
Split 192.168.1.0/26 into smaller subnets of one size, or type how many hosts each subnet needs. Your address's subnet is highlighted.
| # | Network | Usable range | Broadcast |
|---|
- Compressed
- Expanded
- Network (prefix)
- Network, expanded
- Last address
- Prefix length
- Address type
- Addresses in the prefix
To compress: drop leading zeros in each group, then replace the longest run of all-zero groups with :: (only once). To expand: put the zeros back so every group has four hex digits.
Loading a question…
Subnetting is one topic. The CCNA has many.
Try 10 free CCNA practice questions with full explanations. No account or card needed.
How to use the subnet calculator
- Type an address with a prefix, such as
192.168.1.10/26, or with a mask, such as192.168.1.10 255.255.255.192. Press Calculate. - Read the network, first and last usable host, broadcast, host count, mask, wildcard mask, class and address type.
- Open Show the work to see the block-size steps. Next time, do them on paper first and check yourself here.
- Use Subnets of this block to list every smaller subnet, or type how many hosts you need and the size is picked for you.
- Switch to Practice for random questions. Type your answer, check it and see the steps.
Subnetting by hand, fast
On the exam you subnet in your head. The block-size method takes three moves: find the octet where the mask is not 255 or 0, subtract its mask value from 256, and count up in that block size until you pass the address. The multiple just below is the network. One less than the next multiple is the broadcast.
The CCNA subnetting cheat sheet has the full table of prefixes, masks, block sizes and host counts, with worked examples.
Frequently asked questions
How do I find the network address of a subnet?
AND the address with the mask in binary: a bit stays 1 only where both are 1. On paper, use the block size instead. Find the octet where the mask is not 255 or 0, subtract that mask value from 256, and round the address octet down to a multiple of the result. For 192.168.1.10/26 the block size is 64, so the network is 192.168.1.0.
How many usable hosts are in a subnet?
Use 2^h − 2, where h is the number of host bits (32 minus the prefix length). The two you subtract are the network address and the broadcast address. A /24 has 2^8 − 2 = 254 usable hosts, a /26 has 62 and a /30 has 2.
What is a wildcard mask?
It is the subnet mask with every bit flipped. Subtract each mask octet from 255: 255.255.255.192 becomes 0.0.0.63. Cisco IOS uses wildcard masks in access control lists and in OSPF network commands.
What is the magic number in subnetting?
It is another name for the block size: 256 minus the mask value in the interesting octet, the octet where the mask is neither 255 nor 0. Subnets start at multiples of it. With mask 255.255.240.0 the magic number is 16 in the third octet, so subnets start at 0, 16, 32 and so on.
Why does a /31 have two usable addresses?
RFC 3021 allows a /31 on point-to-point links. Only two devices share the link, so no address is set aside for the network or broadcast, and both addresses are usable. On other links the 2^h − 2 rule applies, so the smallest subnet with two hosts is a /30.
How is an IPv6 prefix different from an IPv4 mask?
IPv6 writes the prefix only as a length, such as /64. There is no dotted mask. The address is 128 bits, written as eight groups of four hex digits. You may drop leading zeros in a group and replace one run of all-zero groups with ::. A /64 is the standard size for a LAN subnet.