IP Subnet Calculator (CIDR & VLSM)
Calculate IPv4 network address, broadcast address, subnet mask, CIDR prefix, total hosts, usable host ranges, and binary netmasks online.
IPv4 Subnetting, CIDR Notation & VLSM Architecture
Mathematical calculation of network addresses, broadcast domains, binary masks, and host capacities.
1. Understanding IPv4 Addressing & CIDR
An Internet Protocol version 4 (IPv4) address is a 32-bit numeric address written as four decimal octets separated by dots (e.g., 192.168.1.1). Each octet contains 8 bits, ranging from 0 to 255.
Classless Inter-Domain Routing (CIDR) notation denotes the network prefix length using a forward slash followed by the number of leading 1-bits in the subnet mask (e.g., /24 equals 255.255.255.0). The subnet mask divides the 32-bit address into two parts: the Network ID (identifying the subnet) and the Host ID (identifying individual devices within that subnet).
2. Calculating Usable Hosts & Network Addresses
To determine how many usable host IP addresses exist in a subnet with prefix length N, the formula is:
Total Addresses = 2^(32 - N)
Usable Hosts = 2^(32 - N) - 2
Example for /24 Network:
Total Addresses = 2^(32 - 24) = 2^8 = 256
Usable Hosts = 256 - 2 = 254 usable devices
(1 address reserved for Network ID, 1 address reserved for Broadcast ID)3. Common Subnet Mask & Host Capacity Table
Reference guide for common IPv4 CIDR subnet allocations:
| CIDR Prefix | Subnet Mask | Total IPs | Usable Hosts | Common Use Case |
|---|---|---|---|---|
| /32 | 255.255.255.255 | 1 | 1 (Host Route) | Single loopback or host route |
| /30 | 255.255.255.252 | 4 | 2 | Point-to-point router links |
| /28 | 255.255.255.240 | 16 | 14 | Small office / DMZ segment |
| /24 | 255.255.255.0 | 256 | 254 | Standard local area network (LAN) |
| /16 | 255.255.0.0 | 65,536 | 65,534 | Enterprise VPC / Cloud network |
| /8 | 255.0.0.0 | 16,777,216 | 16,777,214 | Large ISP / Telecommunication block |
Frequently Asked Questions (FAQs)
Q:What is CIDR notation?
CIDR (Classless Inter-Domain Routing) denotes the number of leading 1-bits in the subnet mask (e.g., /24 represents 255.255.255.0 with 254 usable hosts).