Subnet Calculator

Calculate network details from an IP address and CIDR prefix or subnet mask.

About Subnet Calculator

A subnet calculator helps you divide an IP network into smaller sub-networks (subnets). It takes an IP address and either a CIDR prefix length or a subnet mask, then computes:

  • Network Address - The first address in the subnet, identifying the network itself
  • Broadcast Address - The last address, used to send data to all hosts on the subnet
  • Host Range - The first and last usable IP addresses for devices
  • Wildcard Mask - The inverse of the subnet mask, used in ACLs and routing

What is Subnetting?

Subnetting is the practice of dividing a large IP network into smaller, more manageable sub-networks. Each subnet operates as its own network segment, improving security, reducing broadcast traffic, and making IP address management more efficient. Network administrators use subnetting to organize networks logically, isolate departments or services, and optimize routing.

Every IPv4 address is a 32-bit number. The subnet mask determines how many of those bits identify the network versus the host. A /24 prefix, for example, means 24 bits are for the network and 8 bits are for hosts, providing 254 usable addresses. Smaller prefixes like /16 give more hosts (65,534), while larger prefixes like /30 are commonly used for point-to-point links with just 2 usable addresses.

Common Subnet Sizes

Frequently Asked Questions

What is a subnet mask?

A subnet mask is a 32-bit number that divides an IP address into the network portion and the host portion. The network bits are all set to 1 and the host bits are all set to 0. For example, 255.255.255.0 means the first 24 bits identify the network and the last 8 bits identify individual hosts.

What does CIDR notation mean?

CIDR (Classless Inter-Domain Routing) notation uses a slash followed by the number of network bits. For example, 192.168.1.0/24 means the first 24 bits are the network address. This replaced the older classful addressing system and allows more flexible allocation of IP address space.

How many hosts can a /24 subnet hold?

A /24 subnet contains 256 total addresses (2^8), but 2 are reserved: the network address (first) and the broadcast address (last). This leaves 254 usable host addresses. The formula is: usable hosts = 2^(32 - prefix) - 2.