IP Subnet Calculator

Calculate network address, broadcast address, usable host range, and subnet mask from an IP address and CIDR prefix length.

NETWORK ADDRESS
--
Broadcast Address
--
Usable Hosts
--
Host Range
--
Subnet Mask
--

What Is IP Subnetting?

IP subnetting is the practice of dividing a network into smaller sub-networks (subnets). Each subnet has a defined range of IP addresses, a network address, and a broadcast address. Subnetting improves network performance by reducing broadcast domains and enhances security by isolating network segments.

A subnet mask determines which portion of an IP address identifies the network and which portion identifies the host. The CIDR (Classless Inter-Domain Routing) notation uses a prefix length (e.g., /24) to indicate how many bits are used for the network portion.

Subnet Calculation

Network Address = IP AND Subnet Mask
Broadcast Address = Network Address OR (NOT Subnet Mask)
Usable Hosts = 2^(32 - CIDR) - 2

Common Subnet Masks

CIDRSubnet MaskUsable HostsTotal Addresses
/8255.0.0.016,777,21416,777,216
/16255.255.0.065,53465,536
/24255.255.255.0254256
/25255.255.255.128126128
/26255.255.255.1926264
/27255.255.255.2243032
/28255.255.255.2401416
/30255.255.255.25224

Frequently Asked Questions

What is the difference between network and broadcast address?

The network address is the first address in a subnet and identifies the network itself (e.g., 192.168.1.0/24). The broadcast address is the last address and is used to send data to all hosts in the subnet (e.g., 192.168.1.255). Neither can be assigned to a host device.

Why subtract 2 for usable hosts?

The total addresses in a subnet is 2^(32-CIDR). Two addresses are reserved: the network address (first) and the broadcast address (last). So usable host addresses = total - 2. Exception: /31 subnets (point-to-point links) use both addresses per RFC 3021.

What are private IP ranges?

Private IP ranges reserved by RFC 1918 are: 10.0.0.0/8 (Class A), 172.16.0.0/12 (Class B), and 192.168.0.0/16 (Class C). These addresses are not routable on the public internet and are used for internal networks behind NAT.