An IP subnet calculator turns an address and a prefix into the four numbers you need before you touch a switch: the network address, the broadcast address, the usable host range, and the host count. Feed it 192.168.1.0/24 and you get 192.168.1.0 as the network, 192.168.1.255 as the broadcast, 192.168.1.1 through 192.168.1.254 as usable hosts, and 254 addresses to assign. That is the whole job, done in a second, with no binary arithmetic on a whiteboard.

Once you can read those four fields correctly, you can size any LAN, split any block, and spot an overlapping route before it takes down a production segment. The math never changes; only the prefix does.
Subnetting mistakes rarely announce themselves. A DHCP scope that runs one address past a boundary, an ACL built from a subnet mask where a wildcard mask belonged, a /25 sitting inside a /24 someone else already advertised: these show up as intermittent failures three weeks later, not as an error at config time. PacketTools was built by a network and security engineer with 28 years in enterprise IT, hosting, and WAN/LAN environments, and the same verification habits that catch a bad VPN route catch a bad subnet boundary.
Work through the calculations below and you will be able to verify any addressing plan by hand, confirm it with a calculator, and explain why the boundary falls where it does.
How to Read the Results of a Subnet Calculation
Every subnet calculation reduces to one question: where do the network bits stop and the host bits start? The prefix length answers it, and every other field on the results page falls out of that single split.
Enter an IPv4 Address and Prefix Length
You need two inputs. An IPv4 address in dotted-decimal form, and a prefix length written as a slash followed by a number from 0 to 32.
The address can be any address inside the subnet, not just the network address. Enter 10.14.7.93/22 and the calculator works backward to the network boundary at 10.14.4.0. That behavior is useful in the field: you grab an IP off a live host, paste it in with the mask from ipconfig or ip addr, and immediately see which block it belongs to.
Some calculators accept a dotted-decimal mask like 255.255.252.0 instead of /22. Both describe the same 32-bit value.
Identify the Network Address and Broadcast Address
The network address is the first address in the block, with every host bit set to zero. The broadcast address is the last, with every host bit set to one.
Neither is assignable to an interface on a standard IPv4 subnet. In 192.168.1.64/26, 192.168.1.64 identifies the subnet itself and 192.168.1.127 is the broadcast address; a host configured with either will fail in ways that look like a cabling problem.
These two addresses are also your boundary markers. Any address between them belongs to this subnet, and anything outside it does not, which is the check you run when troubleshooting a network segment that cannot reach its own gateway.
Interpret the Usable Host Range and Host Count
Usable hosts equal 2^(32 − prefix) − 2 for any prefix from /1 through /30. The subtraction removes the network and broadcast addresses.
| Prefix | Mask | Total addresses | Usable hosts |
|---|---|---|---|
| /24 | 255.255.255.0 | 256 | 254 |
| /25 | 255.255.255.128 | 128 | 126 |
| /26 | 255.255.255.192 | 64 | 62 |
| /27 | 255.255.255.224 | 32 | 30 |
| /28 | 255.255.255.240 | 16 | 14 |
| /30 | 255.255.255.252 | 4 | 2 |
Read the usable host range as the assignable pool, then subtract your infrastructure. One address for the gateway, one or two for HSRP or VRRP peers, a handful for printers and management interfaces. A /26 advertising 62 usable hosts realistically supports around 55 endpoints before you feel crowded.
CIDR Notation and Subnet Masks Explained
CIDR notation and the dotted-decimal subnet mask carry identical information in different clothing. /24 and 255.255.255.0 both say “the first 24 bits identify the network,” and every router, firewall, and calculator treats them as equivalent.
What Does a /24 Prefix Mean?
A /24 prefix means 24 of the 32 bits are network bits, leaving 8 host bits. Two to the eighth power gives 256 total addresses, minus network and broadcast, for 254 usable hosts.
Classless Inter-Domain Routing was formalized in RFC 4632 and replaced the rigid class system, letting the prefix land on any bit boundary from /0 to /32. That flexibility is why a /27 for a 20-device wireless VLAN and a /21 for a large campus segment can coexist in the same routing table without waste.
The mental shortcut worth memorizing: each bit you add to the prefix halves the block.
Convert CIDR Notation to a Dotted-Decimal Mask
Write the prefix as that many consecutive 1 bits, pad with zeros to 32 bits, then split into four octets.
- /16 → 11111111.11111111.00000000.00000000 → 255.255.0.0
- /24 → 11111111.11111111.11111111.00000000 → 255.255.255.0
- /25 → 255.255.255.128
- /26 → 255.255.255.192
Only nine values ever appear in an octet: 0, 128, 192, 224, 240, 248, 252, 254, and 255. Seeing anything else in a mask field, like 255.255.255.100, means the config is malformed.
Why Classful Addressing No Longer Defines Modern Networks
Classful addressing assigned fixed prefixes by leading bits: Class A at /8, Class B at /16, Class C at /24. An organization needing 300 hosts had to take a full Class B and waste more than 65,000 addresses.
The class of an address still shows up as a display field on many calculators, and it still explains default masks on legacy gear. It has no bearing on how you size a subnet today. Set the prefix to fit the host count, then verify the boundary, and the class label becomes trivia.
Practical IPv4 Calculations You Can Verify
Four calculations cover most of what you will hit in production: a flat office LAN, a /24 split into quarters, private block selection from RFC 1918, and the special-case prefixes for router links and host routes.
Calculate 192.168.1.0/24 for a Standard LAN
192.168.1.0/24 gives you a network address of 192.168.1.0, a broadcast address of 192.168.1.255, and a usable host range of 192.168.1.1 to 192.168.1.254.
That is 254 assignable addresses in a single broadcast domain. In practice, reserve .1 for the gateway, .2 through .20 for static infrastructure, and hand the rest to DHCP.
A /24 stays comfortable up to roughly 200 active endpoints. Past that, broadcast traffic from ARP, mDNS, and discovery protocols starts eating switch CPU on older access hardware.
Split 192.168.1.0/24 Into /26 Subnets
Extending the prefix by two bits produces four equal subnets of 64 addresses each, 62 usable per subnet, with a mask of 255.255.255.192.
| Subnet | Network | Usable range | Broadcast |
|---|---|---|---|
| 1 | 192.168.1.0/26 | .1 – .62 | 192.168.1.63 |
| 2 | 192.168.1.64/26 | .65 – .126 | 192.168.1.127 |
| 3 | 192.168.1.128/26 | .129 – .190 | 192.168.1.191 |
| 4 | 192.168.1.192/26 | .193 – .254 | 192.168.1.255 |
Notice the boundaries: 0, 64, 128, 192. The block size (64) equals 256 minus the last mask octet (192), which is the fastest way to find subnet boundaries without a calculator.
A common error here is treating .63 as usable. It is subnet 1’s broadcast address, and a host assigned to it will send its traffic to every device in that /26.
Size Private Address Blocks for Internal Networks
RFC 1918 reserves three private ranges, and picking the right one prevents pain later.
- 10.0.0.0/8 gives 16,777,214 usable addresses. Best for multi-site enterprises where you want a whole octet for site codes.
- 172.16.0.0/12 covers 172.16.0.0 through 172.31.255.255. The least-used range, which makes it the safest choice for VPN and lab segments that must not collide with a partner network.
- 192.168.0.0/16 contains 256 /24 networks. Every consumer router ships in this range, so avoid
192.168.0.0/24and192.168.1.0/24on any segment reachable by remote workers.
Overlapping private space is the single most common cause of site-to-site VPN failures. Document each allocation before it goes live, and confirm the addresses in use at both ends.
Use /31 and /32 Prefixes for Router Links and Host Routes
A /31 provides exactly two addresses and no broadcast address, which RFC 3021 permits specifically for point-to-point links. Cisco routers, Juniper, and Linux all support it.
Using /30 on point-to-point links burns four addresses to deliver two. Across 500 WAN circuits, switching to /31 recovers 1,000 addresses.
A /32 describes a single host: network, broadcast, and host are the same address. You use it for loopback interfaces, BGP router IDs, and host routes injected into a routing table.
Apply Subnet Results to Routing, Security, and Address Planning

Subnet math becomes operational the moment you write it into a routing table, an ACL, or a DHCP scope. VLSM lets each segment take only the addresses it needs, wildcard masks invert the subnet mask for Cisco access control lists, and overlap checks prevent the silent failures that surface weeks after deployment.
Plan Variable-Sized Networks With VLSM
Variable Length Subnet Masking lets you assign different prefix lengths inside one parent block. Allocate largest first, then work down.
From 10.20.0.0/22, a workable plan looks like this:
10.20.0.0/24for 200 user endpoints10.20.1.0/25for 100 VoIP phones10.20.1.128/27for 25 servers10.20.1.160/30for a point-to-point link
Allocating in descending size order keeps blocks aligned on their natural boundaries. Assign the /30 first and you fragment the space so badly that the /24 no longer fits.
Derive Wildcard Masks for ACLs
A wildcard mask is the bitwise inverse of the subnet mask: subtract each octet from 255.
- 255.255.255.0 → 0.0.0.255
- 255.255.255.192 → 0.0.0.63
- 255.255.0.0 → 0.0.255.255
So access-list 10 permit 192.168.1.0 0.0.0.255 matches the entire /24. In a wildcard mask, a 0 bit means “must match” and a 1 bit means “ignore,” the reverse of a subnet mask.
Pasting a subnet mask where a wildcard belongs is a mistake that passes syntax checking and quietly matches the wrong traffic.
Prevent Overlaps in Routing Tables and DHCP Scopes
Two subnets overlap when one contains any address of the other. 10.1.0.0/16 and 10.1.5.0/24 overlap completely, and OSPF will install the more specific route while your intent said otherwise.
Check DHCP scope ranges against the subnet boundary every time. A scope of .1 to .255 on a /24 hands out the broadcast address, and clients that receive it lose connectivity in a pattern that mimics a failing NIC.
Keep an address plan in version control with the prefix, VLAN ID, and gateway for every allocation.
Account for NAT, Public Addressing, and APIPA
NAT translates RFC 1918 space to public addresses, so your internal /16 can sit behind one routable IP. That translation hides overlaps until two networks merge.
APIPA addresses in 169.254.0.0/16 are self-assigned when DHCP fails. Seeing one on a client means the DHCP request never got an answer, so check the relay or scope exhaustion before suspecting the endpoint. Multicast lives in 224.0.0.0/4 and never appears in a host subnet allocation.
When public-facing services depend on that addressing being right, verifying DNS records and SSL from one place catches the downstream breakage fast.
Know Where IPv4 Rules End and IPv6 Begins

IPv6 keeps prefix length notation and drops almost everything else you just learned about host counting. There is no broadcast address, subnets are effectively never sized to fit host counts, and the standard segment is a /64 regardless of whether it holds 5 devices or 500.
Why IPv4 Address Exhaustion Changes Subnet Design
IPv4’s 32-bit space caps out at roughly 4.3 billion addresses, and the regional registries ran dry years ago. Public IPv4 is now a leased or purchased asset.
That scarcity is why you tighten prefixes on public blocks and lean on NAT internally. A /29 with 6 usable hosts for a DMZ is normal practice when public space costs money per address.
Internally, RFC 1918 space is free, so oversizing an internal /24 to a /23 costs nothing and saves a renumber later.
How IPv6 Prefixes Differ From IPv4 Subnet Masks
IPv6 uses prefix length only. No dotted-decimal mask exists, and 2001:db8:acad:1::/64 is the complete specification.
Addresses are 128 bits, written as eight hextets in hexadecimal. Leading zeros compress, and one run of consecutive zero hextets collapses to ::.
A /64 contains 18.4 quintillion addresses. Calculating usable hosts is pointless at that scale, which is why IPv6 subnet calculators report the prefix range instead of a host count.
Use /64 Networks and SLAAC Without IPv4 Broadcasts
SLAAC requires a /64. Stateless Address Autoconfiguration derives the last 64 bits from the interface identifier, so any longer prefix breaks automatic addressing on that link.
Assign a /64 to every LAN segment. Point-to-point links can use /127, but a /64 per link stays consistent and costs nothing from a /48 site allocation.
IPv6 replaces broadcast traffic with multicast groups. Neighbor Discovery uses solicited-node multicast instead of the ARP broadcasts that flood an IPv4 segment, so the broadcast domain sizing limits that shape IPv4 design do not apply the same way.
Use Accurate Subnet Boundaries With Confidence
Every subnet calculation comes back to four values: the network address at the bottom of the block, the broadcast address at the top, the usable host range between them, and the count of addresses you can actually assign. Get the prefix length right and those four fall into place.
Keep the block-size shortcut handy (256 minus the last mask octet) and the boundaries for /25 through /30 become fast enough to check in your head. Verify the result before it reaches a config, especially when splitting an existing /24 or adding a route that touches an already-advertised block.
For the diagnostics that follow an addressing change, from confirming reachability with a ping test to tracing a path hop by hop, PacketTools runs everything in the browser with no sign-in, no tracking, and no logging of your IPs or queries.

Leave a Reply