🛠️ Other ToolsFree · No signup

IP Subnet Calculator

Calculate IP subnets, subnet masks, and CIDR notation. Find network address, broadcast address, host range, and number of hosts.

About the IP Subnet Calculator

A subnet calculator computes all key properties of an IPv4 network from a given IP address and CIDR prefix notation (e.g., 192.168.1.0/24): network address, broadcast address, first and last usable host addresses, subnet mask, wildcard mask, and number of usable hosts. Subnetting is a fundamental skill for network engineers, system administrators, and cloud architects — and essential knowledge for CompTIA Network+, CCNA, AWS Solutions Architect, and other networking or cloud certifications. Our calculator also supports VLSM (Variable Length Subnet Masking) for breaking a large network into smaller subnets of different sizes, displays results in both decimal and binary formats to show the bitwise logic, and includes an IPv6 subnet calculator for /48, /64, and custom prefix networks.

Formula

Hosts = 2^(32-prefix) - 2 | Network = IP AND Subnet_mask | Broadcast = IP OR (NOT Subnet_mask)

How It Works

CIDR notation /24 means the first 24 bits are the network portion, the last 8 bits are host addresses. Subnet mask: 24 ones followed by 8 zeros = 11111111.11111111.11111111.00000000 = 255.255.255.0. Usable hosts = 2^(32−prefix) − 2 (subtract network address and broadcast address). For /24: 2⁸ − 2 = 254 usable hosts. Network address: bitwise AND of IP address with subnet mask. For 192.168.1.47/24: 192.168.1.47 AND 255.255.255.0 = 192.168.1.0 (network). Broadcast: set all host bits to 1 = 192.168.1.255. Host range: 192.168.1.1 to 192.168.1.254. For /30 (point-to-point links): 2² − 2 = 2 usable hosts. For /32 (single host): 1 address, used for loopback and host routes.

Tips & Best Practices

  • Common prefix quick reference: /8 = Class A, 16.7 million hosts; /16 = Class B, 65,534 hosts; /24 = Class C, 254 hosts; /30 = 2 hosts (point-to-point); /32 = single host.
  • Private RFC 1918 ranges reserved for internal networks (not routable on public internet): 10.0.0.0/8 (Class A private); 172.16.0.0/12; 192.168.0.0/16 (most common home network range).
  • Subnetting mnemonic for Class C (/24 to /30): prefix /25=128 hosts, /26=64, /27=32, /28=16, /29=8, /30=4, /31=2 (RFC 3021, no network/broadcast), /32=1.
  • Wildcard mask is the inverse of subnet mask. For 255.255.255.0 subnet mask: wildcard = 0.0.0.255. Used in Cisco ACLs and OSPF area statements.
  • Supernetting (CIDR aggregation): combining multiple smaller networks into one larger prefix. Four /24 networks (e.g., 192.168.0-3.0/24) can be summarised as 192.168.0.0/22 in routing tables.
  • IPv6 addressing: a /48 prefix is typically assigned to an organisation; /64 is standard for individual network segments. A /64 provides 2⁶⁴ ≈ 18.4 quintillion host addresses per segment.
  • Cloud subnetting: AWS VPCs use /16 for the VPC (65,536 addresses) divided into /24 subnets (256 addresses each) or smaller. AWS reserves the first 4 and last 1 address in each subnet.
  • The rule of thumb for enterprise network design: use /24 for standard LAN segments, /30 for point-to-point WAN links, /32 for loopbacks, and aggregate at boundaries to minimise routing table size.

Who Uses This Calculator

Network engineers designing IP address allocation schemes for campus and enterprise networks. System administrators troubleshooting connectivity and verifying correct subnet configurations. Students studying for CCNA, CompTIA Network+, and cloud certification exams. Cloud architects designing VPC and virtual network address spaces in AWS, Azure, and Google Cloud. Security engineers configuring firewall rules and network access control lists. Home lab enthusiasts learning networking concepts practically.

Optimised for: USA · Canada · UK · Australia · Calculations run in your browser · No data stored

Frequently Asked Questions

What is a /24 subnet?

A /24 subnet (255.255.255.0 mask) provides 256 addresses (254 usable hosts), one network address, and one broadcast address.