Free · No sign-up · Runs entirely in your browser
Find the network address, broadcast address, usable host range and host count for any IPv4 subnet — including the cloud-adjusted count and correct handling of /31 and /32.
| Property | Value |
|---|
An IPv4 address is 32 bits, usually written as four decimal numbers. The prefix after the slash says how many of those bits are fixed as the network portion — everything left over identifies individual hosts within it.
That is the whole idea. Move the boundary right and you get more, smaller networks. Move it left and you get fewer, larger ones. Everything the calculator reports follows from where that line sits.
| Term | What it is | In 192.168.1.0/24 |
|---|---|---|
| Network address | All host bits zero — names the subnet itself | 192.168.1.0 |
| Broadcast address | All host bits one — reaches every host at once | 192.168.1.255 |
| Usable range | Everything between those two | 192.168.1.1 – 192.168.1.254 |
| Subnet mask | The same prefix written as four octets | 255.255.255.0 |
Subnets cannot be any size you like. Each bit you take doubles or halves the block, so the sizes go 2, 4, 8, 16, 32, 64, 128, 256 and so on — never 100, never 60.
This is the single most useful thing to internalise. If you need room for 50 devices you cannot have a 50-address subnet. You take the next power of two that fits after subtracting the network and broadcast addresses: 64 addresses, a /26, giving 62 usable.
| Devices needed | Smallest subnet | Addresses | Usable | Spare |
|---|---|---|---|---|
| 2 | /30 | 4 | 2 | 0 |
| 10 | /28 | 16 | 14 | 4 |
| 25 | /27 | 32 | 30 | 5 |
| 50 | /26 | 64 | 62 | 12 |
| 200 | /24 | 256 | 254 | 54 |
| 300 | /23 | 512 | 510 | 210 |
The prefixes you will actually meet, with what each is normally used for.
| CIDR | Subnet mask | Addresses | Usable | AWS / Azure | Typical use |
|---|---|---|---|---|---|
| /8 | 255.0.0.0 | 16,777,216 | 16,777,214 | 16,777,211 | 10.0.0.0/8 private range |
| /12 | 255.240.0.0 | 1,048,576 | 1,048,574 | 1,048,571 | 172.16.0.0/12 private range |
| /16 | 255.255.0.0 | 65,536 | 65,534 | 65,531 | Very large private network |
| /20 | 255.255.240.0 | 4,096 | 4,094 | 4,091 | Large enterprise block |
| /22 | 255.255.252.0 | 1,024 | 1,022 | 1,019 | Larger campus segment |
| /23 | 255.255.254.0 | 512 | 510 | 507 | Two joined /24s |
| /24 | 255.255.255.0 | 256 | 254 | 251 | Standard LAN / home network |
| /25 | 255.255.255.128 | 128 | 126 | 123 | Half a /24 |
| /26 | 255.255.255.192 | 64 | 62 | 59 | Medium LAN |
| /27 | 255.255.255.224 | 32 | 30 | 27 | Small LAN |
| /28 | 255.255.255.240 | 16 | 14 | 11 | Small office segment |
| /29 | 255.255.255.248 | 8 | 6 | 3 | Tiny subnet, 6 devices |
| /30 | 255.255.255.252 | 4 | 2 | 0 | Router-to-router links |
| /31 | 255.255.255.254 | 2 | 2 | n/a | Point-to-point (RFC 3021) |
| /32 | 255.255.255.255 | 1 | 1 | n/a | Single host / loopback |
This catches people out constantly, and it is not in most subnetting tutorials because those predate cloud networking.
On a traditional network, two addresses per subnet are unavailable: the network address and the broadcast address. AWS and Azure both reserve five.
| Address | Reserved for |
|---|---|
| First (.0) | Network address |
| Second (.1) | The VPC or virtual network router |
| Third (.2) | DNS |
| Fourth (.3) | Reserved for future use |
| Last (.255) | Broadcast address |
The calculator above shows both figures so you can see the difference at a glance.
The "subtract two" formula fails at the very small end, and these are exactly the prefixes network engineers use most often on infrastructure links.
| Prefix | Addresses | Usable | Why |
|---|---|---|---|
| /30 | 4 | 2 | The conventional choice for router-to-router links — but half the block is wasted on network and broadcast |
| /31 | 2 | 2 | RFC 3021 defines this for point-to-point links. There is no broadcast on a link with exactly two endpoints, so both addresses are usable |
| /32 | 1 | 1 | A single host — used for loopback interfaces, host routes and firewall rules matching one address |
Worth knowing even with a calculator, because it is on every networking exam and because it makes the results intuitive rather than magical.
Example: what subnet does 172.16.34.7/20 belong to?
| Step | Working | Result |
|---|---|---|
| 1. Find the interesting octet | /20 falls in the third octet (bits 17–24) | Third octet |
| 2. Bits used in that octet | 20 − 16 = 4 bits | Mask 11110000 = 240 |
| 3. Block size | 256 − 240 | 16 |
| 4. Count up in blocks of 16 | 0, 16, 32, 48, 64… | 34 falls inside the 32 block |
| 5. Network address | Third octet = 32, host bits zero | 172.16.32.0 |
| 6. Broadcast | One below the next block (48) | 172.16.47.255 |
| 7. Usable range | Between them | 172.16.32.1 – 172.16.47.254 |
Variable-length subnet masking means giving each segment the smallest block that fits, rather than the same size to everyone. Here is a single 192.168.10.0/24 divided across four segments with different needs.
| Segment | CIDR | Network | Usable range | Broadcast | Hosts |
|---|---|---|---|---|---|
| Guest Wi-Fi | /25 | 192.168.10.0 | 192.168.10.1 – 192.168.10.126 | 192.168.10.127 | 126 |
| Sales | /26 | 192.168.10.128 | 192.168.10.129 – 192.168.10.190 | 192.168.10.191 | 62 |
| HR | /27 | 192.168.10.192 | 192.168.10.193 – 192.168.10.222 | 192.168.10.223 | 30 |
| Servers | /28 | 192.168.10.224 | 192.168.10.225 – 192.168.10.238 | 192.168.10.239 | 14 |
| Unallocated | /28 | 192.168.10.240 | — | 192.168.10.255 | reserved for growth |
Four segments, 240 of 256 addresses used, and a spare /28 left for growth. Compare that with the alternatives:
| Approach | Result |
|---|---|
| VLSM (above) | Fits in one /24 with 16 addresses spare |
| Equal /26 to every segment | Exactly 256 addresses — but Guest Wi-Fi needs 126 hosts and a /26 provides 62. Does not fit |
| Equal /25 to every segment | Works, but consumes 512 addresses — a whole /23 for the same four segments |
That is the entire argument for VLSM: the same requirement in half the address space, with room left over. Run each network above through the calculator to check the boundaries yourself.
| Range | Purpose |
|---|---|
| 10.0.0.0/8 | Private (RFC 1918) — 16.7 million addresses |
| 172.16.0.0/12 | Private (RFC 1918) — 1 million addresses |
| 192.168.0.0/16 | Private (RFC 1918) — 65,536 addresses |
| 100.64.0.0/10 | Carrier-grade NAT (RFC 6598) — many ISPs use this |
| 169.254.0.0/16 | Link-local (APIPA) — what you get when DHCP fails |
| 127.0.0.0/8 | Loopback — localhost |
| 224.0.0.0/4 | Multicast |
| 0.0.0.0/8 | This network / unspecified |
Private ranges are not routable on the public internet. Anyone can use them internally, which is why 192.168.1.0/24 appears in millions of homes simultaneously without conflict — NAT translates them to a public address on the way out.
| Range | Best for | Watch out for |
|---|---|---|
| 10.0.0.0/8 | Enterprises and cloud VPCs — 16.7 million addresses and room for clean hierarchy | Overlap when merging networks or connecting VPNs |
| 172.16.0.0/12 | Mid-size networks. Less commonly used, so less likely to collide | The range is 172.16–172.31, not 172.16–172.255 |
| 192.168.0.0/16 | Homes and small offices | 192.168.0.0/24 and 192.168.1.0/24 are router defaults — guaranteed to clash over VPN |
This calculator handles IPv4 only. IPv6 works differently enough that most of the arithmetic above does not carry across.
| IPv4 | IPv6 | |
|---|---|---|
| Address size | 32 bits | 128 bits |
| Total addresses | ~4.3 billion | ~3.4 × 1038 |
| Written as | 192.168.1.1 | 2001:0db8:85a3::8a2e:0370:7334 |
| Typical LAN subnet | /24 — 254 hosts | /64 — always, regardless of host count |
| Broadcast address | Yes, the last address in the subnet | None at all |
| Private addressing | RFC 1918 ranges plus NAT | Unique local addresses (fc00::/7); NAT generally unnecessary |
| Address assignment | DHCP or static | SLAAC, DHCPv6 or static |
IPv6 subnets are essentially always /64, whether the segment holds four devices or four thousand. A /64 contains more addresses than the entire IPv4 internet, so there is no reason to subdivide further — and stateless address autoconfiguration depends on that 64-bit boundary. Address conservation, which drives most IPv4 subnetting decisions, simply is not a consideration.
Subnetting is not only about address efficiency. It is the foundation of network segmentation, which limits how far an intrusion can spread.
| Role | The question being answered |
|---|---|
| Network administrator | Sizing VLANs per department, and checking a proposed subnet does not overlap an existing one |
| Cloud engineer | Planning VPC and virtual network CIDR blocks — where the five-address reservation and the /28 minimum both bite |
| DevOps engineer | Writing CIDR blocks into Terraform or CloudFormation, and carving a VPC range into non-overlapping subnets across availability zones |
| Security professional | Defining segmentation boundaries, and writing firewall rules against ranges rather than individual hosts |
| Systems administrator | Diagnosing why a server cannot reach a resource — usually a mask mismatch or a gateway outside the local range |
| CCNA and Network+ students | Checking hand-worked answers, and practising the block-size method against a reliable reference |
| Home lab and self-hosters | Splitting a home network so IoT devices and guests cannot reach the machines that matter |
What is CIDR notation?
CIDR notation writes the subnet mask as a slash and the number of network bits, so 192.168.1.0/24 means the first 24 bits identify the network and the remaining 8 identify hosts. It replaced the old classful system in 1993, allowing networks to be any size rather than fixed at class A, B or C boundaries.
How many hosts are in a subnet?
Take 2 to the power of the host bits, then subtract two for the network and broadcast addresses. A /24 has 8 host bits, so 256 addresses and 254 usable. A /26 has 6 host bits: 64 addresses and 62 usable. The exceptions are /31, which has two usable addresses under RFC 3021, and /32, which is a single host.
Why does AWS give fewer usable addresses than my calculation?
AWS and Azure both reserve five addresses in every subnet rather than two — the network address, the router, DNS, one held for future use, and the broadcast address. A /24 therefore provides 251 usable addresses instead of 254, and a /28 provides 11 instead of 14. Both platforms enforce /28 as the smallest permitted subnet because of it.
What is a /24 subnet?
A /24 uses 24 bits for the network and 8 for hosts, giving 256 total addresses with 254 usable. Its subnet mask is 255.255.255.0. It is the most common size for home and small office networks — 192.168.1.0/24 is the default on a great many consumer routers.
What is a /30 subnet used for?
A /30 provides four addresses with two usable, which is exactly enough for a link between two routers. It has traditionally been the standard choice for point-to-point connections, though a /31 does the same job using half the addresses and is now widely supported.
Can a /31 subnet be used?
Yes, on point-to-point links. RFC 3021 recognises that a link with exactly two endpoints has no need for a broadcast address, so both addresses in a /31 are usable. Most modern routing platforms support it, and it is common in service provider networks. Older calculators report zero usable hosts for a /31 because they predate the standard.
What is the difference between a network address and a broadcast address?
The network address has all host bits set to zero and identifies the subnet itself — it is what appears in routing tables. The broadcast address has all host bits set to one and reaches every host on that subnet simultaneously. Neither can be assigned to a device, which is why usable hosts is two fewer than total addresses.
What are the private IP ranges?
RFC 1918 defines three: 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16. They are not routable on the public internet, so anyone can use them internally. Note that 172.16.0.0/12 covers 172.16 through 172.31 only — addresses above 172.31 are public space belonging to someone else.
Why is my IP address 169.254.something?
That is a link-local address, assigned automatically when a device cannot reach a DHCP server. It lets the device communicate with others on the same physical network segment but nothing beyond it. Seeing one usually means the DHCP server is down, the cable or wi-fi connection has a problem, or the device is on the wrong network.
What is 100.64.0.0/10?
It is the carrier-grade NAT range from RFC 6598, used by ISPs to share a single public address among many customers. If your router's external address falls in this range you do not have a genuinely public IP, which means inbound connections, port forwarding and hosting services from home will not work regardless of your router settings.
Are IP classes A, B and C still relevant?
Not for how addresses are actually allocated — CIDR replaced classful addressing in 1993 because rigid class boundaries wasted enormous amounts of address space. The terminology persists in certification exams, in documentation and in engineers' habits, so it is worth recognising, but no modern network is designed around it.
How do I subnet without a calculator?
Find the octet the prefix falls in, subtract the mask value in that octet from 256 to get the block size, then count up in blocks until you pass your address. For 172.16.34.7/20 the mask octet is 240, so the block size is 16, and counting 0, 16, 32, 48 shows that 34 sits in the 32 block — network 172.16.32.0, broadcast 172.16.47.255.
Network address, broadcast address, host range and host count all fall out of one decision: how many bits belong to the network. Get comfortable with that and subnetting stops being memorisation.
Two things to carry away that most tutorials skip: the cloud reserves five addresses per subnet rather than two, and /31 and /32 do not follow the minus-two rule.
For other tools in this section, the bandwidth calculator covers transfer times and data usage, and the password generator creates strong credentials for the devices you are configuring.