CalcSutra

IP Subnet Calculator

Calculate subnet mask, network address, broadcast address, host range, and number of usable hosts for any CIDR notation.

Enter Values

Fill in the fields and press Calculate to see instant results.

Advertisement

[After Results Ad — 728×90 leaderboard]

IP Subnet Calculator: Network Address, Host Range & More

The IP Subnet Calculator computes all critical network parameters from a single IPv4 address and CIDR prefix length: network address, broadcast address, subnet mask, wildcard mask, host IP range, and the total number of usable hosts. Whether you are a network engineer designing VLAN segmentation, a system administrator allocating IP address space, or a student studying for CompTIA Network+ or Cisco CCNA, this tool delivers instant results.

Subnetting is the practice of dividing a large IP address block into smaller sub-networks. A home router creates one subnet (typically 192.168.1.0/24). An enterprise network may have hundreds of subnets isolating servers, workstations, IoT devices, and guest WiFi. Understanding CIDR (Classless Inter-Domain Routing) notation is fundamental to modern network design.

Enter any IPv4 address and CIDR prefix (e.g., 192.168.10.50/26) and the calculator instantly returns all subnet parameters, saving minutes of manual binary arithmetic.

💡 Quick Reference: The most common subnet is /24 (255.255.255.0) with 254 usable hosts. Point-to-point WAN links use /30 (4 IPs, 2 usable). Default routes use /0.

When to Use This IP Subnet Calculator

🖥️ Network Design & Planning

Design IP address allocation plans for office networks, VLANs, and data centers. Determine how many subnets you can create from a given address block.

🔧 Firewall & ACL Configuration

Get exact network addresses and wildcard masks needed for router ACLs (Access Control Lists) and firewall rules to permit or block traffic by subnet.

🎓 Network+ / CCNA Exam Study

Verify your manual subnet calculations for certification exam practice. CompTIA Network+ and Cisco CCNA both feature subnetting as a core topic.

🏠 Home Lab & Self-Hosting

Configure static IPs for servers, NAS devices, and network-attached equipment. Quickly find the gateway IP range and avoid IP conflicts with DHCP pools.

☁️ Cloud Network Configuration

Design VPC (Virtual Private Cloud) subnets in AWS, Azure, or GCP. Cloud platforms use CIDR notation for all network definitions and require precise subnet planning.

🔍 Troubleshooting Network Issues

Quickly verify whether two IP addresses are on the same subnet, identify misconfigured subnet masks, and determine correct gateway addresses.

Subnetting Formula Explained

IPv4 subnetting uses binary bitwise operations. Here are the core calculations:

Subnet Mask from CIDR Prefix

Subnet Mask = 32 consecutive 1-bits, prefix-many set to 1, rest to 0

/24 → 11111111.11111111.11111111.00000000 → 255.255.255.0

Network Address

Network Address = IP Address AND Subnet Mask (bitwise)

192.168.10.50 AND 255.255.255.0 = 192.168.10.0

Broadcast Address

Broadcast = Network Address OR Wildcard Mask

192.168.10.0 OR 0.0.0.255 = 192.168.10.255

Variable Definitions

  • IP Address: The host's IPv4 address in dotted-decimal (e.g., 192.168.10.50).
  • CIDR Prefix (n): Number of network bits (0–32). Determines the subnet size.
  • Subnet Mask: 32-bit mask with n leading 1s. Used to identify the network portion.
  • Network Address: First IP in the subnet (all host bits = 0). Identifies the subnet.
  • Broadcast Address: Last IP in the subnet (all host bits = 1). Delivers packets to all hosts.
  • Host Range: Network address + 1 to Broadcast address − 1.
  • Usable Hosts: 2^(32 − n) − 2 (subtracting network and broadcast addresses).
  • Wildcard Mask: Inverse of subnet mask. Used in Cisco ACLs and OSPF configurations.

Step-by-Step Subnet Calculation Guide

  1. Write the IP address in binary. Each octet is 8 bits. Example: 192.168.10.50 = 11000000.10101000.00001010.00110010
  2. Create the subnet mask from the prefix. Write the prefix-length count of 1s, then fill with 0s. For /26: 11111111.11111111.11111111.11000000 = 255.255.255.192
  3. AND the IP with the subnet mask to get the network address. 11000000.10101000.00001010.00110010 AND 11111111.11111111.11111111.11000000 = 11000000.10101000.00001010.00000000 = 192.168.10.0
  4. Calculate the wildcard mask. Invert each bit of the subnet mask. 255.255.255.192 → 0.0.0.63
  5. Find the broadcast address. OR the network address with the wildcard mask. 192.168.10.0 OR 0.0.0.63 = 192.168.10.63
  6. Determine the host range. First host: 192.168.10.1 (network + 1). Last host: 192.168.10.62 (broadcast − 1).
  7. Count usable hosts. 2^(32 − 26) − 2 = 2^6 − 2 = 64 − 2 = 62 usable hosts.

Worked Examples

Example 1: Standard Home Network (192.168.1.100/24)

ParameterValue
Network Address192.168.1.0
Subnet Mask255.255.255.0
Broadcast Address192.168.1.255
Host Range192.168.1.1 – 192.168.1.254
Usable Hosts254
Wildcard Mask0.0.0.255

Example 2: Point-to-Point WAN Link (10.0.0.5/30)

ParameterValue
Network Address10.0.0.4
Subnet Mask255.255.255.252
Broadcast Address10.0.0.7
Host Range10.0.0.5 – 10.0.0.6
Usable Hosts2 (router interfaces)
Wildcard Mask0.0.0.3

/30 subnets are the standard for point-to-point router links. Two routers, two usable IPs—no waste.

Example 3: Enterprise VLAN (172.16.5.0/22)

ParameterValue
Network Address172.16.4.0
Subnet Mask255.255.252.0
Broadcast Address172.16.7.255
Host Range172.16.4.1 – 172.16.7.254
Usable Hosts1,022
Wildcard Mask0.0.3.255

Example 4: AWS VPC Subnet (10.0.1.0/26)

ParameterValue
Network Address10.0.1.0
Subnet Mask255.255.255.192
Broadcast Address10.0.1.63
Host Range10.0.1.1 – 10.0.1.62
Usable Hosts62 (59 for AWS, which reserves 5)
Wildcard Mask0.0.0.63

⚠️ AWS reserves the first 4 and last 1 IPs in each subnet, so a /26 yields only 59 usable EC2 instance IPs instead of 62.

Example 5: Splitting a /24 into Four /26 Subnets

SubnetNetworkHost RangeBroadcastHosts
Subnet 1192.168.1.0/26192.168.1.1–62192.168.1.6362
Subnet 2192.168.1.64/26192.168.1.65–126192.168.1.12762
Subnet 3192.168.1.128/26192.168.1.129–190192.168.1.19162
Subnet 4192.168.1.192/26192.168.1.193–254192.168.1.25562

Advertisement

[Mid-Article Ad — 728×90 leaderboard]

CIDR Quick Reference Table

CIDRSubnet MaskTotal IPsUsable HostsCommon Use
/30255.255.255.25242Point-to-point links
/29255.255.255.24886Small office segments
/28255.255.255.2401614Small department
/27255.255.255.2243230Small team network
/26255.255.255.1926462Department network
/25255.255.255.128128126Large department
/24255.255.255.0256254Standard Class C / VLAN
/23255.255.254.0512510Medium office
/22255.255.252.01,0241,022Large building
/20255.255.240.04,0964,094Campus network
/16255.255.0.065,53665,534Large enterprise
/8255.0.0.016,777,21616,777,214ISP / Class A

Real-World Applications

🏢 VLAN Segmentation

Large offices use multiple VLANs to isolate traffic: one subnet for employee workstations, another for IP phones, servers, printers, and guest WiFi. Each VLAN gets its own subnet with appropriate prefix length.

☁️ Cloud VPC Design

AWS, Azure, and GCP require precise subnetting for VPCs. Public subnets (with internet gateway) and private subnets (database tier) use different CIDR ranges carved from the parent VPC CIDR block.

🔐 Security Zone Isolation

Firewalls enforce security policies between subnets. Separating guest WiFi (10.0.100.0/24) from corporate data (10.0.1.0/24) with firewall rules prevents lateral movement in case of a breach.

🌐 ISP IP Address Allocation

ISPs allocate address blocks to businesses using CIDR aggregation. A business receives a /24 (256 IPs) from its ISP's larger /16 or /8 allocation, enabling efficient BGP routing table management.

🏭 Industrial IoT Networks

Factory automation systems place PLCs, sensors, and SCADA systems on isolated subnets (/28 or /26) separate from office networks, limiting exposure of critical control systems to general network traffic.

🔄 Route Summarization

Network engineers use supernetting to aggregate multiple routes into one summary route. Four /26 subnets can be summarized as one /24, reducing routing table entries and improving router performance.

Common Mistakes to Avoid

❌ Assigning the Network or Broadcast Address to a Host

Consequence: Devices cannot communicate if assigned the network address (first IP) or broadcast address (last IP). These are reserved and cannot be used for hosts.

✓ Solution: Always assign IPs from the host range only: Network + 1 through Broadcast − 1.

❌ Using Mismatched Subnet Masks

Consequence: If a host uses /24 but its gateway uses /23, the host will try to reach IPs on the /23 network directly instead of routing through the gateway, causing connectivity failures.

✓ Solution: Ensure all devices on the same subnet use identical subnet masks. Use DHCP to distribute correct subnet configuration automatically.

❌ Overlapping Subnets

Consequence: Two subnets using overlapping address ranges (e.g., 10.0.0.0/24 and 10.0.0.128/25) create routing ambiguity and can cause intermittent connectivity or routing loops.

✓ Solution: Plan all subnets from a master IP address plan. Use an IPAM (IP Address Management) tool for large networks to prevent overlaps.

❌ Undersized Subnets for Growth

Consequence: A /27 (30 hosts) seems adequate today but leaves no room for expansion. Running out of IPs forces painful renumbering of the entire subnet.

✓ Solution: Plan for 2–3× current device count when sizing subnets. It's better to allocate a /24 (254 hosts) than to re-address later.

Tips and Best Practices

  • Use private RFC 1918 ranges internally: 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16 are non-routable on the internet. Use these for all internal networks to conserve public IP space.
  • Standardize on power-of-two prefixes: Using consistent prefix lengths (/24, /26, /28) across your network simplifies documentation, training, and troubleshooting.
  • Document your IP address plan: Maintain a spreadsheet or IPAM tool with every subnet, its purpose, assigned hosts, and gateway IP. Networks become unmaintainable without documentation.
  • Reserve IPs for infrastructure: By convention, assign the first few IPs (.1, .2, .3) to routers/gateways and the last few (.254, .253) to management interfaces. This makes network documentation predictable.
  • Practice binary subnetting for certifications: While this calculator handles the math, understanding binary subnetting is required for CCNA/CCNP exams. Practice converting between decimal and binary to build fluency.

Frequently Asked Questions About IP Subnetting

What is an IP address?

An IP (Internet Protocol) address is a unique numerical label assigned to every device on a network. IPv4 addresses use four 8-bit numbers (octets) separated by dots, for example 192.168.1.100. The address has two parts: the network portion (identifies the subnet) and the host portion (identifies the specific device on that subnet).

What is CIDR notation?

CIDR (Classless Inter-Domain Routing) notation expresses an IP address and its subnet mask in a compact format: IP/prefix-length, for example 192.168.1.0/24. The number after the slash indicates how many bits are used for the network portion. /24 = 24 network bits = subnet mask 255.255.255.0. /16 = subnet mask 255.255.0.0.

How many usable hosts does a /24 subnet have?

A /24 subnet has 256 total addresses (2^8) but only 254 usable host addresses. Two addresses are reserved: the network address (first IP, e.g., 192.168.1.0) and the broadcast address (last IP, e.g., 192.168.1.255). The formula for usable hosts is: 2^(32 - prefix) - 2.

What is the difference between network address and broadcast address?

The network address is the first IP in a subnet (all host bits = 0). It identifies the subnet itself and cannot be assigned to a device. The broadcast address is the last IP (all host bits = 1). Packets sent to the broadcast address are delivered to all devices on the subnet. Neither can be assigned to individual hosts.

What is subnetting and why is it used?

Subnetting divides a large network into smaller, more manageable sub-networks. Benefits include: improved security (isolates departments), reduced broadcast traffic, better network performance, efficient use of IP address space, and simplified routing. A /24 subnet can be divided into two /25 subnets, each with 126 usable hosts.

Related Calculators

People Also Calculate

Advertisement

[Bottom Article Ad — 728×90 leaderboard]

Conclusion

IP subnetting is a foundational networking skill that underpins everything from home routers to massive cloud data centers. Understanding how CIDR notation divides IP address space, how subnet masks define network boundaries, and how to calculate host ranges enables you to design secure, efficient networks that scale.

Use this IP Subnet Calculator to instantly compute any subnet's parameters — eliminating manual binary arithmetic and reducing configuration errors. Whether planning a small office VLAN, sizing a cloud VPC, or studying for a Cisco CCNA exam, accurate subnetting is essential. Pair this tool with the Bandwidth Calculator to also assess the throughput capacity of your network links.

🌐 Pro Tip: For IPv6 subnetting, the same principles apply but with 128-bit addresses divided by 64-bit network prefixes. Most IPv6 deployments use /64 prefix lengths for individual subnets, providing 2^64 (18 quintillion) host addresses per subnet.

People Also Calculate

Calculators visitors commonly use alongside this one.