Loading your tools...
Loading your tools...
Free IPv4/IPv6 subnet calculator with CIDR notation, subnet mask computation, network/broadcast address identification, usable host range analysis, wildcard mask generation, VLSM variable-length subnetting, supernetting route aggregation, and binary/hexadecimal IP conversions for network engineers and IT professionals.
Loading Tool...
Enter IP Address: Input any IPv4 address (e.g., 192.168.1.100) or IPv6 address (e.g., 2001:db8::1) in the calculator.
Set Subnet Mask or CIDR: Choose a subnet mask from the dropdown (e.g., 255.255.255.0) or enter a CIDR prefix length (e.g., /24). The tool converts between formats automatically.
Calculate Results: Click calculate to instantly compute network address, broadcast address, usable host range, total hosts, wildcard mask, binary representation, and hexadecimal conversion.
Analyze Network: Review the full subnet analysis including network class, private/public IP status, VLSM breakdown, and supernet aggregation possibilities for your network design.
Network Planning: Design and document enterprise LAN/WAN subnet schemes with proper CIDR allocation for departments, servers, and IoT devices.
Cloud VPC Design: Plan AWS VPC, Azure VNet, or GCP VPC CIDR blocks and subnet allocations for public, private, and database tiers.
VLSM Optimization: Allocate different-sized subnets within the same network (e.g., /30 for P2P links, /24 for user LANs) to maximize IP address efficiency.
Firewall ACL Configuration: Generate wildcard masks and IP ranges for access control lists on Cisco, Juniper, and other network equipment.
Route Aggregation: Calculate supernets to summarize contiguous subnets into a single routing entry, reducing routing table size.
Certification Study: Practice subnetting problems for CCNA, CCNP, CompTIA Network+, and other networking certification exams.
Troubleshooting: Verify whether two IP addresses are on the same subnet, check broadcast domains, and validate network configurations.
IPv6 Migration: Calculate IPv6 /48, /64, and custom prefix subnets for dual-stack and IPv6-only network deployments.
Security Auditing: Identify private (RFC 1918) vs. public IPs and detect multicast addresses in network scans.
An IP subnet is a logical subdivision of an IP network. The practice of dividing a network into two or more networks is called subnetting. This process increases network efficiency, enhances security, and simplifies management by breaking down large networks into smaller, more manageable segments. Subnetting is essential for modern network design, allowing network engineers to optimize IP address allocation, reduce broadcast traffic, and implement security boundaries between different network segments.
Our IP Subnet Calculator automates the complex binary mathematics required for subnetting, helping network engineers, IT professionals, and students quickly plan and verify network configurations. Whether you're designing a home network, configuring enterprise infrastructure, setting up cloud VPCs, or preparing for network certifications, our calculator provides instant, accurate subnet calculations with support for both IPv4 and IPv6 addresses, CIDR notation, and VLSM (Variable Length Subnet Masking).
"While often used interchangeably, CIDR and VLSM serve different purposes. CIDR (Classless Inter-Domain Routing) is primarily used for **route aggregation** on the public internet to keep backbone routing tables small. VLSM (Variable Length Subnet Masking), on the other hand, is used **internally** within an organization to allocate IP space efficiently by creating subnets of different sizes. Mastering both is essential for modern cloud architecture, where IP exhaustion is a constant risk even in private VPCs."
— FastTools Network Engineering Team
Understanding IPv4 network classes and private IP ranges is fundamental for network design and security:
Understanding IP subnet calculation is crucial for network administration. Here is the formula and process explained:
Determine if the IP is Class A, B, or C to find the default subnet mask.
Use the formula 2^n where n is the number of bits borrowed for subnetting.
Use the formula 2^h - 2 where h is the number of host bits remaining. The -2 accounts for Network ID and Broadcast Address.
Subtract the interesting octet's subnet mask value from 256 to find the block size (increment).
Quick reference for common CIDR notation and subnet masks:
| CIDR | Subnet Mask | Addresses | Hosts | Class Equivalent |
|---|---|---|---|---|
| /32 | 255.255.255.255 | 1 | 1 | Host |
| /31 | 255.255.255.254 | 2 | 2 (P2P) | N/A |
| /30 | 255.255.255.252 | 4 | 2 | A, B, C |
| /29 | 255.255.255.248 | 8 | 6 | A, B, C |
| /28 | 255.255.255.240 | 16 | 14 | A, B, C |
| /27 | 255.255.255.224 | 32 | 30 | A, B, C |
| /24 | 255.255.255.0 | 256 | 254 | Class C |
| /20 | 255.255.240.0 | 4,096 | 4,094 | Class B |
| /16 | 255.255.0.0 | 65,536 | 65,534 | Class B |
| /8 | 255.0.0.0 | 16,777,216 | 16,777,214 | Class A |
Understanding real-world subnetting examples helps you apply subnetting principles in practice:
Network: 192.168.1.0/24
Mask: 255.255.255.0
Usable IPs: 254
Standard configuration for most home routers and Wi-Fi networks.
Network: 10.0.0.0/16
Subnets: 10.0.1.0/24 (HR), 10.0.2.0/24 (Sales)
Scale: Allows up to 256 subnets with 254 hosts each.
VPC CIDR: 172.31.0.0/16
Public Subnet: 172.31.0.0/20 (4,096 IPs)
Private Subnet: 172.31.16.0/20
Typical default VPC configuration in AWS regions.
Default Bridge: 172.17.0.0/16
Container IPs: Assigned sequentially (e.g., 172.17.0.2)
Isolation: Containers on different custom bridges cannot communicate by default.
Follow these simple steps to calculate IP subnets accurately:
Input your IPv4 or IPv6 address in the calculator. The calculator accepts standard IP address formats (e.g., 192.168.1.1 for IPv4).
Enter subnet mask (e.g., 255.255.255.0) or CIDR prefix length (e.g., /24). CIDR notation is more common in modern networking.
Click calculate to get comprehensive network analysis including network address, broadcast address, usable host range, and total hosts.
Review network address, broadcast address, host range, and binary/hexadecimal representations for complete network understanding.
Calculate network address using IP and subnet mask
Determine broadcast address for the subnet
Calculate usable host addresses and ranges
Convert between decimal, binary, and hexadecimal
In the rapidly evolving landscape of digital infrastructure, IP subnetting is not merely a technical requirement but a strategic imperative for robust network design. At its core, subnetting involves dividing a large network into smaller, manageable sub-networks, or "subnets." This segmentation is critical for optimizing network performance and enhancing security posture. Without effective subnetting, networks suffer from excessive broadcast traffic, where every device constantly processes signals meant for others, leading to significant congestion and latency. By creating smaller broadcast domains, network engineers ensure that traffic is localized, preserving bandwidth for critical applications and improving overall throughput.
Beyond performance, subnetting acts as a fundamental layer of network security. By isolating different departments, applications, or user groups into distinct subnets, administrators can implement granular access control policies. For instance, a finance department's sensitive data can be logically separated from the guest Wi-Fi network, preventing unauthorized access and containing potential security breaches. This segmentation also simplifies troubleshooting; when an issue arises, it can be quickly isolated to a specific subnet rather than affecting the entire infrastructure. In an era of increasing cyber threats, the ability to compartmentalize network resources through precise subnet calculation is a vital skill for any IT professional.

Figure 1: Network Segmentation via Subnetting
The history of the Internet Protocol (IP) is a testament to the need for scalability. In the early days, the Classful IP addressing system (Class A, B, and C) was sufficient, allocating IP addresses in rigid blocks. However, as the internet exploded in popularity, this inefficient allocation led to the rapid exhaustion of IPv4 addresses. Many organizations were assigned vast blocks of IPs they didn't need, while others starved for address space. This crisis necessitated the development of Classless Inter-Domain Routing (CIDR), a revolutionary shift that allowed for flexible subnet masking.
CIDR introduced the concept of Variable Length Subnet Masking (VLSM), which empowers network architects to allocate IP space with surgical precision. Unlike the fixed class boundaries, VLSM allows subnets of different sizes to coexist within the same network design. For example, a point-to-point link between routers can be assigned a /30 subnet (4 IPs), while a main office LAN uses a /24 (254 IPs). This efficiency maximizes the utility of the limited IPv4 address pool and significantly reduces routing table size on the internet backbone. Understanding the transition from classful to classless addressing is essential for mastering modern routing protocols like OSPF and BGP, which rely heavily on CIDR for efficient route aggregation.

Figure 2: The Evolution from IPv4 to IPv6
As we look toward the future of connectivity, the coexistence of IPv4 and IPv6 is the new reality. While IPv4 remains dominant in many internal networks, the global depletion of public IPv4 addresses has accelerated the adoption of IPv6. A master network designer must be proficient in both. IPv6 solves the addressing limitation by offering a virtually infinite address space, eliminating the need for NAT (Network Address Translation) and restoring end-to-end connectivity. However, the principles of subnetting remain just as relevant. In IPv6, subnetting is used not to conserve addresses, but to organize the network logically and efficiently.
Modern cloud networking environments, such as AWS Virtual Private Clouds (VPCs) and Azure Virtual Networks, rely heavily on these fundamental concepts. Designing a resilient cloud architecture requires careful planning of IP address ranges to avoid overlap when peering with on-premises data centers. Whether you are configuring a small office network or a global enterprise SD-WAN, the ability to calculate subnets accurately—determining the network address, broadcast address, and usable host range—is the bedrock of reliable connectivity. Tools like this IP Subnet Calculator bridge the gap between complex binary math and practical implementation, enabling engineers to build the scalable, secure networks of tomorrow.

Figure 3: Understanding CIDR Notation
Your privacy and data security are our top priorities. Our IP subnet calculator processes all information locally in your browser:
All subnet calculations happen directly in your browser using JavaScript. Your IP addresses, subnet masks, and calculation results never leave your device or get transmitted to our servers. No data is sent over the internet during calculations.
We don't store, log, or track any of your network data. There's no database of your IP calculations, no analytics on your usage, and no way for us to access your IP addresses or subnet information. Your privacy is completely protected while using our tool.
You can use the calculator with confidence for enterprise network planning, cloud VPC design, and security analysis. All calculations happen locally, ensuring your network topology and IP addressing schemes remain private and secure.
Written by Network Engineering Team
Reviewed by CCNP Certified Professionals
Version.1.0 • IPv6 Ready
Convert IP and mask to binary, perform AND operation for network address. Count host bits: 2^n - 2 = usable hosts. Example: 192.168.1.0/24 has 2^8 - 2 = 254 hosts.
A /24 subnet has 24 network bits and 8 host bits, providing 254 usable IP addresses. Common in small networks, equivalent to subnet mask 255.255.255.0.
A /28 has 16 total IPs (2^4), with 14 usable hosts (16 - 2 for network and broadcast). Perfect for small departments or VLANs.
/32 mask (255.255.255.255) represents a single host route, used for specific host routing or loopback addresses, not for networks.