📵 Subnet Calculator

Enter an IP address with CIDR prefix (e.g. 192.168.1.0/24) to get full subnet details.

Common CIDR Reference

CIDRSubnet MaskHostsCommon Use
/8255.0.0.016,777,214Class A
/16255.255.0.065,534Class B
/24255.255.255.0254Home/Office LAN
/25255.255.255.128126Small subnet
/28255.255.255.24014VLAN segment
/30255.255.255.2522Point-to-point link

Subnet basics: The prefix length (/24) indicates how many bits are used for the network. The remaining bits are for hosts. A /24 has 2^8 = 256 addresses, with 254 usable (excluding network and broadcast). Smaller prefix = larger network.

IP Subnetting Explained

Subnetting divides a large IP network into smaller, more manageable subnetworks. It improves security (by isolating network segments), reduces broadcast traffic, and allows efficient use of IP address space. Every subnet is defined by an IP address and a subnet mask (or CIDR prefix notation like /24).

Understanding CIDR Notation

CIDR (Classless Inter-Domain Routing) notation expresses a subnet as an IP address followed by a slash and the number of network bits. Common subnets:

  • /24 (255.255.255.0) — 254 usable hosts — most common for small office/home networks
  • /16 (255.255.0.0) — 65,534 usable hosts — large corporate networks
  • /8 (255.0.0.0) — 16.7 million hosts — very large ISP allocations
  • /30 — only 2 usable hosts — used for point-to-point links

Private IP Address Ranges

RFC 1918 defines three private IP ranges used for internal networks (not routable on the public internet): 10.0.0.0/8 (10.x.x.x), 172.16.0.0/12 (172.16–31.x.x), and 192.168.0.0/16 (192.168.x.x). Home routers typically use 192.168.0.x or 192.168.1.x. NAT (Network Address Translation) allows multiple devices on a private network to share one public IP address.

Understanding IP Addresses and Subnet Masks

An IPv4 address is a 32-bit number typically written in dotted-decimal notation (e.g., 192.168.1.100). Each of the four octets represents 8 bits, ranging from 0 to 255. A subnet mask divides the IP address into two parts: the network portion (shared by all devices on the same network) and the host portion (unique to each device). The subnet mask 255.255.255.0 in binary is 11111111.11111111.11111111.00000000 — 24 network bits and 8 host bits, written in CIDR notation as /24. A /24 network contains 2⁸ = 256 addresses, but only 254 are usable — the first address is the network address and the last is the broadcast address, both reserved.

Common Subnet Sizes and Their Uses

CIDR notation makes subnetting more readable than spelling out the full subnet mask. Common subnets: /30 (255.255.255.252): 4 addresses, 2 usable — point-to-point links between routers. /29 (255.255.255.248): 8 addresses, 6 usable — small server clusters. /28 (255.255.255.240): 16 addresses, 14 usable — small office floors. /24 (255.255.255.0): 256 addresses, 254 usable — standard home or small office network. /22 (255.255.252.0): 1,024 addresses, 1,022 usable — medium enterprise floor. /16 (255.255.0.0): 65,536 addresses — large enterprise or data center. Private address ranges (RFC 1918): 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16 — these are routed only within private networks and never appear on the public internet.

Subnetting for Network Planning

Subnetting divides a larger network into smaller segments for security, performance, and management. In VLSM (Variable Length Subnet Masking), different subnets within the same organization get different sizes based on need — a floor with 200 users gets a /24 while a point-to-point WAN link gets a /30, conserving address space. The subnetting process: determine the number of hosts needed per subnet → choose the smallest subnet that fits (round up to next power of 2) → calculate the subnet mask → determine the network, first usable, last usable, and broadcast addresses for each subnet. For exam and practical purposes, memorize the magic number rule: 256 − subnet mask octet = block size. For 255.255.255.224 (/27): 256 − 224 = 32, so subnets increment by 32: .0, .32, .64, .96, etc., each with 30 usable hosts.

Have Feedback or a Suggestion? Contact Us
Top