>
Enter IP address and CIDR to quickly calculate subnet information
IPv4 subnetting is the process of dividing a large IP network into smaller, more manageable sub-networks. This is a fundamental skill for network engineers, system administrators, and DevOps professionals who design and manage computer networks. Subnetting allows efficient use of limited IPv4 address space, improves network performance by reducing broadcast domains, enhances security by isolating network segments, and simplifies network troubleshooting. Every IPv4 address consists of 32 bits, divided into a network portion and a host portion identified by the subnet mask. The subnet mask determines how many bits belong to the network and how many to the hosts, which in turn defines the total number of available subnets and hosts per subnet. CIDR notation (Classless Inter-Domain Routing) represents this compactly as a slash followed by the number of network bits, such as /24 for 255.255.255.0. Our IPv4 Subnet Calculator automates all subnet calculations instantly, eliminating manual binary conversion and reducing the risk of human error in network planning.
Enter an IP address and a subnet mask or CIDR prefix length in the input fields above. For example, type 192.168.1.0 with a /24 prefix. You can also enter a full subnet mask like 255.255.255.192 instead of CIDR notation — the calculator accepts both formats and converts between them automatically. If you need to find subnets within a range, enter the starting network address. The calculator validates your input in real-time, highlighting any invalid entries and providing helpful error messages to guide you toward correct formatting before performing calculations.
Click the Calculate button to generate comprehensive subnet information. The results include the network address, broadcast address, first usable host, last usable host, total number of usable hosts, wildcard mask, and binary representation of the subnet mask. For CIDR ranges larger than /30, the calculator also provides a complete subnet table showing all possible subnets within the given network, their address ranges, and host counts. This table is essential for planning network segmentation strategies, especially when designing VLANs or allocating address blocks across multiple departments or locations in an enterprise environment.
Use the results to plan your network infrastructure. If you need to create subnets for different departments, look at the subnet table to identify appropriate address ranges. For example, a /26 network gives you 4 subnets of 62 hosts each — perfect for separating engineering, marketing, finance, and guest networks. You can adjust the CIDR prefix length and recalculate to explore different segmentation options. The calculator also shows the supernet (route aggregation) information, which helps reduce routing table size when advertising multiple subnets to upstream routers. Export or copy the results for documentation purposes, or use them directly when configuring routers, switches, firewalls, and DHCP servers.
CIDR (Classless Inter-Domain Routing) is a method for allocating IP addresses and routing Internet Protocol packets. It replaced the old classful network addressing system (Class A, B, C) which wasted enormous amounts of IP address space. In CIDR notation, an IP address is followed by a slash and a number representing the count of leading bits in the network portion of the address. For instance, 10.0.0.0/8 means the first 8 bits are the network identifier, giving a massive network with over 16 million addresses. A /24 like 192.168.1.0/24 reserves 24 bits for the network, leaving 8 bits for 256 addresses (254 usable hosts). CIDR enables variable-length subnet masking (VLSM), allowing network administrators to create subnets of different sizes tailored to actual needs rather than fixed class boundaries, dramatically improving address utilization efficiency.
A subnet mask is a 32-bit number that separates the IP address into network and host portions. Each bit set to 1 in the mask corresponds to a network bit, while each bit set to 0 corresponds to a host bit. In dotted decimal notation, a /24 mask is written as 255.255.255.0, meaning the first 24 bits are network bits and the remaining 8 bits are host bits. The wildcard mask is simply the inverse of the subnet mask — it has 0s where the subnet mask has 1s, and 1s where the subnet mask has 0s. So for 255.255.255.0, the wildcard mask is 0.0.0.255. Wildcard masks are commonly used in access control lists (ACLs) on Cisco routers and in some routing protocols like OSPF. Understanding the relationship between subnet masks and wildcard masks is essential for network configuration and security rule design.
To determine the right subnet size, start by estimating the maximum number of hosts each subnet needs, both current and projected growth over 3-5 years. Then find the smallest CIDR prefix that accommodates that count. Remember that the actual usable host count is 2^n - 2, where n is the number of host bits (you subtract 2 for the network and broadcast addresses). For example, if a department needs 50 hosts, you need at least 6 host bits (2^6 - 2 = 62), so a /26 is appropriate. Always round up to the next power of 2 — you cannot split a subnet unevenly. Consider leaving room for growth rather than creating the tightest possible fit. For networks with many small subnets, consider using /25 or /26 blocks. For point-to-point links between routers, /30 (2 usable hosts) or /31 (2 hosts, no broadcast) is standard. Document your allocation scheme to avoid conflicts as the network grows.