Subnet Calculator

Enter CIDR notation (e.g. 192.168.1.0/24 or 2001:db8::/32) to calculate the network address and number of usable hosts.

Understanding Subnets and CIDR Notation

A subnet is a smaller network created by dividing a larger network. It is used to organize IP addresses by department or floor within an organization, and to avoid wasting address space.

How to Read CIDR Notation

Notation such as "192.168.1.0/24" - an IP address followed by a slash and a number - is called CIDR (Classless Inter-Domain Routing) notation. The number represents how many bits are used for the network portion. Since an IPv4 address is 32 bits in total, a /24 leaves 8 bits (2^8 = 256) for the host portion, which determines how many addresses are available within that subnet. The larger the number, the fewer addresses the subnet contains.

Understanding the Results

  • Network address: the first address in the subnet, representing the subnet as a whole. It cannot be assigned to a host.
  • Subnet mask: indicates how much of the address is the network portion, corresponding to the CIDR prefix length.
  • Broadcast address: the last address in the subnet, used to send to every host in it at once. It cannot be assigned to a host.
  • Usable hosts: the number of addresses that can actually be assigned to devices, excluding the network and broadcast addresses.

About IPv6 Subnets

IPv6 uses 128 bits, giving it a vastly larger address space than IPv4. Allocations for homes and organizations are typically made in /64 blocks, which alone provide 2^64 addresses - effectively unlimited - so address exhaustion is rarely a concern the way it is with IPv4. IPv6 also has no concept of a broadcast address, and the notion of host count works differently than in IPv4.