Skip to content
AllCalcHub

IP Subnet Calculator

Work out the network, broadcast address, host range and mask for an IPv4 or IPv6 subnet.

About the IP Subnet Calculator

Enter an IPv4 address and prefix length (CIDR). The calculator gives the network address, the usable host range, the broadcast address, the number of hosts and whether the address is private.

A CIDR prefix says how many leading bits identify the network. In IPv4 a /24 has 256 addresses and 254 usable hosts (network and broadcast are reserved); /31 links use both addresses (RFC 3021). IPv6 has no broadcast, and LANs normally use /64 subnets.

The formula

Hosts = 2^(32 − prefix) − 2; network = IP AND mask

Worked example

192.168.1.130/26

  1. Network: 192.168.1.128
  2. Hosts: 192.168.1.129 – 192.168.1.190 (62)
  3. Broadcast: 192.168.1.191

Questions people ask

What are private ranges?

10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16 (RFC 1918).

What is a wildcard mask?

The inverse of the subnet mask, used in router ACLs.

What is /26 as a subnet mask?

255.255.255.192.