🌐

IP Subnet Calculator

Calculate usable hosts, total addresses, and network capacity from a CIDR prefix length for IPv4 subnets.

Enter a value from 0 to 32. Common values: /8 Class A, /16 Class B, /24 Class C.

Results

Usable Hosts per Subnet254
Total Addresses (incl. network & broadcast)256
Host Bits8
Number of /n Networks in IPv4 Space16,777,216
Subnet Mask (as 32-bit integer)4,294,967,040

📖What is it?

CIDR (Classless Inter-Domain Routing) notation like /24 describes how an IPv4 address space is divided into networks and hosts. The prefix length tells you how many bits are fixed for the network portion; the remaining bits are for hosts.

🎯How to use

Enter the CIDR prefix length (0–32). The calculator instantly shows you the number of usable host addresses, total addresses in the subnet, and how many such subnets exist in the full IPv4 space. For a typical /24 you get 254 usable hosts.

💡Example scenario

You are configuring a small office network. You choose /26 to give four subnets inside a /24. Entering 26 shows 62 usable hosts per subnet — enough for 50 workstations with room to grow, while reserving the network address (x.x.x.0) and broadcast address (x.x.x.63).

🏆Pro tip

Every subnet always loses 2 addresses: the network address (all host bits = 0) and the broadcast address (all host bits = 1). A /31 is a special point-to-point exception (RFC 3021) with 0 usable hosts by the standard formula but 2 in practice. A /32 represents a single host route.