IP Subnet Calculator — CIDR & Network Address Calculator

Calculate subnet information including network address, broadcast, and usable hosts

How to Use the IP Subnet Calculator

This free IP subnet calculator takes any IPv4 address and CIDR prefix (e.g., 192.168.1.0/24) and instantly computes network address, broadcast address, subnet mask, wildcard mask, and the full usable host range. Network engineers and sysadmins use subnet calculators when designing VPC networks in AWS, Azure, or GCP; configuring firewall rules and ACLs; allocating IP ranges for VLAN segmentation; planning office or data center networks; and studying for CCNA or CompTIA Network+ certifications. Enter any IP address and select the CIDR prefix length from /8 to /30, then copy the results directly into your network configuration.

Common Subnet Masks

CIDRSubnet MaskUsable Hosts
/24255.255.255.0254
/25255.255.255.128126
/26255.255.255.19262
/27255.255.255.22430
/28255.255.255.24014
/29255.255.255.2486
/30255.255.255.2522

Key Terms

  • Network Address: First IP in the subnet, identifies the network
  • Broadcast Address: Last IP in the subnet, sends to all hosts
  • Usable Hosts: IPs between network and broadcast addresses
  • Wildcard Mask: Inverse of subnet mask, used in routing

Frequently Asked Questions

What is CIDR notation?

CIDR (Classless Inter-Domain Routing) notation expresses an IP address and its subnet mask in a compact format: IP/prefix. For example, 192.168.1.0/24 means the IP range 192.168.1.0–192.168.1.255 where the first 24 bits are the network portion and the remaining 8 bits identify hosts. /24 gives 256 addresses (254 usable), /25 gives 128 (126 usable), /16 gives 65,536 (65,534 usable).

Why are 2 IPs unusable in each subnet?

In every subnet, two IP addresses are reserved and cannot be assigned to hosts. The first address is the network address (identifies the subnet itself, e.g., 192.168.1.0) and the last address is the broadcast address (used to send packets to all hosts in the subnet, e.g., 192.168.1.255). So a /24 subnet has 256 total addresses but only 254 usable host addresses.

What is a /32 subnet?

A /32 subnet contains exactly one IP address — the host address itself. It has no network or broadcast addresses since there's only one possible address. /32 is commonly used in routing tables to specify a single host route, in security group rules to allow traffic from/to a specific IP, and in firewall rules for precise IP-based access control.

How do I choose the right subnet size?

Choose subnet size based on the number of hosts needed, plus room for growth: /30 for point-to-point links (2 hosts), /29 for small segments (6 hosts), /28 for 14 hosts, /27 for 30 hosts, /26 for 62 hosts, /25 for 126 hosts, /24 for 254 hosts. Always add 20–50% headroom for future growth. In cloud environments (AWS VPC, Azure VNet), you can't resize subnets after creation — plan generously upfront.

What is subnetting used for?

Subnetting divides a large IP network into smaller logical networks (subnets) for: security isolation (hosts in different subnets need routing to communicate, limiting blast radius of breaches), traffic management (broadcasting is contained within a subnet), efficient IP allocation (assign only the address space needed), and network organization (separate subnets for servers, workstations, IoT devices, guest WiFi). It's fundamental to all modern IPv4 network design.

What are private IP address ranges?

RFC 1918 defines three private IPv4 ranges not routable on the public internet: 10.0.0.0/8 (16.7 million addresses, used by large enterprises and cloud providers), 172.16.0.0/12 (1 million addresses), and 192.168.0.0/16 (65,536 addresses, commonly used in home and small office networks). Any subnet you calculate within these ranges is for internal use only. To communicate with the public internet from a private range, you need NAT (Network Address Translation).

What is the difference between a subnet mask and a prefix length?

They represent the same information in different formats. A subnet mask is a 32-bit number written in dotted decimal: 255.255.255.0. A prefix length (CIDR notation) is the count of consecutive '1' bits in the mask: /24. They're equivalent: /24 = 255.255.255.0, /25 = 255.255.255.128, /16 = 255.255.0.0. Modern networking predominantly uses CIDR notation as it's more compact and easier to work with.

How do I calculate how many hosts fit in a subnet?

Use the formula: usable hosts = 2^(32 - prefix) - 2. For example: /24 → 2^8 - 2 = 254 hosts, /25 → 2^7 - 2 = 126 hosts, /26 → 2^6 - 2 = 62 hosts, /27 → 2^5 - 2 = 30 hosts, /28 → 2^4 - 2 = 14 hosts, /29 → 2^3 - 2 = 6 hosts, /30 → 2^2 - 2 = 2 hosts. Our Subnet Calculator above handles this automatically — just enter an IP and prefix length.

Want Automated Monitoring?

Get 24/7 monitoring with instant alerts when issues are detected.

Start Free Trial