IPv4 subnet calculatorNetwork, host range, broadcast, mask and wildcard for any IPv4 blockIPv6 subnet calculatorPrefix ranges, /64 counts, splits and a ULA prefix generatorVLSM calculatorSize subnets by host count, with AWS, Azure, GCP and OCI rulesVisual subnet plannerSplit and join blocks, label them, then share or export the planCIDR and IP range calculatorTurn any start and end address into the fewest CIDR blocksSupernet and route summarySummarise networks into one route or merge them exactlyWildcard mask calculatorACL wildcards, matched ranges and ready Cisco linesSubnetting practiceExam-style questions, checked instantly with the working shownSubnet mask cheat sheetEvery prefix from /0 to /32 with mask, wildcard and hostsIPv6 cheat sheetPrefix sizes, address types and the reserved rangesGuidesHow subnetting works, explained with worked examples

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

192.168.10.64/26 Private Class C
1921681077
/26
26 network bits6 host bits
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.

192.168.10.0/24Each square is one address
Your addressYour subnetNeighbouring subnets

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.

IP address11000000 10101000 00001010 01001101192.168.10.77
Mask /2611111111 11111111 11111111 11000000255.255.255.192
Network (AND)11000000 10101000 00001010 01000000192.168.10.64
Broadcast11000000 10101000 00001010 01111111192.168.10.127
4Interesting octet
64Block size (256 − 192)
64Multiple of 64 at or below 77
127Last value in the block

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.

Questions people ask

How do I calculate a subnet from an IP address and prefix?
Write the address and the mask in binary, then AND them: every bit where the mask is 1 keeps the address bit, every bit where it is 0 becomes 0. The result is the network address. Set all host bits to 1 and you have the broadcast address. The calculator above shows each of these rows for your input.
How many usable hosts are in a /24, /26 or /30?
Take 2 to the power of the host bits and subtract 2 for the network and broadcast addresses. A /24 has 254 usable hosts, a /26 has 62 and a /30 has 2. The subnet mask cheat sheet lists every prefix.
Why does a /31 show 2 usable hosts?
RFC 3021 allows /31 networks on point-to-point links. There is no network or broadcast address, so both addresses are usable. Many older calculators show 0 here, which is wrong for modern routers from Cisco, Juniper and others.
What is a /32?
A /32 is a single address. It is used for loopback interfaces, host routes and firewall rules that match exactly one host.
Can I type a subnet mask instead of a prefix?
Yes. Type 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.
Is anything I type sent to a server?
No. Every calculation runs in your browser with JavaScript. The link updates so you can share a result, but the address only travels if you send that link to someone.