IP Subnet Calculator
CIDR Range, Network Mask & IP Address Tool — Free Network Engineering Calculator
Last updated: March 2026
IP Subnet Calculator
Enter an IPv4 address and select a CIDR prefix to calculate network range, broadcast address, usable hosts and more.
CIDR Quick Reference Table
Common subnet sizes at a glance — click any row to load it into the calculator.
| CIDR | Subnet Mask | Total Hosts | Usable Hosts | Common Use |
|---|---|---|---|---|
| /30 | 255.255.255.252 | 4 | 2 | P2P links |
| /29 | 255.255.255.248 | 8 | 6 | Small office |
| /28 | 255.255.255.240 | 16 | 14 | — |
| /27 | 255.255.255.224 | 32 | 30 | — |
| /26 | 255.255.255.192 | 64 | 62 | — |
| /25 | 255.255.255.128 | 128 | 126 | — |
| /24 | 255.255.255.0 | 256 | 254 | Small LAN |
| /23 | 255.255.254.0 | 512 | 510 | — |
| /22 | 255.255.252.0 | 1,024 | 1,022 | — |
| /20 | 255.255.240.0 | 4,096 | 4,094 | — |
| /16 | 255.255.0.0 | 65,536 | 65,534 | Large enterprise |
| /8 | 255.0.0.0 | 16,777,216 | 16,777,214 | ISP level |
Click any row to populate the calculator above.
What is IP Subnetting?
IP subnetting is the process of dividing a single large IP network into smaller, more manageable logical subnetworks — called subnets. Each subnet operates as its own distinct network segment, with its own range of assignable IP addresses, network address, and broadcast address.
CIDR (Classless Inter-Domain Routing) notation is the modern standard for expressing IP address blocks. Written as an IP address followed by a forward slash and a number — for example 192.168.1.0/24 — the number after the slash (called the prefix length) indicates how many of the 32 bits in an IPv4 address are used to identify the network. The remaining bits identify individual hosts within that network.
A /24 prefix means 24 bits are used for the network portion, leaving 8 bits for host addressing. This gives 28 = 256 total addresses, of which 254 are usable (two are reserved: the network address and broadcast address).
Why Subnetting Matters
- Network performance: Smaller broadcast domains reduce unnecessary traffic. Broadcast packets only reach devices within the same subnet, preventing traffic storms on large flat networks.
- Security: Subnets create logical boundaries between departments or systems. A compromised device in one subnet cannot directly reach devices in another without passing through a router or firewall.
- IP conservation: By allocating only the address space needed for each segment, organisations avoid wasting IP addresses. A /30 subnet for a point-to-point link uses just 4 addresses instead of a full /24 block.
- Simplified management: Network administrators can apply routing policies, access control lists, and QoS rules at the subnet level.
How to Calculate Subnet Ranges
Understanding how to manually calculate subnet ranges is valuable for network engineers and anyone studying for CCNA or CompTIA Network+ certifications.
Step-by-Step: Binary Conversion Method
- Write the IP address in binary. Convert each octet separately. For 192.168.1.0: 11000000.10101000.00000001.00000000
- Write the subnet mask in binary. For /24: 11111111.11111111.11111111.00000000
- Perform a bitwise AND of the IP address and mask to get the network address. The host bits (0s in mask) become 0.
- Set all host bits to 1 to find the broadcast address.
- First usable host = network address + 1. Last usable host = broadcast address - 1.
Worked Example: 192.168.1.0/24
- IP in binary: 11000000.10101000.00000001.00000000
- Mask (/24): 11111111.11111111.11111111.00000000
- Network Address: 192.168.1.0 (all host bits = 0)
- Broadcast Address: 192.168.1.255 (all host bits = 1)
- First Usable Host: 192.168.1.1
- Last Usable Host: 192.168.1.254
- Usable Hosts: 28 − 2 = 254
- Wildcard Mask: 0.0.0.255 (inverse of subnet mask)
Private vs Public IP Ranges
RFC 1918 defines three IP address ranges reserved for private use — these addresses are not routable on the public internet and are used exclusively for internal networks. All internet access from private addresses requires Network Address Translation (NAT).
| IP Range | CIDR Block | Total Addresses | Typical Use |
|---|---|---|---|
| 10.0.0.0 – 10.255.255.255 | 10.0.0.0/8 | 16,777,216 | Large enterprise, data centres |
| 172.16.0.0 – 172.31.255.255 | 172.16.0.0/12 | 1,048,576 | Medium networks, VPNs |
| 192.168.0.0 – 192.168.255.255 | 192.168.0.0/16 | 65,536 | Home networks, small offices |
Additionally, 169.254.0.0/16 is reserved for APIPA (Automatic Private IP Addressing) — devices self-assign an address from this range when DHCP fails. 127.0.0.0/8 is the loopback range (commonly 127.0.0.1, or "localhost").
Common Network Design Examples
Here are practical examples of how network engineers select subnet sizes for different scenarios:
- Home router (192.168.1.0/24): A standard home network uses /24, providing 254 addresses — more than enough for all household devices. The router typically assigns itself .1 and distributes .100–.254 via DHCP.
- Office with multiple departments: A medium office might allocate 10.0.1.0/24 for HR, 10.0.2.0/24 for IT, and 10.0.3.0/24 for Finance — keeping each department in a separate broadcast domain for security and performance.
- Data centre server farm: A /22 block (10.10.0.0/22) provides 1,022 usable addresses for a rack of servers, with room to grow.
- WAN point-to-point links: A /30 subnet is used between two router interfaces on a leased line — providing exactly 2 usable addresses, one for each router endpoint, with no wasted addresses.
- VLAN segmentation: A large enterprise might use /8 or /12 as the overall address space, then subnet into /24 VLANs for each floor of a building.
IPv4 vs IPv6 Subnetting Differences
While this calculator focuses on IPv4, understanding the differences with IPv6 is increasingly important for modern network engineers:
- Address length: IPv4 uses 32-bit addresses (about 4.3 billion total). IPv6 uses 128-bit addresses — creating approximately 3.4 × 1038 unique addresses.
- CIDR still applies: IPv6 also uses prefix length notation (e.g., 2001:db8::/32). A /48 is typically assigned to an organisation, /64 to individual LAN segments.
- No broadcast: IPv6 eliminates broadcast entirely, replacing it with multicast and anycast addresses. This removes the need to subtract 2 from host counts — every address in an IPv6 /64 except the subnet-router anycast is assignable.
- No NAT required: With sufficient address space, every device can have a globally routable IPv6 address, making end-to-end connectivity simpler.
- Subnetting granularity: Standard practice is to subnet IPv6 at /64 boundaries. Sub-/64 subnetting is technically possible but breaks SLAAC (Stateless Address Autoconfiguration).
Frequently Asked Questions
Expert Reviewed — This calculator is reviewed by our team of network engineering specialists. Subnet calculations verified against RFC 950 and RFC 1518. Last verified: March 2026.
Official Sources & References
Last updated: March 2026 | Verified with RFC 1918 and current networking standards