Interactive Tool
Subnet Calculator
Use it as an IP address calculator or a CIDR calculator: enter an IPv4 address with a prefix or mask to get the network, broadcast, host range and binary view, then split it.
- /0 to /32 every prefix
- 25 prefixes in the cheat sheet
Calculate a Subnet
| Network address | 192.168.10.32/27 |
|---|---|
| Broadcast address | 192.168.10.63 |
| Usable host range | 192.168.10.33 to 192.168.10.62 |
| Usable hosts | 30 |
| Total addresses | 32 |
| Subnet mask | 255.255.255.224 (/27) |
| Wildcard mask | 0.0.0.31 |
| Block size | 32 in octet 4 |
| Address type | Private (RFC 1918); historical class C |
Binary view
| Address | 11000000.10101000.00001010.00100101 |
|---|---|
| Mask | 11111111.11111111.11111111.11100000 |
| Network | 11000000.10101000.00001010.00100000 |
Network bits (27) Host bits (5)
Split This Network
4 subnets of /29 (2 bits borrowed), 6 usable hosts each.
| # | Subnet | Usable range | Broadcast |
|---|---|---|---|
| 1 | 192.168.10.32/29 | 192.168.10.33 to 192.168.10.38 | 192.168.10.39 |
| 2 | 192.168.10.40/29 | 192.168.10.41 to 192.168.10.46 | 192.168.10.47 |
| 3 | 192.168.10.48/29 | 192.168.10.49 to 192.168.10.54 | 192.168.10.55 |
| 4 | 192.168.10.56/29 | 192.168.10.57 to 192.168.10.62 | 192.168.10.63 |
Want to do this by hand? Try the subnetting practice problems
This is a subnet calculator that also does the jobs people look for as an IP address calculator or a CIDR calculator. Type an address with a prefix, such as 192.168.10.37/27, and it returns the network, broadcast, host range, masks and binary view for the subnet it sits in. Results update as you type. When you press Calculate, the page address picks up your input, so a link to it opens the same result. The subnetting practice problems use the same engine.
How to Read the Results
Each row of the results table answers one question about the subnet. Here is what each one means, with the values for 192.168.10.37/27.
Network address
192.168.10.32/27
The first address in the subnet, with every host bit set to 0. It names the subnet and can't be given to a device, except in a /31 or /32 (see below).
Broadcast address
192.168.10.63
The last address, with every host bit set to 1. A packet sent here reaches every host in the subnet. /31 and /32 subnets have none.
Usable host range
192.168.10.33 to 192.168.10.62
The first and last addresses you can assign to devices, normally the network plus one through the broadcast minus one.
Usable hosts
30
How many devices fit. A /27 holds 30, a /24 holds 254.
Mask and wildcard
255.255.255.224 · 0.0.0.31
The prefix written as an address, and its inverse.
Block size
32 in octet 4
256 minus the mask in the octet where the prefix ends. Subnets of this size start at every multiple of it, which is the shortcut the practice page teaches.
Binary view
27 network bits · 5 host bits
The address in 32 bits, with the network bits and host bits marked so you can see where the prefix falls.
Address type
Private (RFC 1918); class C
Whether the address is private (RFC 1918), loopback, link-local, carrier-grade NAT, documentation, multicast or public, plus the historical class.
CIDR Calculator Basics: How Prefixes Work
Classless Inter-Domain Routing, defined today in RFC 4632, replaced the old class A, B and C networks. Instead of three fixed sizes, a prefix of any length from /0 to /32 sets where the network part ends. That’s why the calculator lists the historical class only for reference: an address starting with 10 is “class A” by its first bit, but 10.1.2.0/24 is simply a /24.
Each bit added to the prefix halves the subnet. A /24 has 256 addresses, a /25 has 128 and a /26 has 64. In the other direction, a /16 has 65,536 addresses and a /8 has 16,777,216. The cheat sheet below lists every prefix from /8 to /32.
Private Address Ranges
The calculator labels these ranges, each set aside by its own RFC. The three private ranges are the ones a home router typically hands out.
10.0.0.0/8172.16.0.0/12192.168.0.0/16
Private
RFC 1918
Set aside for private networks, which internet routers are not meant to carry. Home routers typically hand out addresses from these ranges and use network address translation to reach the internet.
127.0.0.0/8
Loopback
RFC 1122
Reserved for addresses that stay inside the device itself.
169.254.0.0/16
Link-local
RFC 3927
A device with no other address configuration, such as one that gets no answer from a DHCP server, may give itself one of these, so seeing one usually means DHCP failed.
100.64.0.0/10
Shared Address Space
RFC 6598
Set aside for providers running carrier-grade NAT, which puts many customers behind a few public addresses.
192.0.2.0/24198.51.100.0/24203.0.113.0/24
Documentation
RFC 5737
Reserved for examples in books and manuals.
What /31 and /32 Prefixes Mean
Normal subnets lose two addresses to the network and broadcast. On a link between exactly two routers, that wastes half of a /30. RFC 3021 lets a /31 carry the link instead: both addresses are usable, and neither is a broadcast. The calculator shows a /31 with two usable hosts, a host range that runs from the network address to the next address, and no broadcast address.
A /32 is a single address. It appears in routing tables as a route to one host, and on routers as the address of a loopback interface. The calculator shows it as one usable host, with the network address, first host and last host all equal to the address itself.
Checking a Hand-Worked Answer
The calculator is a quick way to check work you did on paper. Take 172.16.45.200/20. A /20 ends in the third octet, where the mask is 240, so the block size is 256 − 240 = 16. Subnets in the third octet start at 0, 16, 32, 48 and so on up to 240, and 45 falls in the block that starts at 32. That makes the network 172.16.32.0 and the broadcast 172.16.47.255, because the next block starts at 48 and every octet after the third is all host bits. Enter 172.16.45.200/20 above and the results match, with 4,094 usable hosts. If your paper answer differs, compare your work with the binary view to see where the prefix line falls. If converting the octets themselves is the sticking point, the binary converter shows the place values for any number.
Splitting a Network
The split section divides the subnet into smaller ones, either into a number of subnets or by a new, longer prefix. Asking for 6 subnets of a /24 rounds up to 8, because borrowing 3 bits gives 2 × 2 × 2 = 8 pieces, each a /27 with 30 usable hosts. The list shows up to 256 subnets and says how many more exist.
IPv4 subnetting is a listed objective on the CompTIA Network+ and Cisco CCNA exams, and network administrators use it when they plan address space.
CIDR Cheat Sheet: /8 to /32
Every prefix from /8 to /32, with its mask, wildcard, size and the block size in the octet where it ends. Generated from the same subnet engine as the calculator. At /8, /16 and /24 the prefix ends on an octet boundary, so the block size is 1 in that octet (256 in the next).
| Prefix | Subnet mask | Wildcard | Addresses | Usable hosts | Block size |
|---|---|---|---|---|---|
| /8 | 255.0.0.0 | 0.255.255.255 | 16,777,216 | 16,777,214 | 1 (octet 1) |
| /9 | 255.128.0.0 | 0.127.255.255 | 8,388,608 | 8,388,606 | 128 (octet 2) |
| /10 | 255.192.0.0 | 0.63.255.255 | 4,194,304 | 4,194,302 | 64 (octet 2) |
| /11 | 255.224.0.0 | 0.31.255.255 | 2,097,152 | 2,097,150 | 32 (octet 2) |
| /12 | 255.240.0.0 | 0.15.255.255 | 1,048,576 | 1,048,574 | 16 (octet 2) |
| /13 | 255.248.0.0 | 0.7.255.255 | 524,288 | 524,286 | 8 (octet 2) |
| /14 | 255.252.0.0 | 0.3.255.255 | 262,144 | 262,142 | 4 (octet 2) |
| /15 | 255.254.0.0 | 0.1.255.255 | 131,072 | 131,070 | 2 (octet 2) |
| /16 | 255.255.0.0 | 0.0.255.255 | 65,536 | 65,534 | 1 (octet 2) |
| /17 | 255.255.128.0 | 0.0.127.255 | 32,768 | 32,766 | 128 (octet 3) |
| /18 | 255.255.192.0 | 0.0.63.255 | 16,384 | 16,382 | 64 (octet 3) |
| /19 | 255.255.224.0 | 0.0.31.255 | 8,192 | 8,190 | 32 (octet 3) |
| /20 | 255.255.240.0 | 0.0.15.255 | 4,096 | 4,094 | 16 (octet 3) |
| /21 | 255.255.248.0 | 0.0.7.255 | 2,048 | 2,046 | 8 (octet 3) |
| /22 | 255.255.252.0 | 0.0.3.255 | 1,024 | 1,022 | 4 (octet 3) |
| /23 | 255.255.254.0 | 0.0.1.255 | 512 | 510 | 2 (octet 3) |
| /24 | 255.255.255.0 | 0.0.0.255 | 256 | 254 | 1 (octet 3) |
| /25 | 255.255.255.128 | 0.0.0.127 | 128 | 126 | 128 (octet 4) |
| /26 | 255.255.255.192 | 0.0.0.63 | 64 | 62 | 64 (octet 4) |
| /27 | 255.255.255.224 | 0.0.0.31 | 32 | 30 | 32 (octet 4) |
| /28 | 255.255.255.240 | 0.0.0.15 | 16 | 14 | 16 (octet 4) |
| /29 | 255.255.255.248 | 0.0.0.7 | 8 | 6 | 8 (octet 4) |
| /30 | 255.255.255.252 | 0.0.0.3 | 4 | 2 | 4 (octet 4) |
| /31 | 255.255.255.254 | 0.0.0.1 | 2 | 2 (RFC 3021) | 2 (octet 4) |
| /32 | 255.255.255.255 | 0.0.0.0 | 1 | 1 | 1 (octet 4) |
Subnet Calculator FAQ
How do I find the network address from an IP and a subnet mask?
AND the address with the mask, bit by bit: every host bit becomes 0, and what remains is the network address. For 192.168.10.37 with 255.255.255.224, that gives 192.168.10.32. The calculator shows this as the binary view, with the network bits marked.
What is a wildcard mask?
A wildcard mask is the subnet mask with every bit flipped, so each octet is 255 minus the mask octet. A /27 mask of 255.255.255.224 has a wildcard of 0.0.0.31. Cisco access control lists and OSPF network statements use wildcard masks.
Is this the same as an IP address calculator or a CIDR calculator?
Yes. Those names describe the same job: take an IPv4 address and a prefix or mask and work out its network, broadcast and host range. As a CIDR calculator it also shows how many addresses each prefix holds, and the split section turns one CIDR block into smaller ones.
Can I enter a subnet mask instead of a prefix?
Yes. Type 192.168.10.37/27, 192.168.10.37/255.255.255.224 or 192.168.10.37 255.255.255.224, or put the mask in the second field. A mask whose 1 bits aren't contiguous from the left, such as 255.0.255.0, is rejected with an explanation.
Does the calculator save what I type?
No. The math runs in your browser and nothing you type is saved. When you press Calculate or leave the field, your input is added to the page address so you can bookmark or share the result, and like any page address it can appear in the site's analytics, as the privacy policy describes.
Keep researching
Related Rankings and Guides
Sources
- RFC 1918, Address Allocation for Private Internets
- RFC 3021, Using 31-Bit Prefixes on IPv4 Point-to-Point Links
- RFC 4632, Classless Inter-domain Routing (CIDR)
- RFC 1122, Requirements for Internet Hosts
- RFC 3927, Dynamic Configuration of IPv4 Link-Local Addresses
- RFC 5737, IPv4 Address Blocks Reserved for Documentation
- RFC 6598, IANA-Reserved IPv4 Prefix for Shared Address Space
- RFC 5771, IANA Guidelines for IPv4 Multicast Address Assignments