IP Address Nerd
A cartoon owl in round glasses, thinking

Subnet Calculator

Network, broadcast, netmask and host range for any IPv4 or IPv6 subnet.

Runs in your browser. Nothing you type is uploaded.

How to use the subnet calculator

Enter a network in CIDR notation, such as 192.168.1.0/24, or an address with a netmask, such as 192.168.1.10 255.255.255.0. You get the network address, netmask, wildcard mask, broadcast address, first and last usable host and how many addresses the subnet holds. IPv6 prefixes such as 2001:db8::/48 work too.

Common IPv4 subnet sizes

PrefixNetmaskTotal addressesUsable hosts
/8255.0.0.016,777,21616,777,214
/16255.255.0.065,53665,534
/20255.255.240.04,0964,094
/22255.255.252.01,0241,022
/23255.255.254.0512510
/24255.255.255.0256254
/25255.255.255.128128126
/26255.255.255.1926462
/27255.255.255.2243230
/28255.255.255.2401614
/29255.255.255.24886
/30255.255.255.25242
/31255.255.255.25422
/32255.255.255.25511

FAQ

Why are there two fewer usable hosts than addresses?

In an IPv4 subnet the first address is the network address and the last is the broadcast address, so neither can be given to a host. /31 subnets (point-to-point links, RFC 3021) and /32 (a single host) are the exceptions.

What is a wildcard mask?

The netmask with its bits flipped. Cisco access lists and OSPF configuration use it: 255.255.255.0 becomes 0.0.0.255.

What if I enter an address that is not the network address?

The calculator uses the network the address belongs to and tells you so, for example 192.168.1.77/24 is in 192.168.1.0/24.

Is the address sent anywhere?

No. It is calculated in your browser.

More IP tools

  • What is my IP address: see the IP address you are connecting from.
  • IP address validator: Check an IPv4 or IPv6 address is valid, and see whether it is private, loopback, reserved or public.
  • CIDR to IP range: Turn a CIDR block into its first and last address, or a start-end range into CIDR blocks.
  • IP address converter: Convert an IPv4 address between dotted, decimal, hex and binary; expand or shorten IPv6.
  • Reverse DNS helper: Build the in-addr.arpa or ip6.arpa name for an address, with ready-to-run dig and host commands.
  • Private IP ranges: A reference table of private, loopback, link-local and other reserved IP address blocks.