What Is IP Subnetting?
IP subnetting is the process of dividing a larger network into smaller, more manageable sub-networks called subnets. Every device on a network needs a unique IP address, and subnetting determines which addresses belong to the same network segment and how many devices that segment can support.
The practice dates back to RFC 950, published in 1985, which introduced subnetting as a way to extend the limited address space of IPv4. The modern CIDR (Classless Inter-Domain Routing) system, defined in RFC 4632, replaced the rigid classful A/B/C system in 1993 and is what we use today. Despite IPv6 adoption growing steadily, IPv4 remains the dominant protocol on most enterprise and home networks as of 2026, making subnetting skills as relevant as ever.
Network engineers, system administrators, and anyone setting up a home or business network use subnetting to organize IP address space, improve security, and control broadcast traffic. For related network calculations, see our Bandwidth Calculator.
What This Calculator Does
This calculator takes an IPv4 address and a CIDR prefix length and returns the complete subnet information needed to configure and document a network.
- Inputs: An IPv4 address (e.g. 192.168.1.100) and a CIDR prefix length (e.g. /24)
- Outputs: Network address, broadcast address, subnet mask, wildcard mask, first and last usable host, total hosts, usable hosts, and IP class
How the Calculation Works
Subnet Mask from CIDR
/24 = 11111111.11111111.11111111.00000000 = 255.255.255.0
The CIDR prefix (e.g. /24) indicates how many leading bits of the 32-bit IP address are the network portion. The remaining bits are the host portion. A /24 has 24 network bits and 8 host bits, supporting 2^8 = 256 total addresses. The CIDR system allows prefixes from /0 (the entire IPv4 space) to /32 (a single host), giving far more flexibility than the old classful system where you had to choose between 16 million addresses (Class A), 65,536 (Class B), or 256 (Class C).
Network and Broadcast Address
Network = IP AND Subnet Mask
Broadcast = Network OR Wildcard Mask
The network address is found by performing a bitwise AND between the IP address and the subnet mask. This zeroes out all host bits, leaving only the network identifier. The broadcast address sets all host bits to 1 by performing a bitwise OR between the network address and the wildcard mask (the inverse of the subnet mask). Usable hosts are all addresses between these two extremes, giving 2^(host bits) - 2 addresses. The two exceptions are /31 (used for point-to-point links per RFC 3021, supporting 2 hosts with no broadcast) and /32 (a single host route).
How to Use the Calculator
- Enter any IPv4 address from your network (e.g. 10.0.0.50)
- Enter the CIDR prefix length (e.g. 24 for a typical home or office network)
- Click Calculate Subnet to see all network details
- Use the network address and subnet mask to configure routers, switches, and firewalls
- Document the wildcard mask for Cisco ACL or OSPF configurations
Example Calculations
Example 1: Home Network
IP: 192.168.1.100/24. Network address: 192.168.1.0. Broadcast: 192.168.1.255. Subnet mask: 255.255.255.0. Usable hosts: 192.168.1.1 to 192.168.1.254, giving 254 devices. This is the most common home and small office network configuration. Most consumer routers default to this subnet.
Example 2: Point-to-Point Link
IP: 10.0.0.1/30. This subnet supports exactly 2 usable hosts (10.0.0.1 and 10.0.0.2), which is ideal for a point-to-point link between two routers. Using /30 conserves IP address space compared to allocating a full /24 for just two devices. Per RFC 3021, a /31 can be used for even greater efficiency, supporting 2 hosts with no broadcast address, but not all network equipment supports this.
Real World Scenarios
Home Network Setup with IoT Segmentation
Alex, a network engineer working from home in Seattle, wants to isolate IoT devices from his main network. His router uses 192.168.1.0/24 for personal devices. He creates a separate VLAN for smart home devices using 192.168.2.0/24 and a guest network on 192.168.3.0/24. Using this calculator, he verifies that the three subnets do not overlap and documents the network and broadcast addresses for his router configuration. He also sets up firewall rules to prevent IoT devices from reaching his personal subnet.
Enterprise Network Planning for a Growing Company
Maria, an IT manager at a 200-person company in Chicago, has been allocated 10.10.0.0/22 by her ISP. She needs to divide this across four departments: Engineering (80 people), Sales (50 people), Operations (40 people), and Guest WiFi (30 concurrent users). Using this calculator, she plans: Engineering gets 10.10.0.0/25 (126 hosts), Sales gets 10.10.0.128/26 (62 hosts), Operations gets 10.10.1.0/26 (62 hosts), and Guest WiFi gets 10.10.1.64/27 (30 hosts). This leaves 10.10.1.96/27 through 10.10.3.255 for future growth. She documents each subnet's network address, broadcast, and usable range for the network team.
Cloud VPC Configuration on AWS
David, a DevOps engineer, is setting up a new AWS VPC for a three-tier application. He allocates 10.0.0.0/16 for the VPC, then creates subnets: 10.0.1.0/24 for the web tier, 10.0.2.0/24 for the application tier, and 10.0.3.0/24 for the database tier. He uses this calculator to verify that each subnet has 254 usable addresses and that none overlap. AWS requires non-overlapping subnets across availability zones, so he also plans 10.0.4.0/24, 10.0.5.0/24, and 10.0.6.0/24 for a second availability zone. For estimating data transfer costs between subnets, our Bandwidth Calculator can help estimate transfer times.
Common Mistakes to Avoid
- Assigning the network or broadcast address to a host: The first address (network) and last address (broadcast) in a subnet cannot be assigned to devices. Only the addresses between them are usable. A /24 has 256 total addresses but only 254 usable host addresses
- Overlapping subnets: When creating multiple subnets from a larger block, ensure their ranges do not overlap. For example, 10.0.0.0/25 and 10.0.0.128/25 are the two non-overlapping halves of 10.0.0.0/24. Overlapping subnets cause routing conflicts and intermittent connectivity issues
- Confusing CIDR with subnet mask notation: /24 and 255.255.255.0 represent the same thing. Both notations appear in network equipment configuration and should be understood interchangeably. Cisco devices typically use subnet mask notation, while Linux and cloud platforms prefer CIDR notation
- Under-sizing a subnet: Allocating a /28 (14 hosts) when you need 20 devices requires redesigning the network. Plan for future growth by choosing a slightly larger subnet. A /27 gives 30 hosts, a /26 gives 62, and a /25 gives 126
- Forgetting about gateway addresses: One usable host address in each subnet is typically reserved for the default gateway (router interface). A /29 with 6 usable hosts actually gives you 5 devices plus the gateway. Account for this when sizing subnets for small segments
Limitations of This Calculator
This calculator handles IPv4 addresses only. It does not support IPv6, which uses 128-bit addresses and a different CIDR range (typically /64 for LAN segments, /48 for site allocations). The calculator does not perform VLSM (Variable Length Subnet Masking) planning across multiple subnets simultaneously. For complex subnet allocation from a larger block, a dedicated IP address management (IPAM) tool is more appropriate. The class detection output (A, B, C, D, E) is informational only and has no practical effect in modern CIDR-based networking.
Authoritative Research & Resources
- IETF RFC 4632 - Classless Inter-Domain Routing (CIDR) - The definitive specification for CIDR, published in 2006. This RFC defines the modern subnetting system that replaced the classful A/B/C addressing scheme. Essential reading for understanding why CIDR notation works the way it does.
- IETF RFC 950 - Internet Standard Subnetting Procedure - The original 1985 RFC that introduced subnetting. While superseded by CIDR for routing purposes, the core concepts of network and host portions, subnet masks, and broadcast addresses all originate here.
- NIST - Applied Cybersecurity Resources - The National Institute of Standards and Technology provides guidelines on network architecture and security, including subnet isolation best practices for enterprise networks. Useful for understanding why proper subnetting matters for security, not just address management.