IPv4 subnet calculator
Type an address with a prefix or mask. Drag the ruler or click any bit to move the line between network and host, and every figure updates as you go.
Use the arrow keys in the box to change the prefix by one
- Usable hosts
- 62
- Total addresses
- 64
- Network address
- 192.168.10.64
- Broadcast address
- 192.168.10.127
- First usable host
- 192.168.10.65
- Last usable host
- 192.168.10.126
- Subnet mask
- 255.255.255.192
- Wildcard mask
- 0.0.0.63
- Previous subnet
- 192.168.10.0/26
- Next subnet
- 192.168.10.128/26
- Address in hex
- 0xC0A80A4D
- Reverse DNS name
- 77.10.168.192.in-addr.arpa
Where it sits
Click a square to move to that address. Your subnet is shaded, neighbours alternate.
Use it on a device
Commands use 192.168.10.77 as the interface address.
interface GigabitEthernet0/1 ip address 192.168.10.77 255.255.255.192 no shutdown ! ! Match this subnet in an ACL access-list 10 permit 192.168.10.64 0.0.0.63
Interface names are examples. Change them to match your hardware.
How this answer was worked out
The same three steps you would write on paper in an exam. Change the address above and the working updates with it.
Write both in binary
Convert the address and the mask into 32 bits each. The mask is 26 ones followed by 6 zeros.
AND them together
Where the mask has a 1, keep the address bit. Where it has a 0, write 0. That gives the network address.
Fill the host bits
Set every host bit to 1 for the broadcast. The usable hosts sit between the network and the broadcast.
Shortcut: the block size is 256 minus the mask value in the interesting octet. Networks start at multiples of it. Learn the method or practise it.
More subnet tools
Each tool keeps its inputs in the link, so you can bookmark or share a result.
IPv6 subnet calculator
Prefix ranges, /64 counts, splits and a ULA prefix generator
Open toolVLSM calculator
Size subnets by host count, with AWS, Azure, GCP and OCI rules
Open toolVisual subnet planner
Split and join blocks, label them, then share or export the plan
Open toolCIDR and IP range calculator
Turn any start and end address into the fewest CIDR blocks
Open toolSupernet and route summary
Summarise networks into one route or merge them exactly
Open toolWildcard mask calculator
ACL wildcards, matched ranges and ready Cisco lines
Open toolSubnetting practice
Exam-style questions, checked instantly with the working shown
Open toolSubnet mask cheat sheet
Every prefix from /0 to /32 with mask, wildcard and hosts
Open toolIPv6 cheat sheet
Prefix sizes, address types and the reserved ranges
Open toolQuestions people ask
How do I calculate a subnet from an IP address and prefix?
How many usable hosts are in a /24, /26 or /30?
Why does a /31 show 2 usable hosts?
What is a /32?
Can I type a subnet mask instead of a prefix?
10.0.0.5 255.255.255.0 or 10.0.0.5/255.255.255.0 and the calculator converts it. Masks must be contiguous ones followed by zeros.