Subnet Calculator

Calculate network range, broadcast address, and more from IP and subnet.

Enter Network Details

About subnet calculation: Subnet calculators help network administrators determine the network address, broadcast address, and usable IP range for a given network. This information is crucial for IP address planning, network segmentation, and troubleshooting connectivity issues.

Understanding IP Subnetting

What is Subnetting?

Subnetting is the practice of dividing a larger IP network into smaller, more manageable subnetworks called subnets. These subnets operate as separate networks within the larger address space, allowing for more efficient network management, improved security, and better traffic control.

In an IPv4 network, subnetting is accomplished by borrowing bits from the host portion of an IP address to create additional network bits. This process is defined by the subnet mask, which indicates which portions of the IP address represent the network and which represent host addresses within that network.

Key Subnetting Concepts

IP Address Classes

Traditionally, IPv4 addresses were divided into five classes:

ClassFirst Octet RangeDefault MaskNetwork BitsAddresses per Network
Class A1-126255.0.0.0 (/8)816,777,214
Class B128-191255.255.0.0 (/16)1665,534
Class C192-223255.255.255.0 (/24)24254
Class D224-239MulticastN/AN/A
Class E240-255ReservedN/AN/A

Modern networking has largely moved beyond class-based addressing to Classless Inter-Domain Routing (CIDR), but understanding the classes remains helpful for context.

CIDR Notation

CIDR notation represents the subnet mask as a suffix showing the number of network bits, formatted as /n where n is between 0 and 32.

Common CIDR notations and their equivalent subnet masks:

  • /24 = 255.255.255.0 (allows 254 hosts)
  • /25 = 255.255.255.128 (allows 126 hosts)
  • /26 = 255.255.255.192 (allows 62 hosts)
  • /27 = 255.255.255.224 (allows 30 hosts)
  • /28 = 255.255.255.240 (allows 14 hosts)
  • /29 = 255.255.255.248 (allows 6 hosts)
  • /30 = 255.255.255.252 (allows 2 hosts)

Special Addresses in a Subnet

  • Network Address: The first address in a subnet (all host bits are 0), identifies the network itself and cannot be assigned to devices.
  • Broadcast Address: The last address in a subnet (all host bits are 1), used to send packets to all devices on the subnet.
  • First Usable Host: The address immediately after the network address, typically assigned to the default gateway/router.
  • Last Usable Host: The address immediately before the broadcast address.

Benefits of Subnetting

Improved Network Performance

By dividing a network into smaller broadcast domains, subnetting reduces unnecessary traffic and congestion, improving overall network performance.

Enhanced Security

Subnets allow for better isolation of network segments and implementation of security measures like access control lists (ACLs) between subnets.

Address Space Conservation

Subnets enable more efficient use of limited IPv4 address space by allocating only the necessary number of addresses to each network segment.

Simplified Management

Organizing devices into logical subnets makes network management more organized and easier to troubleshoot.

Reduced Routing Table Size

Subnetting allows for route summarization, which reduces the size of routing tables and improves routing efficiency.

Logical Organization

Networks can be organized by function, department, or location, making administration more intuitive.

Practical Subnet Planning

When planning subnets for a network, consider these key factors:

  1. Determine Host Requirements: Calculate how many devices each subnet needs to support, including room for future growth. Remember the formula: usable hosts = 2(32-CIDR) - 2.
  2. Network Segmentation Strategy: Decide how to divide your network (by department, function, location, security requirements, etc.).
  3. Consider Address Conservation: Use subnet sizes appropriate for each segment's needs—avoid allocating large subnets for small groups of devices.
  4. Plan for Special-Purpose Subnets: Set aside subnets for management interfaces, DMZs, VPNs, and other special network functions.
  5. Document Thoroughly: Maintain detailed documentation of your subnet allocation, including ranges, purposes, and VLANs if applicable.
  6. Variable-Length Subnet Masking (VLSM): Use different subnet sizes for different network segments to maximize address utilization.
  7. Consider IPv6: In modern networks, plan for eventual IPv6 implementation alongside IPv4 subnetting.

Frequently Asked Questions (FAQs)

More Tools

Explore our other network and security tools to enhance your analysis.

IP Whois Lookup
Discover ownership, location, and ISP details of any IP address.
DNS Lookup
Look up DNS records (A, AAAA, CNAME, MX, TXT) for any domain.
Proxy Check
Detect if an IP address is using a known proxy or VPN service.
Reverse DNS Lookup
Convert an IP address back to its associated domain name.
Hostname Lookup
Convert an IP address to its associated hostname (FQDN).
IP Blacklist Check
Check if an IP is on any known spam or security threat blacklist.