IP Subnet Calculator

This IP subnet calculator works out everything about an IPv4 subnet from an address and prefix length (CIDR). Get the network address, subnet and wildcard masks, broadcast address, usable host range, number of hosts and whether the address is private or public.

How subnetting works

An IPv4 address has 32 bits. The prefix length (for example /24) says how many bits belong to the network; the rest identify hosts. A /24 leaves 8 host bits, so 2⁸ = 256 addresses.

  • Network address: the address with all host bits set to 0.
  • Broadcast address: the address with all host bits set to 1.
  • Usable hosts: total addresses minus 2 (network and broadcast), except /31 and /32.

Common subnet sizes

Prefix Subnet mask Usable hosts
/30 255.255.255.252 2
/29 255.255.255.248 6
/28 255.255.255.240 14
/27 255.255.255.224 30
/26 255.255.255.192 62
/24 255.255.255.0 254
/16 255.255.0.0 65,534
/8 255.0.0.0 16,777,214

Worked example

For 192.168.1.10/24, the network is 192.168.1.0/24, the broadcast address is 192.168.1.255, usable hosts run from 192.168.1.1 to 192.168.1.254 (254 hosts), and the address is private.

Private address ranges (RFC 1918)

10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16 are reserved for private networks and are not routed on the public internet.

Frequently asked questions

What does /24 mean?

It is CIDR notation meaning the first 24 bits are the network part, the same as the subnet mask 255.255.255.0.

Why are there 254 usable hosts in a /24, not 256?

The first address identifies the network and the last is the broadcast address, so neither can be given to a device.

What is a wildcard mask?

The inverse of the subnet mask, used in router access lists and some routing protocols. For 255.255.255.0 it is 0.0.0.255.

Does this work for IPv6?

No, it is for IPv4. IPv6 subnets are usually /64 and use a different address format.

Related calculators

Last reviewed: October 2026.

Scroll to Top