Subnet Calculator / CIDR Calculator
Calculate network addresses, broadcast addresses, usable hosts, wildcard masks, and more from any IP/CIDR notation. Includes subnet divider and visual subnet map. 100% client-side — no data leaves your browser.
IPv4 Subnet Calculator
Enter an IP address with CIDR notation (e.g. 192.168.1.0/24) or an IP address and subnet mask.
Subnet Divider
Split a network into smaller subnets. Enter a base network and choose how to divide it.
Common Subnets Quick Reference
Click any row to load it in the calculator above.
IPv6 Subnet Calculator
Enter an IPv6 address with prefix length (e.g. 2001:db8::/32).
About Subnet Calculators and CIDR Notation
A subnet calculator is an essential tool for network engineers, system administrators, and DevOps professionals. It helps you break down IP address ranges into logical sub-networks (subnets), determine which hosts belong to which network, and plan IP address allocation across your infrastructure. Whether you are designing a new network from scratch or troubleshooting connectivity issues, understanding subnetting is fundamental to effective network management.
What is CIDR Notation?
CIDR (Classless Inter-Domain Routing) notation is a compact way to represent an IP address and its associated network mask. It is written as the IP address followed by a slash and the prefix length, for example 192.168.1.0/24. The prefix length indicates how many bits of the address are used for the network portion. A /24 prefix means the first 24 bits identify the network, leaving 8 bits for host addresses, which provides 256 total addresses (254 usable hosts). CIDR replaced the older classful addressing system in 1993 and is now the standard way to express IP ranges in routing tables, firewall rules, cloud security groups, and access control lists.
Understanding Subnet Masks and Wildcard Masks
A subnet mask is a 32-bit number that separates the network portion of an IP address from the host portion. For example, the subnet mask 255.255.255.0 corresponds to a /24 prefix. In binary, this is 24 ones followed by 8 zeros. The wildcard mask is the bitwise inverse of the subnet mask and is used in Cisco ACLs and OSPF configurations. For a /24, the wildcard mask would be 0.0.0.255. Understanding both representations is critical when configuring routers, switches, and firewalls.
IP Address Classes
The original Internet design used five address classes. Class A addresses (1.0.0.0 to 126.255.255.255) use an 8-bit network prefix and support over 16 million hosts per network. Class B addresses (128.0.0.0 to 191.255.255.255) use 16-bit prefixes with 65,534 hosts. Class C (192.0.0.0 to 223.255.255.255) uses 24-bit prefixes with 254 hosts. Class D (224.0.0.0 to 239.255.255.255) is reserved for multicast, and Class E (240.0.0.0 to 255.255.255.255) is reserved for experimental use. While classful addressing is largely obsolete, understanding IP classes helps when working with legacy systems and default subnet masks.
Private vs Public IP Ranges
RFC 1918 defines three private IP address ranges that are not routable on the public Internet: 10.0.0.0/8 (Class A), 172.16.0.0/12 (Class B), and 192.168.0.0/16 (Class C). These ranges are used for internal networks, VPCs in cloud environments, container networking, and home networks. This calculator automatically detects whether an IP address falls within a private or public range.
Subnet Planning for Cloud and Kubernetes
In modern cloud architectures, subnet planning is critical. AWS VPCs, Azure VNets, and GCP VPCs all require careful subnet design. A typical production setup might use a /16 VPC (65,536 addresses) divided into /24 subnets (254 hosts each) across multiple availability zones. Kubernetes clusters need especially careful planning, as each pod typically receives its own IP address from the VPC CIDR range. The subnet divider feature of this tool helps you split large networks into appropriately sized subnets for your cloud deployments.
IPv6 Subnetting
IPv6 uses 128-bit addresses, providing an astronomically large address space. The most common subnet size in IPv6 is /64, which gives each subnet 2^64 (over 18 quintillion) addresses. IPv6 addresses are written in hexadecimal groups separated by colons, such as 2001:db8:abcd:0012::1/64. While the math is similar to IPv4, the scale is vastly different. This calculator handles basic IPv6 prefix calculations to help you work with next-generation networks.
100% Client-Side Processing
All subnet calculations are performed entirely in your browser using JavaScript bitwise operations. No network data, IP addresses, or configuration details are ever transmitted to any server. Your infrastructure information stays completely private on your device, making this tool safe to use with production network details.