IP Subnet Calculator

Calculate IPv4 subnets: network/broadcast addresses, host ranges, wildcard masks, and CIDR notation. Plan subnetting for any network size.

About the IP Subnet Calculator

Subnetting is a fundamental skill for network engineers, system administrators, and anyone working with IP networks. Our IP Subnet Calculator takes any IPv4 address and subnet mask (in CIDR or dotted-decimal notation) and instantly calculates the network address, broadcast address, usable host range, number of hosts, and wildcard mask.

Enter an IP address like 192.168.1.100 with a prefix length of /24, and see that it belongs to the 192.168.1.0/24 network with 254 usable host addresses from 192.168.1.1 to 192.168.1.254. The calculator handles all subnet sizes from /0 (entire internet) to /32 (single host) and shows the binary representation for visual learning.

Beyond basic subnet calculation, the tool includes a subnet table showing all standard subnet sizes and their properties, a network splitter that divides a network into equal subnets, and a visual display of the network/host bit boundary. Whether you're studying for the CCNA exam, planning a network deployment, or troubleshooting connectivity issues, this calculator provides instant, accurate subnet math.

Why Use This IP Subnet Calculator?

Eliminate manual subnet math errors. Plan network deployments, troubleshoot connectivity, and study for networking certifications with instant, visual subnet calculations. Keep these notes focused on your operational context. Tie the context to the calculator’s intended domain. Use this clarification to avoid ambiguous interpretation. Align this note with review checkpoints. Apply this where interpretation shifts by use case.

How to Use This Calculator

  1. Enter an IPv4 address (e.g., 192.168.1.100).
  2. Enter the subnet mask in CIDR notation (/24) or dotted decimal (255.255.255.0).
  3. View network address, broadcast address, host range, and host count.
  4. Check the binary visualization to understand the network/host bit boundary.
  5. Use the subnet table to compare different prefix lengths.
  6. Use the subnet splitter to divide a network into smaller subnets.

Formula

Network Address = IP AND Subnet Mask Broadcast Address = IP OR (NOT Subnet Mask) First Host = Network Address + 1 Last Host = Broadcast Address - 1 Total Hosts = 2^(32 - prefix) - 2 Wildcard Mask = NOT Subnet Mask

Example Calculation

Result: Network: 192.168.1.0/24 | Hosts: 254

With /24, the first 24 bits are the network portion. Network address is 192.168.1.0, broadcast is 192.168.1.255, usable hosts range from .1 to .254 (254 addresses). Subnet mask is 255.255.255.0, wildcard is 0.0.0.255.

Tips & Best Practices

IPv4 Subnetting Fundamentals

IPv4 addresses are 32-bit numbers, typically written as four octets in dotted-decimal notation (e.g., 192.168.1.100). The subnet mask determines which bits identify the network and which identify individual hosts. In CIDR notation, /24 means the first 24 bits are the network portion, leaving 8 bits (256 values) for hosts — minus 2 reserved addresses (network and broadcast), yielding 254 usable hosts.

Subnetting allows large networks to be divided into smaller, more manageable segments. This improves security (by isolating departments), reduces broadcast traffic (broadcasts stay within their subnet), and simplifies routing. Modern networks almost universally use VLSM (Variable Length Subnet Masking), where different subnets within the same organization can have different prefix lengths based on their actual host requirements.

Common Subnet Sizes and Use Cases

The most commonly used subnet sizes are: /24 (254 hosts) for small to medium LANs, /25-/26 for smaller departments, /27-/28 for server VLANs, /30 for point-to-point router links (2 host addresses), and /32 for loopback addresses. For large campuses, /22 (1022 hosts) or /21 (2046 hosts) are used for wireless networks where many devices connect simultaneously.

Cloud environments introduce additional subnetting considerations. AWS VPC subnets reserve 5 IP addresses per subnet (not just 2), reducing usable hosts. Azure and GCP have similar reservations. When planning cloud network architecture, oversized subnets waste IP space in small VPCs, but undersized subnets can't accommodate auto-scaling — the sweet spot depends on expected peak utilization.

Supernetting and Route Aggregation

The inverse of subnetting is supernetting (route aggregation or summarization). If you have four /24 networks — 192.168.0.0/24 through 192.168.3.0/24 — they can be advertised as a single /22 route (192.168.0.0/22). This reduces routing table size and improves routing efficiency. CIDR was specifically designed to enable this aggregation, replacing the wasteful Class A/B/C system that led to rapid IPv4 exhaustion. Modern ISPs and backbone routers rely heavily on route aggregation to keep the global routing table manageable (currently around 950,000 routes).

Frequently Asked Questions

What is a subnet mask?

A subnet mask divides an IP address into network and host portions. The mask has 1-bits for the network part and 0-bits for the host part. /24 means 24 network bits and 8 host bits, allowing 254 hosts per subnet.

What is CIDR notation?

CIDR (Classless Inter-Domain Routing) notation expresses the subnet mask as a prefix length after a slash. /24 equals 255.255.255.0, /16 equals 255.255.0.0, /8 equals 255.0.0.0. It replaced the old Class A/B/C system.

Why do we subtract 2 from the host count?

Two addresses are reserved in every subnet: the network address (all host bits 0) identifies the subnet itself, and the broadcast address (all host bits 1) sends to all hosts. Neither can be assigned to a device.

What is a wildcard mask?

A wildcard mask is the inverse of the subnet mask (each bit flipped). It's used in ACLs and OSPF configurations. For subnet mask 255.255.255.0, the wildcard is 0.0.0.255.

What subnet should I use for a small office?

For a small office with under 50 devices, /26 (62 hosts) or /25 (126 hosts) is appropriate. /24 (254 hosts) is the most common default. Avoid using larger subnets than needed to reduce broadcast domain size.

What are RFC 1918 private address ranges?

10.0.0.0/8 (16.7M addresses), 172.16.0.0/12 (1M addresses), and 192.168.0.0/16 (65K addresses). These are reserved for private networks and are not routable on the internet.

Related Pages