Calculate network address, broadcast address, usable IP range, wildcard mask, and total hosts from any IP address and CIDR subnet mask. Used daily by network engineers, IT administrators, and students studying for their Cisco CCNA certification.
Subnetting is the process of dividing a large IP network into smaller, more manageable segments called subnets. Each subnet operates as its own mini-network within the larger network, with its own network address, broadcast address, and range of usable host addresses.
Think of subnetting like dividing a large building into separate offices. Each office (subnet) has its own door number (network address), intercom (broadcast), and room numbers (host addresses). People within the same office can talk freely, but they need to go through the main hallway (router) to reach a different office.
Subnetting provides three key benefits:
When you enter an IP address and select a CIDR prefix length (like /24), the calculator performs these operations:
| CIDR | Subnet Mask | Wildcard | Total Addresses | Usable Hosts | Common Use |
|---|---|---|---|---|---|
| /8 | 255.0.0.0 | 0.255.255.255 | 16,777,216 | 16,777,214 | Class A default |
| /12 | 255.240.0.0 | 0.15.255.255 | 1,048,576 | 1,048,574 | Large enterprise |
| /16 | 255.255.0.0 | 0.0.255.255 | 65,536 | 65,534 | Class B default |
| /20 | 255.255.240.0 | 0.0.15.255 | 4,096 | 4,094 | Campus/building |
| /22 | 255.255.252.0 | 0.0.3.255 | 1,024 | 1,022 | Large office floor |
| /24 | 255.255.255.0 | 0.0.0.255 | 256 | 254 | Home network, small office |
| /25 | 255.255.255.128 | 0.0.0.127 | 128 | 126 | Department subnet |
| /26 | 255.255.255.192 | 0.0.0.63 | 64 | 62 | Small department |
| /27 | 255.255.255.224 | 0.0.0.31 | 32 | 30 | Server VLAN |
| /28 | 255.255.255.240 | 0.0.0.15 | 16 | 14 | DMZ, small segment |
| /29 | 255.255.255.248 | 0.0.0.7 | 8 | 6 | Small server cluster |
| /30 | 255.255.255.252 | 0.0.0.3 | 4 | 2 | Point-to-point link |
| /31 | 255.255.255.254 | 0.0.0.1 | 2 | 2* | RFC 3021 P2P link |
| /32 | 255.255.255.255 | 0.0.0.0 | 1 | 1 | Host route / loopback |
* /31 subnets use both addresses as hosts per RFC 3021 — no network or broadcast address.
These ranges are reserved for private networks (defined by RFC 1918) and are not routable on the public internet. Your home router uses one of these ranges internally, with NAT translating to your public IP.
| Range | CIDR | Class | Total Addresses | Typical Use |
|---|---|---|---|---|
| 10.0.0.0 — 10.255.255.255 | 10.0.0.0/8 | A | 16,777,216 | Large enterprise, ISP (Xfinity/Comcast) |
| 172.16.0.0 — 172.31.255.255 | 172.16.0.0/12 | B | 1,048,576 | Medium enterprise, Docker defaults |
| 192.168.0.0 — 192.168.255.255 | 192.168.0.0/16 | C | 65,536 | Home routers (most common) |
Most home routers use 192.168.1.0/24:
A company needs 4 departments on separate subnets from 192.168.1.0/24:
| Subnet | Network | Usable Range | Broadcast | Hosts |
|---|---|---|---|---|
| 1st /26 | 192.168.1.0 | .1 — .62 | 192.168.1.63 | 62 |
| 2nd /26 | 192.168.1.64 | .65 — .126 | 192.168.1.127 | 62 |
| 3rd /26 | 192.168.1.128 | .129 — .190 | 192.168.1.191 | 62 |
| 4th /26 | 192.168.1.192 | .193 — .254 | 192.168.1.255 | 62 |
Router-to-router connections only need 2 IPs. A /30 is perfect:
ipconfig
Look for Subnet Mask under your active adapter. It's usually 255.255.255.0 (/24) on home networks.
ifconfig | grep netmask
Or with the newer ip command:
ip addr show | grep inet
The output shows CIDR notation directly, like inet 192.168.1.100/24.
Log into your router's admin panel, go to LAN settings, and you'll see the subnet mask field. Most home users should leave it at 255.255.255.0 (/24). Only change it if you're deliberately segmenting your network with VLANs.
Pro Tip: When setting static IPs, always use addresses within your subnet's usable range and outside the DHCP pool. For a /24 network, a common approach is DHCP assigns .100-.200 and static devices use .2-.99 or .201-.254.
The fastest way to subnet in your head: for each CIDR increase by 1, you halve the number of hosts.
| CIDR | Hosts | Block Size | Memory Aid |
|---|---|---|---|
| /24 | 254 | 256 | Full C-class |
| /25 | 126 | 128 | Half |
| /26 | 62 | 64 | Quarter |
| /27 | 30 | 32 | Eighth |
| /28 | 14 | 16 | Sixteenth |
| /29 | 6 | 8 | Thirty-second |
| /30 | 2 | 4 | Point-to-point |
The block size (also called increment) tells you where each subnet starts. For /26 (block size 64): subnets start at .0, .64, .128, .192.
Key Takeaways
CIDR (Classless Inter-Domain Routing) notation represents a subnet mask as a slash followed by the number of network bits. For example, /24 means the first 24 bits are the network portion, equivalent to the subnet mask 255.255.255.0. It replaced the old class-based system (Class A, B, C) to allow more flexible address allocation.
A /24 subnet has 256 total addresses and 254 usable hosts. The formula is 2^(32-24) - 2 = 254. The two excluded addresses are the network address (192.168.1.0) and broadcast address (192.168.1.255), which cannot be assigned to individual devices.
A wildcard mask is the bitwise inverse of a subnet mask. Where the subnet mask has 1s, the wildcard has 0s, and vice versa. For example, subnet mask 255.255.255.0 has wildcard 0.0.0.255. Wildcard masks are used in Cisco access control lists (ACLs) and OSPF routing configurations.
Every subnet reserves two addresses that cannot be assigned to devices: the network address (all host bits set to 0, identifies the subnet itself) and the broadcast address (all host bits set to 1, used to send data to all devices on the subnet simultaneously).
Use /24 (255.255.255.0). It provides 254 addresses, which is more than enough for any home. Most routers default to this. There's no benefit to using a larger subnet at home — it just increases the broadcast domain unnecessarily.
Subnets must not overlap if they're on the same network — overlapping ranges cause IP address conflicts and routing errors. When planning subnets, use this calculator to verify that each subnet's range doesn't overlap with another. The block size makes this easy to check.
![]() |
![]() |
![]() |
![]() |
About Tommy N.
Tommy is the founder of RouterHax and a network engineer with 10+ years of experience in home and enterprise networking. He specializes in router configuration, WiFi optimization, and network security. When not writing guides, he's testing the latest mesh WiFi systems and helping readers troubleshoot their home networks.
Promotion for FREE Gifts. Moreover, Free Items here. Disable Ad Blocker to get them all.
Once done, hit any button as below
![]() |
![]() |
![]() |
![]() |